Allow configuring iOS build with CMake (#3234)

This commit is contained in:
Bart Louwers
2025-02-28 14:25:36 +01:00
committed by GitHub
parent 7562931a43
commit b09235b41e
45 changed files with 696 additions and 954 deletions

View File

@@ -332,13 +332,30 @@ jobs:
run: |
VERSION=${{ env.version }} COCOAPODS_TRUNK_TOKEN=${{ secrets.COCOAPODS_PASSWORD }} pod trunk push MapLibre.podspec
ios-build-cmake:
needs: pre_job
runs-on: macos-latest
if: needs.pre_job.outputs.should_skip != 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Configure build with CMake
run: cmake --preset ios
- name: Build mbgl-core
run: cmake --build build-ios --target mbgl-core ios-sdk-static app
ios-ci-result:
runs-on: ubuntu-latest
if: needs.pre_job.outputs.should_skip != 'true' && always()
needs:
- pre_job
- ios-build
- ios-build-cmake
steps:
- name: Mark result as failed
if: needs.ios-build.result != 'success'
if: needs.ios-build.result != 'success' || needs.ios-build-cmake.result != 'success'
run: exit 1

View File

@@ -167,7 +167,7 @@ jobs:
if: ${{contains(runner.name, 'GitHub Actions')}}
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.29.2'
cmake-version: '3.31'
- name: cmake version
run: |
@@ -204,16 +204,7 @@ jobs:
- name: Configure maplibre-native (MacOS)
if: runner.os == 'MacOS'
run: |
cmake . -B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }} \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DMLN_WITH_NODE=ON \
-DMLN_WITH_OPENGL=OFF \
-DMLN_WITH_METAL=ON \
-DMLN_LEGACY_RENDERER=OFF \
-DMLN_DRAWABLE_RENDERER=ON \
-DMLN_WITH_WERROR=OFF
cmake --preset macos-node -DCMAKE_BUILD_TYPE=${{ env.BUILDTYPE }}
- name: Configure maplibre-native (Linux)
if: runner.os == 'Linux'