|
16 | 16 | include:
|
17 | 17 | - os: windows-latest
|
18 | 18 | cpp_compiler: cl
|
| 19 | + separator: '\\' |
19 | 20 | - os: ubuntu-latest
|
20 | 21 | cpp_compiler: g++
|
| 22 | + separator: "/" |
21 | 23 |
|
22 | 24 | steps:
|
23 | 25 | - uses: actions/checkout@v4
|
|
27 | 29 | with:
|
28 | 30 | python-version: "3.x"
|
29 | 31 |
|
| 32 | + - name: Install System Dependencies (Ubuntu) |
| 33 | + if: runner.os == 'Linux' |
| 34 | + run: | |
| 35 | + sudo apt-get update |
| 36 | + sudo apt-get install -y libegl1-mesa-dev libgl1-mesa-dev |
| 37 | +
|
30 | 38 | - name: Install Dependencies
|
31 | 39 | run: |
|
32 | 40 | python -m pip install --upgrade pip
|
|
35 | 43 | - name: Setup Conan
|
36 | 44 | run: |
|
37 | 45 | conan profile detect --force
|
| 46 | + conan config install https://github.com/conan-io/conancli.git |
| 47 | + conan config set tools.system.package_manager:mode=install |
| 48 | + conan config set tools.system.package_manager:sudo=True |
38 | 49 |
|
39 | 50 | - name: Cache Conan packages
|
40 | 51 | uses: actions/cache@v3
|
|
52 | 63 | id: strings
|
53 | 64 | shell: bash
|
54 | 65 | run: |
|
55 |
| - echo "build-output-dir=${{ github.workspace }}/build/${{ matrix.build_type }}" >> "$GITHUB_OUTPUT" |
| 66 | + if [ "${{ runner.os }}" == "Windows" ]; then |
| 67 | + echo "build-output-dir=${{ github.workspace }}\\build\\${{ matrix.build_type }}" >> "$GITHUB_OUTPUT" |
| 68 | + echo "game-path=src\\game\\stabby.exe" >> "$GITHUB_OUTPUT" |
| 69 | + else |
| 70 | + echo "build-output-dir=${{ github.workspace }}/build/${{ matrix.build_type }}" >> "$GITHUB_OUTPUT" |
| 71 | + echo "game-path=src/game/stabby" >> "$GITHUB_OUTPUT" |
| 72 | + fi |
56 | 73 |
|
57 | 74 | - name: Configure CMake
|
58 | 75 | shell: bash
|
|
61 | 78 | if [ "${{ matrix.build_type }}" = "RelWithDebInfo" ]; then
|
62 | 79 | preset="conan-relwithdebinfo"
|
63 | 80 | fi
|
| 81 | +
|
| 82 | + if [ "${{ runner.os }}" == "Windows" ]; then |
| 83 | + build_dir="${{ github.workspace }}\\build\\${{ matrix.build_type }}" |
| 84 | + else |
| 85 | + build_dir="${{ github.workspace }}/build/${{ matrix.build_type }}" |
| 86 | + fi |
| 87 | +
|
64 | 88 | cmake --preset $preset \
|
65 | 89 | -S . \
|
66 |
| - -B ${{ steps.strings.outputs.build-output-dir }} \ |
| 90 | + -B "$build_dir" \ |
67 | 91 | -G Ninja \
|
68 | 92 | -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
69 | 93 |
|
|
78 | 102 | uses: actions/upload-artifact@v3
|
79 | 103 | with:
|
80 | 104 | name: ${{ runner.os }}-${{ matrix.build_type }}-build
|
81 |
| - path: | |
82 |
| - ${{ steps.strings.outputs.build-output-dir }}/src/game/stabby* |
83 |
| - ${{ steps.strings.outputs.build-output-dir }}/src/game/stabby.exe |
| 105 | + path: ${{ steps.strings.outputs.build-output-dir }}/${{ steps.strings.outputs.game-path }} |
84 | 106 | if-no-files-found: ignore
|
0 commit comments