diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 023250614..6e7237d15 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -83,10 +83,16 @@ jobs: nuget-pat: ${{ secrets.GITHUB_TOKEN }} mono: ${{ matrix.mono }} - - name: set lower case runner os + - name: Set PRESET environment variable to lower case runner OS shell: bash run: | - echo "PRESET=$(echo "${{ runner.os }}" | perl -ne "print lc")-ci" >> ${GITHUB_ENV} + LC_RUNNER_OS=$(echo "${RUNNER_OS}" | perl -ne "print lc") + if [ "${RUNNER_OS}" == "macOS" ]; then + MACOS_ARCH=${{ (matrix.os == 'macos-14' || matrix.os == 'macos-latest') && 'arm64' || 'x64' }} + echo "PRESET=${LC_RUNNER_OS}-ci-${MACOS_ARCH}" >> ${GITHUB_ENV} + else + echo "PRESET=${LC_RUNNER_OS}-ci" >> ${GITHUB_ENV} + fi - name: Ensure libtool is installed on macOS shell: bash diff --git a/CMakePresets.json b/CMakePresets.json index bc5a7c995..ac177a31b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -228,7 +228,23 @@ } }, { - "name": "macos-ci", + "name": "macos-ci-arm64", + "description": "used by the ci pipeline", + "inherits": [ + "use-ninja", + "release-with-debug-build", + "default-build-dir", + "ci-options" + ], + "cacheVariables": { + "CMAKE_CXX_FLAGS": "-fprofile-arcs -ftest-coverage" + }, + "environment": { + "PROJ_LIB": "${sourceDir}/build/vcpkg_installed/arm64-osx/share/proj" + } + }, + { + "name": "macos-ci-x64", "description": "used by the ci pipeline", "inherits": [ "use-ninja", @@ -282,8 +298,12 @@ "configurePreset": "linux-ci-release" }, { - "name": "macos-ci", - "configurePreset": "macos-ci" + "name": "macos-ci-arm64", + "configurePreset": "macos-ci-arm64" + }, + { + "name": "macos-ci-x64", + "configurePreset": "macos-ci-x64" } ], "testPresets": [ @@ -313,8 +333,15 @@ ] }, { - "name": "macos-ci", - "configurePreset": "macos-ci", + "name": "macos-ci-arm64", + "configurePreset": "macos-ci-arm64", + "inherits": [ + "test-default" + ] + }, + { + "name": "macos-ci-x64", + "configurePreset": "macos-ci-x64", "inherits": [ "test-default" ]