Skip to content

Improve clobber.sh #719

Improve clobber.sh

Improve clobber.sh #719

Workflow file for this run

name: Documentation
on:
# Triggers the workflow on push or pull request
push:
branches: [main]
pull_request:
branches: [main]
types:
- opened
- reopened
- synchronize
- closed # This is important for the ghpage preview to clean up after itself
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Newer commits should cancel old runs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- run: sudo apt install graphviz
- run: pip install -r requirements.txt
- name: Install PyTorch
run: pip install torch==2.2.2
- run: |
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_UNITY_BUILD=ON \
-DNEML2_TESTS=OFF \
-DNEML2_RUNNER=OFF \
-DNEML2_PYBIND=ON \
-DNEML2_DOC=ON \
-B build \
.
- run: cmake --build build --target html -j 2 --
- run: cat build/doc/doxygen.html.log
- run: cat build/doc/doxygen.python.log
- name: Preview GitHub Pages
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: build/doc/build/html
- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'push' }}
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages
folder: build/doc/build/html
clean-exclude: pr-preview/
force: false
- name: Scold users about missing docs
if: ${{ github.event_name == 'pull_request'}}
uses: thollander/actions-comment-pull-request@v2
with:
filePath: build/doc/syntax_error.log
comment_tag: doc_scold
GITHUB_TOKEN: ${{ secrets.PR_ACTION }}
- name: Error if syntax errors were detected
run: grep -q "No syntax error" build/doc/syntax_error.log