Skip to content

Commit

Permalink
🔨 Another CMake github actions attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
SeedyROM committed Nov 30, 2024
1 parent d8e18d2 commit d6ce3fa
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y libegl1-mesa-dev libgl1-mesa-dev ninja-build
- name: Install System Dependencies (Windows)
- name: Setup Developer Command Prompt (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1

- name: Install Ninja (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
choco install ninja
$NinjaPath = "C:\Program Files\Ninja"
New-Item -ItemType Directory -Path $NinjaPath -Force
Invoke-WebRequest "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile "ninja.zip"
Expand-Archive "ninja.zip" -DestinationPath $NinjaPath
Add-Content $env:GITHUB_PATH "$NinjaPath"
- name: Install Dependencies
run: |
Expand Down Expand Up @@ -72,9 +81,11 @@ jobs:
if [ "${{ runner.os }}" == "Windows" ]; then
echo "build-output-dir=${{ github.workspace }}\\build\\${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
echo "game-path=src\\game\\stabby.exe" >> "$GITHUB_OUTPUT"
echo "preset=conan-default" >> "$GITHUB_OUTPUT"
else
echo "build-output-dir=${{ github.workspace }}/build/${{ matrix.build_type }}" >> "$GITHUB_OUTPUT"
echo "game-path=src/game/stabby" >> "$GITHUB_OUTPUT"
echo "preset=conan-release" >> "$GITHUB_OUTPUT"
fi
- name: Configure CMake
Expand All @@ -86,7 +97,7 @@ jobs:
build_dir="${{ github.workspace }}/build/${{ matrix.build_type }}"
fi
cmake --preset conan-default \
cmake --preset ${{ steps.strings.outputs.preset }} \
-S . \
-B "$build_dir" \
-G Ninja \
Expand Down

0 comments on commit d6ce3fa

Please sign in to comment.