@@ -14,149 +14,14 @@ jobs:
1414 access_token : ${{ github.token }}
1515
1616 build-docs :
17- name : DEPRECATED build ${{ matrix.package }} ${{ matrix.version }} docs
18- needs : cancel-superseded
19- runs-on : ubuntu-24.04
20- strategy :
21- fail-fast : false
22- matrix :
23- package : [tscompare, pyslim]
24- version : [stable]
25-
26- include :
27-
28- - package : tscompare
29- cache-version : v2
30- requirements-path : requirements/CI-docs-pip/requirements.txt
31-
32- - package : pyslim
33- cache-version : v7
34- additional-setup : |
35- sudo apt-get update
36- sudo apt-get install -y inkscape
37- git clone https://github.com/messerlab/SLiM.git
38- mkdir -p SLiM/Release
39- cd SLiM/Release
40- cmake -D CMAKE_POLICY_VERSION_MINIMUM=3.5 -D CMAKE_BUILD_TYPE=Release ..
41- make -j 2
42- sudo make install
43-
44-
45- steps :
46- - uses : actions/checkout@v4.2.2
47- name : Checkout ${{ matrix.package }}
48- with :
49- ref : ${{ matrix.version == 'latest' && 'main' || '' }}
50- repository : tskit-dev/${{ matrix.package }}
51- submodules : true
52- fetch-depth : 0
53-
54- - name : Checkout stable tag
55- if : matrix.version == 'stable'
56- run : |
57- git fetch --tags --recurse-submodules=no
58- # Choose a stable tag; optionally allow pre-releases via matrix.allow-pre-stable.
59- if [ "${{ matrix.allow-pre-stable }}" = "true" ]; then
60- tag=$(git tag --list --sort=creatordate | tail -n1)
61- else
62- tag=$(git tag --list --sort=creatordate | grep -vi "[baC]" | tail -n1)
63- if [ -z "$tag" ]; then
64- tag=$(git tag --list --sort=creatordate | tail -n1)
65- fi
66- fi
67- echo "CHECKOUT_TAG=$tag"
68- git checkout "$tag"
69- git submodule update --init --recursive
70-
71- - name : Show ref/sha/tag
72- run : |
73- echo "package=${{ matrix.package }}"
74- echo "version=${{ matrix.version }}"
75- echo "GITHUB_REF=${GITHUB_REF}"
76- echo "GITHUB_SHA=${GITHUB_SHA}"
77- echo "HEAD=$(git rev-parse HEAD)"
78- echo "DESCRIBE=$(git describe --tags --always --dirty || true)"
79- echo "Latest tags:"
80- git tag --list --sort=creatordate | tail -n5
81-
82- - name : Get commit SHA1 for cache
83- run : git rev-parse HEAD > SHA1
84-
85- - uses : actions/cache@v4.2.2
86- id : docs-cache
87- name : Docs cache
88- with :
89- path : dist
90- key : ${{ matrix.package }}-${{ matrix.version }}-docs-v4-${{ matrix.cache-version }}-${{ hashFiles('SHA1') }}
91-
92- - name : Install uv and set the python version
93- uses : astral-sh/setup-uv@v6
94- with :
95- python-version : 3.11
96- version : " 0.8.15"
97-
98- - name : Install deps
99- if : steps.docs-cache.outputs.cache-hit != 'true'
100- run : |
101- uv venv
102- # These can be removed after everything has had a release
103- if [ -f "${{ matrix.requirements-path }}" ]; then
104- uv pip install -r ${{ matrix.requirements-path }}
105- elif [ -f requirements/CI-docs/requirements.txt ]; then
106- uv pip install -r requirements/CI-docs/requirements.txt
107- elif [ -f pyproject.toml ]; then
108- uv pip install -r pyproject.toml --extra docs
109- elif [ -f python/pyproject.toml ]; then
110- uv pip install -r python/pyproject.toml --extra docs
111- else
112- echo "No requirements found"
113- exit 1
114- fi
115-
116- - name : Additional setup
117- if : steps.docs-cache.outputs.cache-hit != 'true' && matrix.additional-setup
118- run : ${{ matrix.additional-setup }}
119-
120- - name : Build C module
121- if : steps.docs-cache.outputs.cache-hit != 'true' && matrix.make-command
122- run : |
123- source .venv/bin/activate
124- ${{ matrix.make-command }}
125-
126- - name : Build Docs
127- if : steps.docs-cache.outputs.cache-hit != 'true'
128- run : |
129- source .venv/bin/activate
130- cd ${{ matrix.subdir || '.' }}
131- uv pip install -e .
132- if ${{ matrix.subdir || 'false' }}; then
133- cd ..
134- fi
135- cd docs
136- make dist
137- git checkout .
138-
139- - name : Copy docs
140- if : steps.docs-cache.outputs.cache-hit != 'true'
141- run : |
142- mkdir -p dist/${{ matrix.package }}/docs
143- cp -r docs/_build/html dist/${{ matrix.package }}/docs/${{ matrix.version }}
144-
145- - name : Upload docs
146- uses : actions/upload-artifact@v4.6.1
147- with :
148- name : ${{ matrix.package }}-${{ matrix.version }}-docs
149- path : dist
150-
151- build-docs-new :
15217 name : Build ${{ matrix.package }} ${{ matrix.version }} docs
15318 needs : cancel-superseded
15419 runs-on : ubuntu-24.04
15520 strategy :
15621 fail-fast : false
15722 matrix :
158- package : [msprime, tsinfer, tskit, tstrait, tsbrowse, tszip, kastore, tscompare, tsdate, sc2ts] # , pyslim
159- version : [latest]
23+ package : [msprime, tsinfer, tskit, tstrait, tsbrowse, tszip, kastore, tscompare, tsdate, sc2ts, pyslim]
24+ version : [latest, stable ]
16025 include :
16126 - package : msprime
16227 additional-apt-packages : libgsl0-dev
@@ -167,9 +32,13 @@ jobs:
16732
16833 - package : tskit
16934 additional-apt-packages : doxygen
170- pre-build-command : cd docs/doxygen && doxygen
17135 pyproject-directory : python
172- cache-version : v18
36+ cache-version : v1
37+
38+ - package : kastore
39+ additional-apt-packages : doxygen
40+ pyproject-directory : python
41+ cache-version : v2
17342
17443 - package : tstrait
17544 cache-version : v6
@@ -194,58 +63,6 @@ jobs:
19463 cache-version : v8
19564 install-slim : true
19665
197- - package : kastore
198- additional-apt-packages : doxygen
199- pyproject-directory : python
200- pre-build-command : cd docs/doxygen && doxygen
201- cache-version : v1
202-
203- # Stable builds: add an explicit entry per package as it is migrated.
204- # Add "stable" to the list above when done and delete this section
205- - package : kastore
206- version : stable
207- additional-apt-packages : doxygen
208- pyproject-directory : python
209- pre-build-command : cd docs/doxygen && doxygen
210- cache-version : v2
211-
212- - package : tszip
213- version : stable
214- cache-version : v7
215-
216- - package : tstrait
217- version : stable
218- cache-version : v1
219-
220- - package : msprime
221- version : stable
222- additional-apt-packages : libgsl0-dev
223- cache-version : v12
224-
225- - package : tsinfer
226- version : stable
227- cache-version : v14
228-
229- - package : sc2ts
230- version : stable
231- cache-version : v4
232-
233- - package : tsbrowse
234- version : stable
235- pre-build-command : uv run --locked --no-default-groups --group=docs playwright install --with-deps chromium
236- cache-version : v4
237-
238- - package : tsdate
239- version : stable
240- cache-version : v10
241-
242- - package : tskit
243- version : stable
244- additional-apt-packages : doxygen
245- pre-build-command : cd docs/doxygen && doxygen
246- pyproject-directory : python
247- cache-version : v18
248-
24966 steps :
25067 - name : Checkout ${{ matrix.package }}
25168 uses : actions/checkout@v4.2.2
0 commit comments