Update CMakeLists.txt #111
Workflow file for this run
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: CPP Semver CI | |
on: [push, pull_request] | |
jobs: | |
macos: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ macos-13 ] | |
build: [ Debug, Release ] | |
compiler: [ clang++ ] | |
name: ${{matrix.os}} ${{matrix.compiler}} ${{matrix.build}} | |
env: | |
CXX: ${{matrix.compiler}} | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: cmake | |
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=${{matrix.build}} | |
- name: build | |
run: cmake --build build --config ${{matrix.build}} --parallel 4 | |
- name: test | |
working-directory: build | |
run: ctest -C ${{matrix.build}} -j4 | |
linux: | |
runs-on: ${{matrix.platform.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [ Debug, Release ] | |
platform: | |
- { os: "ubuntu-22.04", cxx: "g++-11", modules: "OFF" } | |
- { os: "ubuntu-22.04", cxx: "g++-12", modules: "OFF" } | |
- { os: "ubuntu-24.04", cxx: "g++-13", modules: "OFF" } | |
- { os: "ubuntu-24.04", cxx: "g++-14", modules: "ON" } | |
- { os: "ubuntu-22.04", cxx: "clang++-15", modules: "OFF" } | |
- { os: "ubuntu-24.04", cxx: "clang++-16", modules: "ON" } | |
name: ${{matrix.platform.os}} ${{matrix.platform.cxx}} ${{matrix.build}} | |
env: | |
CXX: ${{matrix.platform.cxx}} | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Ninja | |
run: sudo apt install ninja-build | |
- name: cmake | |
run: cmake -GNinja -S . -B build | |
-DCMAKE_BUILD_TYPE=${{matrix.build}} | |
-DSEMVER_BUILD_MODULE=${{matrix.platform.modules}} | |
- name: build | |
run: cmake --build build --config ${{matrix.build}} --parallel 4 | |
- name: test | |
working-directory: build | |
run: ctest -C ${{matrix.build}} -j4 | |
windows: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [ Debug, Release ] | |
os: [ windows-2019, windows-latest ] | |
arch: [ Win32, x64 ] | |
modules: [ "OFF", "ON" ] | |
exclude: | |
- os: windows-2019 | |
modules: "ON" | |
name: ${{matrix.os}} ${{matrix.arch}} ${{matrix.build}} ${{matrix.modules}} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: cmake | |
run: cmake -S . -B build -A ${{matrix.arch}} | |
-DCMAKE_BUILD_TYPE=${{matrix.build}} | |
-DSEMVER_BUILD_MODULE=${{matrix.modules}} | |
- name: build | |
run: cmake --build build --config ${{matrix.build}} --parallel 4 | |
- name: test | |
working-directory: build | |
run: ctest -C ${{matrix.build}} -j4 | |
coverage: | |
needs: [ macos, linux, windows ] | |
runs-on: ubuntu-latest | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
CXXFLAGS: "--coverage -fno-inline" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: cmake | |
run: cmake -S . -B build | |
- name: build | |
run: cmake --build build --parallel 4 | |
- name: test | |
working-directory: build | |
run: ctest -j4 | |
- name: lcov | |
working-directory: build | |
run: | | |
sudo apt install lcov | |
lcov -c -d . -o cov.info | |
lcov -l cov.info | |
- name: codecov | |
working-directory: build | |
shell: bash | |
run: bash <(curl -s https://codecov.io/bash) -f cov.info | |