Check that a cited spec section exists, not just the file it lives in… #477
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: Docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'include/**' | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'include/**' | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| concurrency: | |
| group: docs-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-docs: | |
| name: Build documentation | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -q | |
| sudo apt-get install -y software-properties-common | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update -q | |
| sudo apt-get install -y cmake ninja-build g++-15 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 15 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 15 | |
| # Ubuntu 24.04's apt package is Doxygen 1.9.8, which misreports several | |
| # correctly-documented symbols as undocumented (confirmed: two template | |
| # overloads of the same free function, and a function immediately | |
| # following a file-level doc comment both trip its param/return | |
| # association) -- fixed upstream by 1.15.0. Install a release binary | |
| # instead of relying on the distro package. | |
| - name: Install Doxygen 1.17.0 | |
| run: | | |
| curl -sL https://github.com/doxygen/doxygen/releases/download/Release_1_17_0/doxygen-1.17.0.linux.bin.tar.gz -o /tmp/doxygen.tar.gz | |
| tar -xzf /tmp/doxygen.tar.gz -C /tmp | |
| echo "/tmp/doxygen-1.17.0/bin" >> "$GITHUB_PATH" | |
| - name: Configure (docs target only) | |
| run: | | |
| cmake -S . -B build -G Ninja \ | |
| -DMORPH_BUILD_DOCUMENTATION=ON \ | |
| -DMORPH_BUILD_TESTS=OFF \ | |
| -DMORPH_BUILD_EXAMPLES=OFF | |
| - name: Build documentation (fails on undocumented public symbols) | |
| run: cmake --build build --target doc | |
| - name: Deploy to GitHub Pages | |
| if: github.ref == 'refs/heads/master' | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: build/html/html | |
| clean-exclude: demo/ # preserve the WASM demo published by wasm-demo.yml |