-
-
Notifications
You must be signed in to change notification settings - Fork 696
CI Build & Test: First build incrementally and test changed files only #35652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
4451886
2881586
43fcf4a
f9b4412
f93a4d6
f46d247
cbc0198
b8b235c
f4a6ca0
29a3ae0
7d9af59
a0e18d9
36b9484
5d13d8f
2384f1d
f40fa16
c865882
21c5240
eb0ef34
a423367
506db04
9f30a8d
b13cbf4
136337c
a29d22e
004247c
2e5d4ce
908ad71
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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 | ||||||
| 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 | ||||||
|
|
@@ -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 | ||||||
|
||||||
| - name: Test --all --long | |
| - name: Run all tests |
There was a problem hiding this comment.
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'"
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
mkoeppe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| (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 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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)?