From b7fb04e88e1696051305d10b7073f6b739a705ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C5=93ur?= Date: Thu, 2 May 2024 12:57:55 +0800 Subject: [PATCH 1/2] Adding apple-cmake-job for an iOS/tvOS/watchOS build --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dc91fc1..cbfc612c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -973,6 +973,45 @@ jobs: name: openbsd-${{ matrix.release }}-autotools-${{ matrix.EVENT_MATRIX }}-build path: . + apple-cmake-job: + runs-on: ${{ matrix.os }} + if: "!contains(github.event.head_commit.message, 'ci/macos skip') && !contains(github.event.head_commit.message, 'ci/macos/cmake skip')" + strategy: + fail-fast: false + matrix: + os: [macos-latest] + EVENT_MATRIX: + - IOS + - TVOS + #- VISIONOS # not yet supported by GitHub + - WATCHOS + + steps: + - uses: actions/checkout@v4 + + - name: Cache Build + uses: actions/cache@v4 + with: + path: build + key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v4 + + - name: Build + shell: bash + run: | + if [ "${{ matrix.EVENT_MATRIX }}" == "IOS" ]; then + CMAKE_OSX_SYSROOT="iphoneos" + elif [ "${{ matrix.EVENT_MATRIX }}" == "TVOS" ]; then + CMAKE_OSX_SYSROOT="appletvos" + elif [ "${{ matrix.EVENT_MATRIX }}" == "VISIONOS" ]; then + CMAKE_OSX_SYSROOT="xros" + elif [ "${{ matrix.EVENT_MATRIX }}" == "WATCHOS" ]; then + CMAKE_OSX_SYSROOT="watchos" + fi + + echo [cmake]: cmake -B build -G Xcode -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT + cmake -B build -G Xcode -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT || (rm -rf build && cmake -B build -G Xcode -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT) + cmake --build build -t event_static + # ABI job without deploy abi-job: runs-on: ubuntu-22.04 From 71108830f60cf203e0fc868b2f531c218def3971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C5=93ur?= Date: Thu, 2 May 2024 13:16:04 +0800 Subject: [PATCH 2/2] using xcode-version: latest-stable for xros support --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbfc612c..1f562a09 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -983,7 +983,7 @@ jobs: EVENT_MATRIX: - IOS - TVOS - #- VISIONOS # not yet supported by GitHub + - VISIONOS - WATCHOS steps: @@ -995,6 +995,11 @@ jobs: path: build key: ${{ matrix.os }}-cmake-${{ matrix.EVENT_MATRIX }}-v4 + - name: Xcode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + - name: Build shell: bash run: |