Fix doctest ci #4
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: | |
| 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 conan gcovr | |
| - name: Test Conan | |
| run: | | |
| conan profile detect --force || true | |
| conan create . | |
| - 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 | |
| - name: Test Meson (Other) | |
| if: runner.os != 'Linux' | |
| run: | | |
| meson setup build_meson | |
| meson compile -C build_meson | |
| meson test -C build_meson | |
| - 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 | |
| - name: Upload to Codecov | |
| if: runner.os == 'Linux' | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |