Repository navigation
66 lines (61 loc) · 2.19 KB
/
Copy pathdocs.yml
File metadata and controls
66 lines (61 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# SPDX-License-Identifier: MPL-2.0
name: Documentation
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: documentation-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.12'
cache: pip
cache-dependency-path: |
requirements-docs.txt
requirements-codegen.txt
- uses: ./.github/actions/setup-haskell
with:
ghc-version: '9.10.3'
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: build-docs/cabal
key: docs-haddock-${{ hashFiles('hmath.cabal', 'cabal.project', 'src/**', 'cbits/**') }}
restore-keys: docs-haddock-
- name: Build documentation and Haskell reference
run: |
python -m pip install -r requirements-docs.txt
python tools/build_docs.py
- name: Verify Python examples against this source revision
run: |
python -m pip install numpy cffi
python meson-build.py . build-docs/libhmath.so --builddir build-docs/cabal --offline
HMATH_LIBRARY="$PWD/build-docs/libhmath.so" PYTHONPATH="$PWD/bindings/python" python tools/check_docs_examples.py
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: site
deploy:
if: github.repository == 'wavefnd/hmath' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-24.04
concurrency:
group: documentation-pages
cancel-in-progress: false
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4