Skip to content

Commit d6ce3fa

Browse files
committed
🔨 Another CMake github actions attempt
1 parent d8e18d2 commit d6ce3fa

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

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

+14-3
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,19 @@ jobs:
3535
sudo apt-get update
3636
sudo apt-get install -y libegl1-mesa-dev libgl1-mesa-dev ninja-build
3737
38-
- name: Install System Dependencies (Windows)
38+
- name: Setup Developer Command Prompt (Windows)
3939
if: runner.os == 'Windows'
40+
uses: ilammy/msvc-dev-cmd@v1
41+
42+
- name: Install Ninja (Windows)
43+
if: runner.os == 'Windows'
44+
shell: pwsh
4045
run: |
41-
choco install ninja
46+
$NinjaPath = "C:\Program Files\Ninja"
47+
New-Item -ItemType Directory -Path $NinjaPath -Force
48+
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile "ninja.zip"
49+
Expand-Archive "ninja.zip" -DestinationPath $NinjaPath
50+
Add-Content $env:GITHUB_PATH "$NinjaPath"
4251
4352
- name: Install Dependencies
4453
run: |
@@ -72,9 +81,11 @@ jobs:
7281
if [ "${{ runner.os }}" == "Windows" ]; then
7382
echo "build-output-dir=${{ github.workspace }}\\build\\${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
7483
echo "game-path=src\\game\\stabby.exe" >> "$GITHUB_OUTPUT"
84+
echo "preset=conan-default" >> "$GITHUB_OUTPUT"
7585
else
7686
echo "build-output-dir=${{ github.workspace }}/build/${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
7787
echo "game-path=src/game/stabby" >> "$GITHUB_OUTPUT"
88+
echo "preset=conan-release" >> "$GITHUB_OUTPUT"
7889
fi
7990
8091
- name: Configure CMake
@@ -86,7 +97,7 @@ jobs:
8697
build_dir="${{ github.workspace }}/build/${{ matrix.build_type }}"
8798
fi
8899
89-
cmake --preset conan-default \
100+
cmake --preset ${{ steps.strings.outputs.preset }} \
90101
-S . \
91102
-B "$build_dir" \
92103
-G Ninja \

0 commit comments

Comments
 (0)