| 1 |
name: C/C++ CI |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
pull_request: |
| 6 |
branches: [ "main" ] |
| 7 |
|
| 8 |
jobs: |
| 9 |
linux: |
| 10 |
runs-on: ubuntu-latest |
| 11 |
steps: |
| 12 |
- uses: actions/[email protected] |
| 13 |
- name: Install Conan |
| 14 |
uses: turtlebrowser/get-conan@main |
| 15 |
with: |
| 16 |
version: 2.8.1 |
| 17 |
- name: Configure conan |
| 18 |
run: conan profile detect |
| 19 |
- name: Install deps |
| 20 |
run: conan install . --output-folder=${{github.workspace}}/build --build=missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=True |
| 21 |
- name: "Configure and build" |
| 22 |
run: cmake -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DUSE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -S . -B build |
| 23 |
- name: build |
| 24 |
run: cmake --build build --config Release |
| 25 |
- name: package |
| 26 |
run: cmake --build build --config Release --target package |
| 27 |
- uses: actions/upload-artifact@v4 |
| 28 |
with: |
| 29 |
name: ubuntu |
| 30 |
path: build/Li_ri-*.sh |
| 31 |
mac: |
| 32 |
if: ${{ false }} |
| 33 |
runs-on: macos-14 |
| 34 |
steps: |
| 35 |
- uses: actions/[email protected] |
| 36 |
- uses: actions/[email protected] |
| 37 |
with: |
| 38 |
python-version: '3.13' |
| 39 |
- name: Get Conan |
| 40 |
uses: turtlebrowser/get-conan@main |
| 41 |
with: |
| 42 |
version: 2.8.1 |
| 43 |
- name: Configure conan |
| 44 |
run: conan profile detect |
| 45 |
- name: Install deps |
| 46 |
run: conan install . --output-folder=${{github.workspace}}/build --build=missing |
| 47 |
|
| 48 |
- name: "Configure and build" |
| 49 |
run: cmake -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake -DUSE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -S . -B build |
| 50 |
- name: build |
| 51 |
run: cmake --build build --config Release |
| 52 |
- name: package |
| 53 |
run: cmake --build build --config Release --target package |
| 54 |
- uses: actions/upload-artifact@v4 |
| 55 |
with: |
| 56 |
name: macOS |
| 57 |
path: build/Li_ri-*.dmg |
| 58 |
|
| 59 |
windows: |
| 60 |
runs-on: windows-latest |
| 61 |
steps: |
| 62 |
- uses: actions/[email protected] |
| 63 |
- name: Install Conan |
| 64 |
uses: turtlebrowser/get-conan@main |
| 65 |
with: |
| 66 |
version: 2.8.1 |
| 67 |
|
| 68 |
- name: Configure conan |
| 69 |
run: conan profile detect |
| 70 |
- name: Install deps |
| 71 |
run: conan install . --output-folder=${{github.workspace}}/build --build=missing |
| 72 |
- name: "Configure and build" |
| 73 |
run: cmake -DCMAKE_TOOLCHAIN_FILE="${{github.workspace}}/build/build/generators/conan_toolchain.cmake" -DUSE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -S . -B build |
| 74 |
|
| 75 |
- name: build |
| 76 |
run: cmake --build build --config Release |
| 77 |
- name: Install NSIS |
| 78 |
uses: repolevedavaj/[email protected] |
| 79 |
with: |
| 80 |
nsis-version: "3.10" |
| 81 |
- name: package |
| 82 |
run: cmake --build build --config Release --target package |
| 83 |
- uses: actions/upload-artifact@v4 |
| 84 |
with: |
| 85 |
name: windows |
| 86 |
path: build/Li_ri-*.exe |