Fix CI deprecation warning #607
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: CI | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: environment-${{github.ref}} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: ${{matrix.platform.name}} ${{matrix.type.name}} ${{matrix.config.name}} | |
runs-on: ${{matrix.platform.os}} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { name: Windows MSVC, os: windows-latest } | |
- { name: Windows ClangCL, os: windows-latest, flags: -T ClangCL } | |
- { name: Windows Clang, os: windows-latest, flags: -GNinja -DCMAKE_CXX_COMPILER=clang++ } | |
- { name: Linux GCC, os: ubuntu-latest } | |
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_CXX_COMPILER=clang++ } | |
- { name: macOS GCC, os: macos-latest, flags: -DCMAKE_CXX_COMPILER=g++-12 } | |
- { name: macOS Clang, os: macos-latest, flags: -GXcode } | |
type: | |
- { name: Shared, flags: "ON" } | |
- { name: Static, flags: "OFF" } | |
config: | |
- { name: Debug } | |
- { name: Release } | |
steps: | |
- name: Get CMake and Ninja | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: 3.22 | |
ninjaVersion: latest | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake --preset dev ${{matrix.platform.flags}} -DBUILD_SHARED_LIBS=${{matrix.type.flags}} -DCMAKE_BUILD_TYPE=${{matrix.config.name}} -DCMAKE_VERBOSE_MAKEFILE=ON | |
- name: Build | |
run: cmake --build --preset dev --config ${{matrix.config.name}} | |
- name: Test | |
run: ctest --preset dev --build-config ${{matrix.config.name}} | |
coverage: | |
name: Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake --preset coverage | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
run: ctest --test-dir build --output-on-failure | |
- name: Install Dependencies | |
run: sudo apt install gcovr | |
- name: Generate Coverage Report | |
run: gcovr -x build/coverage.out -s -f 'src/.*' -f 'include/argon/.*' . | |
- name: Upload Coverage Report | |
uses: codecov/codecov-action@v4 | |
with: | |
directory: build | |
files: ./build/coverage.out | |
format: | |
name: clang-format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake --preset clang-tools | |
- name: Format | |
run: | | |
cmake --build build --target format | |
git diff --exit-code | |
tidy: | |
name: clang-tidy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake --preset clang-tools | |
- name: Tidy | |
run: cmake --build build --target tidy | |
sanitize: | |
name: ${{matrix.sanitizer.name}} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
sanitizer: | |
- { name: ASan, preset: asan } | |
- { name: UBSan, preset: ubsan } | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake --preset ${{matrix.sanitizer.preset}} | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
run: ctest --test-dir build --output-on-failure | |
docs: | |
name: Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Doxygen | |
run: sudo apt install doxygen graphviz | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake -B build | |
- name: Build Doxygen Site | |
run: cmake --build build --target docs |