Disables testing when building documentation #28
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
# This workflow deploys the Doxygen documentation to the | |
# github pages for this project. | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
docs: | |
name: Generate documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt install doxygen | |
name: Install Doxygen | |
- name: Configure | |
run: cmake -S . -B build -DBUILD_DOCS=ON -DBUILD_TESTING=OFF | |
- name: Build | |
run: cmake --build build --target docs | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docs-html | |
path: build/html | |
coverage: | |
name: Generate coverage report | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: sudo apt install check gcovr | |
- uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake -S . -B build -DBUILD_COVERAGE=ON | |
- name: Build | |
run: cmake --build build | |
- name: Run tests | |
run: ctest --test-dir build | |
- name: Generate coverage report with gcovr | |
run: | | |
mkdir html | |
cd build | |
gcovr --html-details ../html/coverage.html -r .. | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-html | |
path: html | |
combine: | |
name: Combine site parts | |
runs-on: ubuntu-latest | |
needs: [docs, coverage] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: docs-html | |
path: html | |
- uses: actions/download-artifact@v4 | |
with: | |
name: coverage-html | |
path: html | |
- uses: actions/upload-pages-artifact@v3 | |
with: | |
path: html | |
deploy: | |
name: Deploy documentation to Github Pages | |
needs: combine | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/deploy-pages@v4 |