Try to fix pipeline test running for windows with visual studio 2022 #197
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macos | |
on: [push, pull_request] | |
jobs: | |
Build: | |
name: ${{matrix.name}} (${{matrix.config}}) | |
runs-on: ${{matrix.os}} | |
env: | |
CMAKE_GENERATOR: Ninja | |
strategy: | |
fail-fast: false | |
matrix: | |
name: [ | |
macos-12-xcode-13-x86_64, | |
macos-12-xcode-13-arm64, | |
macos-12-xcode-14-x86_64, | |
macos-12-xcode-14-arm64 | |
] | |
config: [Debug, Release] | |
include: | |
- name: macos-12-xcode-13-x86_64 | |
os: macos-12 | |
compiler: xcode | |
version: "13.4" | |
architecture: x86_64 | |
- name: macos-12-xcode-13-arm64 | |
os: macos-12 | |
compiler: xcode | |
version: "13.4" | |
architecture: arm64 | |
- name: macos-12-xcode-14-x86_64 | |
os: macos-12 | |
compiler: xcode | |
version: "14.2" | |
architecture: x86_64 | |
- name: macos-12-xcode-14-arm64 | |
os: macos-12 | |
compiler: xcode | |
version: "14.2" | |
architecture: arm64 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Dependencies | |
run: | | |
brew install ninja | |
brew install doxygen graphviz | |
if [ "${{matrix.compiler}}" = "xcode" ]; then | |
ls -ls /Applications/ | |
sudo xcode-select -switch /Applications/Xcode_${{matrix.version}}.app | |
echo "CC=clang" >> $GITHUB_ENV | |
echo "CXX=clang++" >> $GITHUB_ENV | |
fi | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
working-directory: ${{runner.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE:STRING=${{matrix.config}} -DCMAKE_OSX_ARCHITECTURES:STRING=${{matrix.architecture}} | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --config ${{matrix.config}} | |
- name: Test | |
if: matrix.architecture != 'arm64' | |
working-directory: ${{runner.workspace}}/build | |
run: ctest --output-on-failure -C ${{matrix.config}} | |
# - name: Coverage | |
# if: matrix.config == 'Debug' && matrix.architecture != 'arm64' | |
# working-directory: ${{runner.workspace}}/build | |
# run: cmake --build . --target coverage | |
# - name: Archive Coverage | |
# if: matrix.config == 'Debug' && matrix.architecture != 'arm64' | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: coverage-macos | |
# path: | | |
# ${{runner.workspace}}/build/tests/coverage.${{matrix.compiler}}-${{matrix.version}}.txt | |
# ${{runner.workspace}}/build/tests/coverage.overview.${{matrix.compiler}}-${{matrix.version}}.txt | |
- name: Documentation | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --target documentation |