Switch C++ standard to C++23 #612
Workflow file for this run
This file contains hidden or 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: Build argparse | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-15, ubuntu-24.04, windows-latest] | |
| type: [Debug, Release] | |
| compiler: [cl, clang++, g++-14] | |
| exclude: | |
| - os: macos-15 | |
| compiler: cl | |
| - os: macos-15 | |
| compiler: clang++ | |
| - os: ubuntu-24.04 | |
| compiler: cl | |
| - os: windows-latest | |
| compiler: clang++ | |
| - os: windows-latest | |
| compiler: g++-14 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} | |
| - name: CMake build | |
| if: runner.os == 'macOS' | |
| run: cmake --build build | |
| - name: CMake build | |
| if: runner.os != 'macOS' | |
| run: cmake --build build --parallel | |
| clangtidy: | |
| if: false # disable as it takes way too much time | |
| name: "clang-tidy" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install clang-tidy | |
| run: | | |
| sudo apt update | |
| sudo apt install -y clang-tidy | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_CLANG_TIDY="clang-tidy;-checks=-*,clang-analyzer-*,modernize-*;-warnings-as-errors=*" | |
| - name: CMake build | |
| run: cmake --build build --parallel | |
| clang-sanitisers: | |
| name: "clang-sanitisers" | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| type: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined,alignment,array-bounds -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined,alignment,array-bounds | |
| - name: CMake build | |
| run: cmake --build build --parallel --target run-unit-test | |
| gcc-sanitisers: | |
| name: "gcc-sanitisers" | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| type: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_CXX_FLAGS=-fsanitize=address,undefined,leak -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined,leak | |
| - name: CMake build | |
| run: cmake --build build --parallel --target run-unit-test | |
| msvc-sanitisers: | |
| name: "msvc-sanitisers" | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| type: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_CXX_FLAGS="/fsanitize=address /EHsc" | |
| - name: CMake build | |
| run: cmake --build build --parallel --target run-unit-test | |
| valgrind: | |
| name: "Valgrind" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Valgrind | |
| run: | | |
| sudo apt update | |
| sudo apt install -y valgrind | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 | |
| - name: CMake build | |
| run: cmake --build build --parallel --target unittest | |
| - name: Run Valgrind | |
| run: valgrind ./build/test/unittest/unittest | |
| coverage: | |
| name: "Coverage" | |
| runs-on: ubuntu-24.04 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install lcov | |
| run: | | |
| sudo apt update | |
| sudo apt install -y lcov | |
| - name: CMake configure | |
| run: cmake -Bbuild -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-14 -DCMAKE_CXX_COMPILER=g++-14 -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage | |
| - name: CMake build | |
| run: cmake --build build --parallel --target run-unit-test | |
| - name: Generate coverage | |
| run: | | |
| lcov --directory build --capture --gcov-tool gcov-14 --output-file coverage.info --ignore-errors mismatch | |
| lcov --list coverage.info | |
| lcov --extract coverage.info --output-file argparse.info *argparse.hpp | |
| lcov --list argparse.info | |
| bash <(curl -s https://codecov.io/bash) -f argparse.info |