From 8afed63683e99db5070882122f985cc8644a3516 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:58:32 -0700 Subject: [PATCH 1/4] macos-latest changed from macOS 12 on amd64 to arm64 This seems to have happened around 2024.04.23 https://github.blog/changelog/2024-04-01-macos-14-sonoma-is-generally-available-and-the-latest-macos-runner-image/ --- .github/workflows/build_and_test.yml | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index e1f56a92f..1ffdf4822 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -29,16 +29,24 @@ jobs: Build & Test (${{ matrix.os }}) (C++ ${{ matrix.cxx-standard }}) + ${{ startsWith(matrix.os, 'macos-') && (matrix.os == 'macos-14' && '(ARM64)' || '(AMD64)') || '' }} needs: checkSource strategy: fail-fast: false matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - cxx-standard: [17] + os: + - macos-13 + - macos-14 + - ubuntu-latest + - windows-latest + cxx-standard: + - 17 include: - - os: ubuntu-latest + - os: macos-13 mono: mono - - os: macos-latest + - os: macos-14 + mono: mono + - os: ubuntu-latest mono: mono - os: windows-latest @@ -75,15 +83,10 @@ jobs: nuget-pat: ${{ secrets.GITHUB_TOKEN }} mono: ${{ matrix.mono }} - - id: lc_platform - uses: ASzc/change-string-case-action@v6 - with: - string: ${{ runner.os }} - - name: set lower case runner os shell: bash run: | - echo "PRESET=${{ steps.lc_platform.outputs.lowercase }}-ci" >>${GITHUB_ENV} + echo "PRESET=$(echo "${{ runner.os }}" | perl -ne "print lc")-ci" >> ${GITHUB_ENV} - name: Configure CMake shell: bash From e18643ed085cdc3d7b00cced08469ac3d0e4f9b7 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:16:47 -0700 Subject: [PATCH 2/4] Install missing `libtool` package on `macos-14` --- .github/workflows/build_and_test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 1ffdf4822..023250614 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -88,6 +88,11 @@ jobs: run: | echo "PRESET=$(echo "${{ runner.os }}" | perl -ne "print lc")-ci" >> ${GITHUB_ENV} + - name: Ensure libtool is installed on macOS + shell: bash + run: brew install libtool + if: runner.os == 'macOS' + - name: Configure CMake shell: bash run: | From bbeac846d7ac94c5107d729d4f03d40acf1e87a4 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Fri, 26 Apr 2024 14:01:39 -0700 Subject: [PATCH 3/4] Address issues after recent upgrade to LCOV v2.1 --- .github/actions/run_tests/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_tests/action.yml b/.github/actions/run_tests/action.yml index 87d13e962..89cf2ae89 100644 --- a/.github/actions/run_tests/action.yml +++ b/.github/actions/run_tests/action.yml @@ -74,7 +74,7 @@ runs: shell: "bash" run: | if [ "$RUNNER_OS" == "macOS" ]; then - LCOV_EXTRA_OPTIONS="--ignore-errors gcov --ignore-errors inconsistent --ignore-errors unused" + LCOV_EXTRA_OPTIONS="--ignore-errors count,gcov,inconsistent,range,unused --keep-going" fi lcov ${LCOV_EXTRA_OPTIONS:-} --directory . --capture --output-file coverage.info lcov ${LCOV_EXTRA_OPTIONS:-} --remove coverage.info '/usr/*' '*/vcpkg_installed/*' '/.cache/*' '*/test/*' --output-file coverage.info From 09067f55fa8d3236e97d472f5bf6b043b7a87e11 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Sat, 4 May 2024 19:59:44 -0700 Subject: [PATCH 4/4] Account for difference of PROJ_LIB --- .github/workflows/build_and_test.yml | 10 ++++++-- CMakePresets.json | 37 ++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 7 deletions(-) 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" ]