Skip to content

Commit

Permalink
bump cache version, attempt mac build
Browse files Browse the repository at this point in the history
  • Loading branch information
ezillinger committed May 5, 2024
1 parent 88e8843 commit 79c02f2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
name: CMake Build All Platforms
env:
WINDOWS_SDL_VERSION: 2.30.3
on:
Expand All @@ -24,7 +24,7 @@ jobs:
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Release]
c_compiler: [gcc-13, cl] #clang-18 ]
include:
Expand All @@ -44,6 +44,8 @@ jobs:
# c_compiler: clang-18
- os: ubuntu-latest
c_compiler: cl
- os: macos-latest
c_compiler: cl

steps:
- uses: actions/checkout@v4
Expand All @@ -57,22 +59,28 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install SDL2 (Ubuntu)
- name: Install SDL2 - Linux
shell: bash
if: runner.os == 'Linux'
run: |
sudo apt-get install libsdl2-dev
- name: Cache SDL
uses: actions/cache@v2
- name: Install SDL2 - macOS
shell: bash
if: runner.os == 'macOS'
run: |
brew install sdl2
- name: Cache SDL - Windows
uses: actions/cache@v4
if: runner.os == 'Windows'
env:
cache-name: cache-sdl
with:
path: C:\SDL
key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Download SDL if not cached
- name: Download SDL if not cached - Windows
if: runner.os == 'Windows'
run: |
if (-Not (Test-Path C:\SDL))
Expand All @@ -81,7 +89,7 @@ jobs:
Expand-Archive C:\SDL.zip -DestinationPath C:\
}
- name: Configure CMake (Linux)
- name: Configure CMake - Linux/macOS
if: runner.os != 'Windows'
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
Expand All @@ -90,7 +98,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Configure CMake (Windows)
- name: Configure CMake - Windows
if: runner.os == 'Windows'
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"type": "cppvsdbg",
"name": "C++ Launch (Windows)",
"request": "launch",
"program": "${workspaceFolder}/build/src/Debug/ezgb.exe",
"program": "${workspaceFolder}/build/src/${config}/ezgb.exe",
"symbolSearchPath": "C:\\Symbols;C:\\SymbolDir2",
"logging": {
"moduleLoad": false,
Expand Down

0 comments on commit 79c02f2

Please sign in to comment.