Skip to content

👷 Test with different environments #69

👷 Test with different environments

👷 Test with different environments #69

Workflow file for this run

on:
pull_request:
push:
branches:
- master
- main
- develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ctest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
compiler:
- g++-10
- g++-11
- g++-12
- g++-13
- clang++-12
- clang++-13
- clang++-14
- clang++-15
generator: [ Ninja ]
include:
- os: ubuntu-latest
compiler: g++
coverage: true
generator: Ninja
- os: windows-latest
- os: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Ninja
if: ${{ matrix.generator == 'Ninja' }}
uses: seanmiddleditch/gha-setup-ninja@v4
- uses: actions/cache@v4
with:
path: build/_deps/*-src
key: cmake-dependency-src-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
cmake-dependency-src-
- uses: actions/cache@v4
with:
path: |
build/_deps/*-build
build/_deps/*-subbuild
key: cmake-dependency-builds-${{ runner.os }}-${{ matrix.compiler }}-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
cmake-dependency-builds-${{ runner.os }}-${{ matrix.compiler }}-
cmake-dependency-builds-${{ runner.os }}-
- name: Configure and Build Project
uses: threeal/[email protected]
with:
run-build: true
args: -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=${{ matrix.coverage == true && 'ON' || 'OFF' }}
cxx-compiler: ${{ matrix.compiler }}
- name: Test Project
uses: threeal/[email protected]
with:
build-config: Debug
- name: Check Coverage
if: ${{ matrix.coverage == true }}
uses: threeal/gcovr-action@xml-out
with:
xml-out: './build/coverage.xml'
coveralls-out: './build/coveralls.json'
excludes: |
build/*
test/*
- name: Upload coverage reports to Codecov
if: ${{ matrix.coverage == true }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
files: ./build/coverage.xml
disable_search: true