Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4451886
.github/workflows/build.yml: First build really incrementally and tes…
mkoeppe May 19, 2023
2881586
src/sage/doctest/control.py: Make 'sage -t --new' work in git worktrees
mkoeppe May 19, 2023
43fcf4a
.github/workflows/build.yml: Run non-incremental tests with --long
mkoeppe May 19, 2023
f9b4412
.github/workflows/build.yml: Explicitly run bootstrap before the incr…
mkoeppe May 26, 2023
f93a4d6
.github/workflows/build.yml: Explicitly run bootstrap before the incr…
mkoeppe May 27, 2023
f46d247
.github/workflows/build.yml: Add comments
mkoeppe May 28, 2023
cbc0198
.github/workflows/build.yml: Add comments (fixup)
mkoeppe May 28, 2023
b8b235c
Merge remote-tracking branch 'upstream/develop' into ci_more_incremental
mkoeppe Jun 4, 2023
f4a6ca0
.github/workflows/doc-build.yml: Build incrementally
mkoeppe Jun 5, 2023
29a3ae0
build/pkgs/maxima/spkg-install.in: Patch out self-race
mkoeppe Jun 5, 2023
7d9af59
Fix up git acrobatics
mkoeppe Jun 5, 2023
a0e18d9
build/pkgs/info/spkg-configure.m4: Remove info file created in test
mkoeppe Jun 5, 2023
36b9484
.github/workflows/doc-publish.yml: Show link to CHANGES.html
mkoeppe Jun 5, 2023
5d13d8f
.github/workflows/doc-build.yml: Normalize Sage version in output bef…
mkoeppe Jun 6, 2023
2384f1d
.github/workflows/doc-build.yml: Fix path
mkoeppe Jun 6, 2023
f40fa16
.github/workflows/doc-build.yml: Ignore some generated files for diff
mkoeppe Jun 6, 2023
c865882
sage -t --new: Handle '# sage.doctest: optional' directives
mkoeppe Jun 6, 2023
21c5240
build/pkgs/{ecl,maxima}: Make info an order-only dependency
mkoeppe Jun 6, 2023
eb0ef34
.github/workflows/doc-build.yml: Fall back to non-incremental build&d…
mkoeppe Jun 6, 2023
a423367
.github/workflows/build.yml: Also do the main test in worktree-image
mkoeppe Jun 6, 2023
506db04
.github/workflows/build.yml: Remove an obsolete step
mkoeppe Jun 7, 2023
9f30a8d
.github/workflows/doc-build.yml: Include diff in zip
mkoeppe Jun 7, 2023
b13cbf4
.github/workflows/doc-build.yml: Reduce verbosity
mkoeppe Jun 7, 2023
136337c
.github/workflows/doc-build.yml: Remove redundant bootstrap
mkoeppe Jun 7, 2023
a29d22e
Add note on a doctest that randomly behaves
kwankyu Jun 12, 2023
004247c
Merge branch 'fix-doctest' into ci_more_incremental
mkoeppe Jun 12, 2023
2e5d4ce
.github/workflows/doc-build.yml: Build docs non-incrementally
mkoeppe Jun 12, 2023
908ad71
.github/workflows/build.yml: Reword test steps
mkoeppe Jun 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
.github/workflows/build.yml: Also do the main test in worktree-image
  • Loading branch information
Matthias Koeppe committed Jun 6, 2023
commit a423367223d9367608ff520064098457bfa2470f
47 changes: 27 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,49 +66,55 @@ jobs:
if [ ! -f worktree-image/.gitignore ]; then cp .gitignore worktree-image/; fi
(cd worktree-image && git add -A && git commit --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset old)

- name: Incremental build and test
- name: Incremental build and test --new
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Incremental build and test --new
- name: Incremental build and test changed files

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about test changed files (--new)?

id: incremental
run: |
# Now re-bootstrap and build. The build is incremental because we were careful with the timestamps.
# We run tests with "sage -t --new"; this only tests the uncommitted changes.
(cd worktree-image && ./bootstrap && make build && ./sage -t --new -p2)
./bootstrap && make build && ./sage -t --new -p2
working-directory: ./worktree-image
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2

- name: Configure new tree
if: always() && steps.prepare.outcome == 'success'
if: always() && steps.worktree.outcome == 'success'
run: |
# Reuse built SAGE_LOCAL contained in the Docker image
./bootstrap
./configure --enable-build-as-root --prefix=/sage/local --with-sage-venv --enable-editable --enable-download-from-upstream-url

- name: Build and test modularized distributions
if: always() && steps.prepare.outcome == 'success'
if: always() && steps.worktree.outcome == 'success'
run: make V=0 tox && make pypi-wheels
working-directory: ./worktree-image
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2

- name: Set up node to install pyright
if: always() && steps.prepare.outcome == 'success'
if: always() && steps.worktree.outcome == 'success'
uses: actions/setup-node@v3
with:
node-version: '12'

- name: Install pyright
if: always() && steps.prepare.outcome == 'success'
if: always() && steps.worktree.outcome == 'success'
# Fix to v232 due to bug https://github.com/microsoft/pyright/issues/3239
run: npm install -g [email protected]

- name: Static code check with pyright
if: always() && steps.prepare.outcome == 'success'
run: pyright

- name: Build
if: always() && steps.worktree.outcome == 'success'
run: pyright
working-directory: ./worktree-image

- name: Build (fallback to non-incremental)
id: build
if: always() && steps.prepare.outcome == 'success'
run: make build
if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success'
run: |
set -ex
./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status && make build
working-directory: ./worktree-image
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2
Expand All @@ -118,27 +124,28 @@ jobs:
run: |
../sage -python -m pip install coverage pytest-xdist
../sage -python -m coverage run -m pytest -c tox.ini --doctest-modules || true
working-directory: ./src
working-directory: ./worktree-image/src
env:
# Increase the length of the lines in the "short summary"
COLUMNS: 120

- name: Test
if: always() && steps.build.outcome == 'success'
- name: Test --all --long
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: Test --all --long
- name: Run all tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what is better. "all" is not clear enough because in our terminology it does not include the long tests. I used the flags to be precise

How about "Run 'sage -t --all --long'"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about Test all files (--all --long)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've committed something along these lines in 908ad71

if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
run: |
../sage -python -m pip install coverage
../sage -python -m coverage run ./bin/sage-runtests --all --long -p2 --random-seed=286735480429121101562228604801325644303
working-directory: ./src
working-directory: ./worktree-image/src

- name: Prepare coverage results
if: always() && steps.build.outcome == 'success'
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
run: |
./venv/bin/python3 -m coverage combine src/.coverage/
./venv/bin/python3 -m coverage xml
find . -name *coverage*

working-directory: ./worktree-image

- name: Upload coverage to codecov
if: always() && steps.build.outcome == 'success'
if: always() && (steps.incremental.outcome == 'success' || steps.build.outcome == 'success')
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
files: ./worktree-image/coverage.xml
10 changes: 6 additions & 4 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,23 @@ jobs:
# Keep track of changes to built HTML
(cd /sage/local/share/doc/sage/html/en && find . -name "*.html" | xargs sed -i '/class="sidebar-brand-text"/s/Sage [0-9a-z.]* /Sage dev /'; git init && (echo ".buildinfo"; echo ".inv") > .gitignore; git add -A && git commit -m "old")

- name: Incremental build
- name: Incremental build and docbuild
id: incremental
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think incremental docbuild may introduce broken links (inter-file references) though build succeeds. Better to go to the build step straight.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Done in 2e5d4ce.

run: |
# Now re-bootstrap and build. The build is incremental because we were careful with the timestamps.
(cd worktree-image && ./bootstrap && make doc-html)
./bootstrap && make doc-html
working-directory: ./worktree-image
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2

- name: Build (fallback to non-incremental)
- name: Build and docbuild (fallback to non-incremental)
id: build
if: always() && steps.worktree.outcome == 'success' && steps.incremental.outcome != 'success'
run: |
set -ex
(cd worktree-image && ./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status && make doc-html)
./bootstrap && make doc-clean doc-uninstall sagelib-clean && git clean -fx src/sage && ./config.status && make doc-html
working-directory: ./worktree-image
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2
Expand Down