@@ -103,12 +103,24 @@ jobs:
103
103
run : pyright
104
104
working-directory : ./worktree-image
105
105
106
- - name : Build (fallback to non-incremental)
107
- id : build
106
+ - name : Clean (fallback to non-incremental)
107
+ id : clean
108
108
if : always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success'
109
109
run : |
110
110
set -ex
111
- ./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status && make build
111
+ ./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status
112
+ working-directory : ./worktree-image
113
+ env :
114
+ MAKE : make -j2
115
+ SAGE_NUM_THREADS : 2
116
+
117
+ - name : Build
118
+ # This step is needed because building the modularized distributions installs some optional packages,
119
+ # so the editable install of sagelib needs to build the corresponding optional extension modules.
120
+ id : build
121
+ if : always() && (steps.incremental.outcome == 'success' || steps.clean.outcome == 'success')
122
+ run : |
123
+ make build
112
124
working-directory : ./worktree-image
113
125
env :
114
126
MAKE : make -j2
@@ -125,22 +137,22 @@ jobs:
125
137
COLUMNS : 120
126
138
127
139
- name : Test all files (sage -t --all --long)
128
- if : always() && ( steps.incremental.outcome == 'success' || steps. build.outcome == 'success')
140
+ if : always() && steps.build.outcome == 'success'
129
141
run : |
130
142
../sage -python -m pip install coverage
131
143
../sage -python -m coverage run ./bin/sage-runtests --all --long -p2 --random-seed=286735480429121101562228604801325644303
132
144
working-directory : ./worktree-image/src
133
145
134
146
- name : Prepare coverage results
135
- if : always() && ( steps.incremental.outcome == 'success' || steps. build.outcome == 'success')
147
+ if : always() && steps.build.outcome == 'success'
136
148
run : |
137
149
./venv/bin/python3 -m coverage combine src/.coverage/
138
150
./venv/bin/python3 -m coverage xml
139
151
find . -name *coverage*
140
152
working-directory : ./worktree-image
141
153
142
154
- name : Upload coverage to codecov
143
- if : always() && ( steps.incremental.outcome == 'success' || steps. build.outcome == 'success')
155
+ if : always() && steps.build.outcome == 'success'
144
156
uses : codecov/codecov-action@v3
145
157
with :
146
158
files : ./worktree-image/coverage.xml
0 commit comments