From 79c02f28467cdfd3793653ce44c3f06614ba4c69 Mon Sep 17 00:00:00 2001 From: Eric Zillinger Date: Sun, 5 May 2024 10:45:11 -0700 Subject: [PATCH] bump cache version, attempt mac build --- .github/workflows/cmake-multi-platform.yml | 24 ++++++++++++++-------- .vscode/launch.json | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 15d7a69..22e3dae 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -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: @@ -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: @@ -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 @@ -57,14 +59,20 @@ 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 @@ -72,7 +80,7 @@ jobs: 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)) @@ -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 }} @@ -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 }} diff --git a/.vscode/launch.json b/.vscode/launch.json index e04f798..131918e 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -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,