Skip to content

Fix CI for MacOS.

Fix CI for MacOS. #209

Workflow file for this run

name: Tests
on:
- push
jobs:
build-test:
strategy:
fail-fast: false
matrix:
platform:
- runner: ubuntu-latest
sonarcloud-build-wrapper : build-wrapper-linux-x86-64
- runner: ubuntu-20.04
sonarcloud-build-wrapper : build-wrapper-linux-x86-64
- runner: macos-latest-large
sonarcloud-build-wrapper : build-wrapper-macosx-x86
runs-on: ${{ matrix.platform.runner }}
steps:
- uses: actions/checkout@v3
- name: Install gcovr
run: pip3 install gcovr
- name: Setup sonar cloud
uses: SonarSource/[email protected]
- name: Build tests
run: cmake -B build -S .
- name: Build tests
run: ${{ matrix.platform.sonarcloud-build-wrapper }} --out-dir bw-output cmake --build build
- name: Run tests and coverage
run: ./build/tests/tests
- name: Generate coverage report
run: gcovr --sonarqube -o coverage.xml build
- name: Run sonar-scanner
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.AUTERION_CI_SONAR_TOKEN }}
run: |
sonar-scanner \
--define sonar.cfamily.build-wrapper-output="bw-output" \
--define sonar.coverageReportPaths=coverage.xml