Fix doctest ci #6
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: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build-conan: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install conan | |
| shell: bash | |
| - name: Test Conan | |
| run: | | |
| conan profile detect --force || true | |
| conan create . | |
| build-meson: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install meson ninja gcovr | |
| if [ "$RUNNER_OS" == "Linux" ]; then | |
| sudo apt-get update | |
| sudo apt-get install -y doctest-dev | |
| fi | |
| shell: bash | |
| - name: Test Meson (Linux with coverage) | |
| if: runner.os == 'Linux' | |
| run: | | |
| meson setup build_meson -Db_coverage=true | |
| meson compile -C build_meson | |
| meson test -C build_meson | |
| ninja -C build_meson coverage-xml | |
| - name: Test Meson (Other) | |
| if: runner.os != 'Linux' | |
| run: | | |
| meson setup build_meson | |
| meson compile -C build_meson | |
| meson test -C build_meson | |
| - name: Upload to Codecov | |
| if: runner.os == 'Linux' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| build-cmake: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y doctest-dev | |
| shell: bash | |
| - name: Test CMake | |
| run: | | |
| cmake -S . -B build_cmake -DBUILD_TESTING=ON | |
| cmake --build build_cmake | |
| ctest --test-dir build_cmake -C Debug --output-on-failure |