Skip to content

Commit

Permalink
try macos build on runner
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosciusz committed Jun 15, 2024
1 parent 2e638a9 commit b045ab8
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [windows, ubuntu]
os: [windows, ubuntu, macos]
include:
- os: windows
preset: windows-release
package: windows-release
# package: windows-release
- os: ubuntu
preset: linux-vcpkg
- os: macos
preset: macos-vcpkg

runs-on: ${{ matrix.os }}-latest
name: ${{ github.workflow }}-${{ matrix.os }}

Expand Down Expand Up @@ -51,6 +54,11 @@ jobs:
- name: Prints output of run-vcpkg's action.
run: echo "root='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_ROOT_OUT }}', triplet='${{ steps.runvcpkg.outputs.RUNVCPKG_VCPKG_DEFAULT_TRIPLET_OUT }}' "

- name: Install dependencies on macos
if: ${{ startsWith(matrix.os, 'macos') }}
id: macos-deps
run: brew install sdl

- name: Run CMake and CPack
uses: lukka/run-cmake@v10
id: runcmake
Expand All @@ -60,6 +68,10 @@ jobs:
buildPreset: ${{ matrix.preset }}
packagePreset: ${{ matrix.package }}

- name: List $RUNNER_WORKSPACE after build
run: find $RUNNER_WORKSPACE
shell: bash

- name: Read output package name
if: ${{ matrix.package }}
id: readpkg
Expand Down
26 changes: 26 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,27 @@
"vcpkg",
"linux"
]
},
{
"name": "macos",
"displayName": "macos build",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
}
},
{
"name": "macos-vcpkg",
"displayName": "Macos vcpkg debug build",
"inherits": [
"debug",
"macos",
"vcpkg"
],
"cacheVariables": {
"VCPKG_OVERLAY_PORTS": "./vcpkg-ports/sdl1"
}
}
],
"buildPresets": [
Expand All @@ -113,6 +134,11 @@
"name": "linux-vcpkg",
"displayName": "Linux vcpkg build",
"configurePreset": "linux-vcpkg"
},
{
"name": "macos-vcpkg",
"displayName": "Macos vcpkg build",
"configurePreset": "macos-vcpkg"
}
],
"packagePresets": [
Expand Down
1 change: 1 addition & 0 deletions vcpkg-ports/sdl1/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
4 changes: 4 additions & 0 deletions vcpkg-ports/sdl1/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "sdl1",
"version": "1.2.5"
}

0 comments on commit b045ab8

Please sign in to comment.