Skip to content

Commit cd6f6b8

Browse files
author
Release Manager
committed
gh-36016: CI Build & Test: Fix test errors involving optional packages coxeter3, ... <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> These errors have started to show up after #35661 was merged. Optional packages such as `coxeter3` are installed as a side effect of testing distributions such as sagemath-coxeter. Hence the doctests marked `# optional - coxeter3` are activated. Here we ensure that the corresponding extension modules are also installed in the venv where the doctests run. <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36016 Reported by: Matthias Köppe Reviewer(s): Kwankyu Lee, Matthias Köppe
2 parents 3d2a141 + b194d33 commit cd6f6b8

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,24 @@ jobs:
103103
run: pyright
104104
working-directory: ./worktree-image
105105

106-
- name: Build (fallback to non-incremental)
107-
id: build
106+
- name: Clean (fallback to non-incremental)
107+
id: clean
108108
if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success'
109109
run: |
110110
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
112124
working-directory: ./worktree-image
113125
env:
114126
MAKE: make -j2
@@ -125,22 +137,22 @@ jobs:
125137
COLUMNS: 120
126138

127139
- 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'
129141
run: |
130142
../sage -python -m pip install coverage
131143
../sage -python -m coverage run ./bin/sage-runtests --all --long -p2 --random-seed=286735480429121101562228604801325644303
132144
working-directory: ./worktree-image/src
133145

134146
- name: Prepare coverage results
135-
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
147+
if: always() && steps.build.outcome == 'success'
136148
run: |
137149
./venv/bin/python3 -m coverage combine src/.coverage/
138150
./venv/bin/python3 -m coverage xml
139151
find . -name *coverage*
140152
working-directory: ./worktree-image
141153

142154
- name: Upload coverage to codecov
143-
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
155+
if: always() && steps.build.outcome == 'success'
144156
uses: codecov/codecov-action@v3
145157
with:
146158
files: ./worktree-image/coverage.xml

0 commit comments

Comments
 (0)