1
+ # TODO!!! Use release branch of Firedrake when building
2
+
1
3
name : Build and push website
2
4
3
5
on :
@@ -20,38 +22,55 @@ jobs:
20
22
build_website :
21
23
name : Run doc build
22
24
runs-on : ubuntu-latest
23
- container :
24
- image : firedrakeproject/firedrake-docdeps:latest
25
- outputs :
26
- conclusion : ${{ steps.report.outputs.conclusion }}
27
25
steps :
28
26
- uses : actions/checkout@v4
29
27
with :
30
28
path : firedrake-repo
31
29
repository : firedrakeproject/firedrake
32
30
31
+ - name : Install system dependencies
32
+ run : |
33
+ apt-get update
34
+ apt-get -y install python3
35
+ apt-get -y install \
36
+ $(python3 ./firedrake-repo/scripts/firedrake-configure \
37
+ --arch ${{ matrix.arch }} --show-system-packages) \
38
+ python3-venv
39
+
40
+ - name : Install PETSc
41
+ run : |
42
+ git clone --depth 1 \
43
+ --branch $(python3 ./firedrake-repo/scripts/firedrake-configure --show-petsc-version) \
44
+ https://gitlab.com/petsc/petsc.git
45
+ cd petsc
46
+ python3 ../firedrake-repo/scripts/firedrake-configure \
47
+ --arch ${{ matrix.arch }} --show-petsc-configure-options | \
48
+ xargs -L1 ./configure --download-slepc
49
+ make PETSC_DIR=/__w/firedrakeproject.github.io/firedrakeproject.github.io/petsc PETSC_ARCH=arch-firedrake-${{ matrix.arch }}
50
+ make check
51
+ {
52
+ echo "PETSC_DIR=/__w/firedrakeproject.github.io/firedrakeproject.github.io/petsc"
53
+ echo "PETSC_ARCH=arch-firedrake-${{ matrix.arch }}"
54
+ echo "SLEPC_DIR=/__w/firedrakeproject.github.io/firedrakeproject.github.io/petsc/arch-firedrake-${{ matrix.arch }}"
55
+ } >> "$GITHUB_ENV"
56
+
33
57
- name : Install Firedrake
34
- id : install
35
58
run : |
36
- python3 -m pip uninstall --break-system-packages -y firedrake
37
- : # Pass '--system-site-packages' so already installed packages can be found
38
- python3 -m venv --system-site-packages venv
59
+ export $(python3 ./firedrake-repo/scripts/firedrake-configure --arch ${{ matrix.arch }} --show-env)
60
+ python3 -m venv venv
39
61
. venv/bin/activate
40
- pip install --verbose './firedrake-repo[docs]'
62
+ pip install --verbose \
63
+ --no-binary h5py \
64
+ --extra-index-url https://download.pytorch.org/whl/cpu \
65
+ './firedrake-repo[docs]'
66
+ pip list
41
67
42
68
- name : Check bibtex
43
69
run : |
44
70
. venv/bin/activate
45
71
make -C firedrake-repo/docs validate-bibtex
46
72
47
- - name : Check documentation links
48
- run : |
49
- . venv/bin/activate
50
- make -C firedrake-repo/docs linkcheck
51
-
52
73
- name : Build docs
53
- id : build
54
- if : success() || steps.install.conclusion == 'success'
55
74
run : |
56
75
. venv/bin/activate
57
76
cd firedrake-repo/docs
@@ -61,31 +80,23 @@ jobs:
61
80
62
81
- name : Copy manual to HTML tree
63
82
id : copy
64
- if : success() || steps.build.conclusion == 'success'
65
83
run : |
66
84
cd firedrake-repo/docs
67
85
cp build/latex/Firedrake.pdf build/html/_static/manual.pdf
68
86
69
87
- name : Upload artifact
70
88
id : upload
71
- if : success() || steps.copy.conclusion == 'success'
72
89
uses : actions/upload-pages-artifact@v3
73
90
with :
74
91
name : github-pages
75
- path : /__w/firedrakeproject.github.io/firedrakeproject.github.io /firedrake-repo/docs/build/html
92
+ path : . /firedrake-repo/docs/build/html
76
93
retention-days : 1
77
-
78
- - name : Report status
79
- id : report
80
- if : success() || steps.upload.conclusion == 'success'
81
- run : echo "conclusion=success" >> "$GITHUB_OUTPUT"
82
94
83
95
deploy :
84
96
name : Deploy Github pages
85
97
needs : build_website
86
98
runs-on : ubuntu-latest
87
- # Always run this workflow on main, even if linkcheck fails
88
- if : always() && github.ref == 'refs/heads/main' && needs.build_website.outputs.conclusion == 'success'
99
+ if : github.ref == 'refs/heads/main'
89
100
permissions :
90
101
pages : write
91
102
id-token : write
0 commit comments