Update GIT_TAG for ipc_toolkit_tests_data and modify expected output … #394
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - docs | |
| jobs: | |
| Docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/[email protected] | |
| with: | |
| fetch-depth: 10 | |
| - name: Set up Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: "3.13" | |
| - name: Requirements | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install doxygen python3-sphinx graphviz ccache | |
| echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV" | |
| python -m pip install --upgrade pip | |
| pip install -r docs/requirements.txt | |
| - name: Cache Build | |
| id: cache-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.CACHE_PATH }} | |
| key: docs-cache | |
| restore-keys: Linux-Python-cache | |
| - name: Prepare Ccache | |
| run: | | |
| ccache --max-size=1.0G | |
| ccache -V && ccache --show-config | |
| ccache --show-stats && ccache --zero-stats | |
| # - name: Build release docs | |
| # run: | | |
| # HEAD=$(git rev-parse HEAD) | |
| # git fetch --all --tags | |
| # cd docs | |
| # for version in $(git tag -l); do | |
| # echo "Processing $version:" | |
| # git checkout $version | |
| # # Fix links | |
| # grep -rli 'url = {https://ipc-sim.github.io/ipc-toolkit/}' ../* | xargs -i@ sed -i 's/ipc-sim.github.io\/ipc-toolkit\//github.com\/ipc-sim\/ipc-toolkit/g' @ | |
| # grep -rli 'ipc-sim.github.io/ipc-toolkit' ../* | xargs -i@ sed -i 's/ipc-sim.github.io\/ipc-toolkit/ipctk.xyz/g' @ | |
| # pip install --force-reinstall -v "ipctk==$version" | |
| # sphinx-build source build/html/$version \ | |
| # -D html_theme_options.version_dropdown=true \ | |
| # -D html_theme_options.version_json=https://ipctk.xyz/versions.json | |
| # # Discard changes | |
| # git reset --hard | |
| # done | |
| # pip uninstall -y ipctk | |
| # git checkout $HEAD | |
| # cp source/_static/versions.json build/html/ | |
| # # Copy the custom.css to each version's build | |
| # for version in $(git tag -l); do | |
| # cp source/_static/css/custom.css build/html/$version/_static/css/ | |
| # done | |
| # cd .. | |
| - name: Copy release docs | |
| run: | | |
| git fetch --all --tags | |
| # Checkout the versioned docs from the gh-pages branch | |
| git checkout origin/gh-pages -- 'v*' | |
| # Move the versioned docs to the build directory | |
| mkdir -p docs/build/html | |
| mv v* docs/build/html/ | |
| # Copy the custom.css to each version's build | |
| for version in $(git tag -l); do | |
| cp docs/source/_static/css/custom.css docs/build/html/$version/_static/css/ | |
| done | |
| # Copy versions.json to the root of the build | |
| cp docs/source/_static/versions.json docs/build/html/ | |
| - name: Build ipctk | |
| run: | | |
| pip install --verbose . | |
| ccache --show-stats | |
| - name: Build docs | |
| run: | | |
| cd docs | |
| make html | |
| cd build/html | |
| touch .nojekyll | |
| - name: Deploy | |
| uses: JamesIves/[email protected] | |
| with: | |
| branch: gh-pages # The branch the action should deploy to. | |
| folder: docs/build/html # The folder the action should deploy. |