Skip to content

Commit b2387d4

Browse files
committed
🔨 Attempt to fix paths and missing system deps
1 parent ee83fbe commit b2387d4

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/cmake-multi-platform.yml

+27-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ jobs:
1616
include:
1717
- os: windows-latest
1818
cpp_compiler: cl
19+
separator: '\\'
1920
- os: ubuntu-latest
2021
cpp_compiler: g++
22+
separator: "/"
2123

2224
steps:
2325
- uses: actions/checkout@v4
@@ -27,6 +29,12 @@ jobs:
2729
with:
2830
python-version: "3.x"
2931

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+
3038
- name: Install Dependencies
3139
run: |
3240
python -m pip install --upgrade pip
@@ -35,6 +43,9 @@ jobs:
3543
- name: Setup Conan
3644
run: |
3745
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
3849
3950
- name: Cache Conan packages
4051
uses: actions/cache@v3
@@ -52,7 +63,13 @@ jobs:
5263
id: strings
5364
shell: bash
5465
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
5673
5774
- name: Configure CMake
5875
shell: bash
@@ -61,9 +78,16 @@ jobs:
6178
if [ "${{ matrix.build_type }}" = "RelWithDebInfo" ]; then
6279
preset="conan-relwithdebinfo"
6380
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+
6488
cmake --preset $preset \
6589
-S . \
66-
-B ${{ steps.strings.outputs.build-output-dir }} \
90+
-B "$build_dir" \
6791
-G Ninja \
6892
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
6993
@@ -78,7 +102,5 @@ jobs:
78102
uses: actions/upload-artifact@v3
79103
with:
80104
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 }}
84106
if-no-files-found: ignore

0 commit comments

Comments
 (0)