Merge pull request #4449 from hummeltech/macOSCI

`macos-latest` was migrated from `macOS 12` on `amd64` to `macOS 14` on `arm64`
This commit is contained in:
Artem Pavlenko 2024-05-06 11:14:29 +01:00 committed by GitHub
commit f89f221445
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 58 additions and 17 deletions

View file

@ -74,7 +74,7 @@ runs:
shell: "bash" shell: "bash"
run: | run: |
if [ "$RUNNER_OS" == "macOS" ]; then 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 fi
lcov ${LCOV_EXTRA_OPTIONS:-} --directory . --capture --output-file coverage.info 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 lcov ${LCOV_EXTRA_OPTIONS:-} --remove coverage.info '/usr/*' '*/vcpkg_installed/*' '/.cache/*' '*/test/*' --output-file coverage.info

View file

@ -29,16 +29,24 @@ jobs:
Build & Test Build & Test
(${{ matrix.os }}) (${{ matrix.os }})
(C++ ${{ matrix.cxx-standard }}) (C++ ${{ matrix.cxx-standard }})
${{ startsWith(matrix.os, 'macos-') && (matrix.os == 'macos-14' && '(ARM64)' || '(AMD64)') || '' }}
needs: checkSource needs: checkSource
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [macos-latest, windows-latest, ubuntu-latest] os:
cxx-standard: [17] - macos-13
- macos-14
- ubuntu-latest
- windows-latest
cxx-standard:
- 17
include: include:
- os: ubuntu-latest - os: macos-13
mono: mono mono: mono
- os: macos-latest - os: macos-14
mono: mono
- os: ubuntu-latest
mono: mono mono: mono
- os: windows-latest - os: windows-latest
@ -75,15 +83,21 @@ jobs:
nuget-pat: ${{ secrets.GITHUB_TOKEN }} nuget-pat: ${{ secrets.GITHUB_TOKEN }}
mono: ${{ matrix.mono }} mono: ${{ matrix.mono }}
- id: lc_platform - name: Set PRESET environment variable to lower case runner OS
uses: ASzc/change-string-case-action@v6
with:
string: ${{ runner.os }}
- name: set lower case runner os
shell: bash shell: bash
run: | run: |
echo "PRESET=${{ steps.lc_platform.outputs.lowercase }}-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
run: brew install libtool
if: runner.os == 'macOS'
- name: Configure CMake - name: Configure CMake
shell: bash shell: bash

View file

@ -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", "description": "used by the ci pipeline",
"inherits": [ "inherits": [
"use-ninja", "use-ninja",
@ -282,8 +298,12 @@
"configurePreset": "linux-ci-release" "configurePreset": "linux-ci-release"
}, },
{ {
"name": "macos-ci", "name": "macos-ci-arm64",
"configurePreset": "macos-ci" "configurePreset": "macos-ci-arm64"
},
{
"name": "macos-ci-x64",
"configurePreset": "macos-ci-x64"
} }
], ],
"testPresets": [ "testPresets": [
@ -313,8 +333,15 @@
] ]
}, },
{ {
"name": "macos-ci", "name": "macos-ci-arm64",
"configurePreset": "macos-ci", "configurePreset": "macos-ci-arm64",
"inherits": [
"test-default"
]
},
{
"name": "macos-ci-x64",
"configurePreset": "macos-ci-x64",
"inherits": [ "inherits": [
"test-default" "test-default"
] ]