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:
commit
f89f221445
3 changed files with 58 additions and 17 deletions
2
.github/actions/run_tests/action.yml
vendored
2
.github/actions/run_tests/action.yml
vendored
|
@ -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
|
||||
|
|
36
.github/workflows/build_and_test.yml
vendored
36
.github/workflows/build_and_test.yml
vendored
|
@ -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,21 @@ 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
|
||||
- name: Set PRESET environment variable to lower case runner OS
|
||||
shell: bash
|
||||
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
|
||||
shell: bash
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue