Skip to content
Merged
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: Add comments
  • Loading branch information
Matthias Koeppe committed May 28, 2023
commit f46d247a303306ddafeb352f733fac09035500a6
22 changes: 18 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,27 @@ jobs:
set -ex
git config --global user.email "[email protected]"
git config --global user.name "Build & Test workflow"
# If actions/checkout downloaded using the GitHub REST API:
# If actions/checkout downloaded our source tree using the GitHub REST API
# instead of with git (because do not have git installed in our image),
# we first make the source tree a repo.
if [ ! -d .git ]; then git config --global --add safe.directory $(pwd) && git init && git add -A && git commit --quiet -m "new"; fi
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of this git acrobatics, why not get the list of changed files using say https://github.com/marketplace/actions/get-all-changed-files and then run the tests on each of them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not just for finding the changed files.
This trick makes the build of the Sage library actually incremental!

# Make the source tree from the container image a worktree:
git worktree add --detach worktree-image && git tag -f new
# Tag this state of the source tree "new". This is what we want to build and test.
git tag -f new
# Our container image contains a source tree in /sage with a full build of Sage.
# But /sage is not a git repository.
# We make /sage a worktree whose index is at tag "new".
# We then commit the current sources and set the tag "old". (This keeps all mtimes unchanged.)
# Then we update worktree and index with "git reset --hard".
# (This keeps mtimes of unchanged files unchanged and mtimes of changed files newer than unchanged files.)
# Finally we reset the index to "old". (This keeps all mtimes unchanged.)
# The changed files now show up as uncommitted changes.
git worktree add --detach worktree-image
rm -rf /sage/.git && mv worktree-image/.git /sage/
rm -rf worktree-image && ln -s /sage worktree-image
(cd /sage && git commit --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset old && ./bootstrap && make build && ./sage -t --new -p2)
(cd worktree-image && git commit --allow-empty -m "old" -a && git tag -f old && git reset --hard new && git reset old)
# 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)
env:
MAKE: make -j2
SAGE_NUM_THREADS: 2
Expand Down