ci: fix docs generation #25
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: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure | |
run: cmake -B build -DXCLOX_CODE_COVERAGE=ON | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
run: ctest --test-dir build/test --rerun-failed -V | |
- name: Generate Coverage Report | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install -y lcov | |
lcov --capture --directory . --output-file=coverage.info | |
lcov --extract coverage.info '*/Xclox/include/*' '*/Xclox/test/ntp/tools/*' --output-file coverage.txt | |
- name: Upload Coverage to Codecov | |
if: matrix.os == 'ubuntu-latest' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.txt | |
verbose: true | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: sudo apt-get install -y doxygen graphviz | |
- name: Generate Documentation | |
run: doxygen | |
- name: Publish Documentation | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./doc/html |