-
-
Notifications
You must be signed in to change notification settings - Fork 478
238 lines (219 loc) · 8.43 KB
/
ci-linux.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
name: CI Linux
## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
## whenever a GitHub pull request is opened or synchronized in a repository
## where GitHub Actions are enabled.
##
## It builds and checks some sage spkgs as defined in TARGETS.
##
## A job succeeds if there is no error.
##
## The build is run with "make V=0", so the build logs of individual packages are suppressed.
##
## At the end, all package build logs that contain an error are printed out.
##
## After all jobs have finished (or are canceled) and a short delay,
## tar files of all logs are made available as "build artifacts".
#on: [push, pull_request]
on:
push:
tags:
- '*'
workflow_dispatch:
# Allow to run manually
env:
TARGETS_PRE: all-sage-local
TARGETS: build doc-html
TARGETS_OPTIONAL: ptest
permissions:
packages: write
jobs:
# standard-pre and standard (without ptest) for the default platform (used by build.yml etc.)
default:
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
free_disk_space: true
docker_targets: "with-system-packages configured with-targets-pre with-targets"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
targets: build doc-html
targets_optional: ptest
tox_system_factors: >-
["ubuntu-jammy"]
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# All platforms. This duplicates the default platform, but why not,
# it makes it more robust regarding random timeouts.
standard-pre:
if: ${{ success() || failure() }}
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
docker_targets: "with-system-packages configured with-targets-pre"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# Make sure that all "standard-pre" jobs can start simultaneously,
# so that runners are available by the time that "default" starts.
max_parallel: 50
standard:
if: ${{ success() || failure() }}
needs: [standard-pre]
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
# FIXME: duplicated from env.TARGETS
targets: build doc-html
targets_optional: ptest
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# Reduce from 30 to 20 because it runs in parallel with 'standard-sitepackages'
# and 'minimal-pre' below
max_parallel: 20
standard-sitepackages:
if: ${{ success() || failure() }}
needs: [standard-pre]
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
# FIXME: duplicated from env.TARGETS
targets: build doc-html
targets_optional: ptest
tox_packages_factors: >-
["standard-sitepackages"]
# Only test systems with a usable system python (>= 3.9)
tox_system_factors: >-
["ubuntu-jammy",
"ubuntu-lunar",
"ubuntu-mantic",
"debian-bookworm",
"debian-trixie",
"debian-sid",
"linuxmint-21.1",
"linuxmint-21.2",
"fedora-38",
"fedora-39",
"centos-stream-8-python3.9",
"centos-stream-9-python3.9",
"almalinux-8-python3.9",
"gentoo-python3.10",
"gentoo-python3.11",
"archlinux-latest",
"opensuse-15.5-gcc_11-python3.11",
"opensuse-tumbleweed-python3.10",
"opensuse-tumbleweed"]
docker_push_repository: ghcr.io/${{ github.repository }}/
max_parallel: 8
minimal-pre:
if: ${{ success() || failure() }}
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
docker_targets: "with-system-packages configured with-targets-pre"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
tox_packages_factors: >-
["minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
# Reduced from 30 because it may run in parallel with 'standard' and 'standard-sitepackages' above.
# Calibrated for clogging the job pipeline until the "default" job has finished.
max_parallel: 24
minimal:
if: ${{ success() || failure() }}
needs: [minimal-pre]
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from previous stage (pre)
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
docker_targets: "with-targets with-targets-optional"
# FIXME: duplicated from env.TARGETS
targets: build doc-html
targets_optional: ptest
tox_packages_factors: >-
["minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
max_parallel: 24
maximal-pre:
if: ${{ success() || failure() }}
needs: [minimal]
uses: ./.github/workflows/docker.yml
with:
free_disk_space: true
# Build from scratch
docker_targets: "with-system-packages configured with-targets-pre"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
tox_packages_factors: >-
["maximal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
optional-0-o:
if: ${{ success() || failure() }}
needs: [maximal-pre]
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
["maximal"]
docker_targets: "with-targets-optional"
# [0-9a-o] excludes _, in particular package _develop
targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :optional: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep ^[0-9a-o]))'
optional-p-z:
if: ${{ success() || failure() }}
needs: [optional-0-o]
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
["maximal"]
docker_targets: "with-targets-optional"
# [0-9a-o] excludes _, in particular package _develop
targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :optional: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep ^[p-z]))'
experimental-0-o:
if: ${{ success() || failure() }}
needs: [optional-p-z]
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
["maximal"]
docker_targets: "with-targets-optional"
targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :experimental: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep ^[0-9a-o]))'
experimental-p-z:
if: ${{ success() || failure() }}
needs: [experimental-0-o]
uses: ./.github/workflows/docker.yml
with:
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/${{ github.repository }}/
from_docker_target: "with-targets-pre"
tox_packages_factors: >-
["maximal"]
docker_targets: "with-targets-optional"
targets_optional: '$(echo $(export PATH=build/bin:$PATH && sage-package list :experimental: --has-file "spkg-install.in|spkg-install|requirements.txt" --no-file "huge|has_nonfree_dependencies" | grep -v sagemath_doc | grep ^[p-z]))'