-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
CI build, doc-build: Run containers explicitly, separate jobs for pyright, build, modularized tests, long tests #36498
CI build, doc-build: Run containers explicitly, separate jobs for pyright, build, modularized tests, long tests #36498
Conversation
65f827e
to
118bd40
Compare
|
via #36443 |
I don't get the point of this PR. It seems to mostly complicate the setup and essentially reimplements the container feature of github. For the out-of-space issue it would be nice to first know what's the route cause to be able to evaluate if steps to fixing it go into the correct direction. For potential speedups by caching the docker image, I'm not sure if this is really needed. Yes, from a conceptual viewpoint you only want to build sagelib once, and then reuse it - but well, it mostly takes 2-10 mins of incremental compilation anyway. Personally, I think we have more pressing issues with the ci setup and better not introduce more moving parts (atm at least). |
It's really not very complicated. GitHub runs the container from its very full runner image. We know that it does not have enough space for our large containers. |
That's right. The declarative |
Actually, the compilation can take much longer when low level parts of sagelib are touched, and when certain packages are updated. |
Github provides 14gb of space (after its runner image), that should be sufficient (and was sufficient) to run a 7gb image in it and install sage. Also our image got bigger by a few houndred mbs. |
If you want to understand more details, I'd suggest that you experiment with the space parameters in https://github.com/sagemath/sage/blob/develop/.github/workflows/docker.yml#L148 |
It's already quite easy to run commands outside the container. Here is an example for exactly your first use case: https://github.com/osquery/osquery/blob/a916e80a895f8abb9b749161d774d528d0466b31/.github/workflows/hosted_runners.yml#L257-L263 I don't think we need more flexibility. |
…able.txt.m4: Copy from sagemath#35095
Bump up the bumpable actions. Should be complete in conjunction with sagemath#37474. Note: `potiuk/get-workflow-origin` is not maintained anymore and throws warnings. - Depends on sagemath#36498 (merged here) URL: sagemath#37818 Reported by: gmou3 Reviewer(s): Dima Pasechnik
Bump up the bumpable actions. Should be complete in conjunction with sagemath#37474. Note: `potiuk/get-workflow-origin` is not maintained anymore and throws warnings. - Depends on sagemath#36498 (merged here) URL: sagemath#37818 Reported by: gmou3 Reviewer(s): Dima Pasechnik
Bump up the bumpable actions. Should be complete in conjunction with sagemath#37474. Note: `potiuk/get-workflow-origin` is not maintained anymore and throws warnings. - Depends on sagemath#36498 (merged here) URL: sagemath#37818 Reported by: gmou3 Reviewer(s): Dima Pasechnik
Bump up the bumpable actions. Should be complete in conjunction with sagemath#37474. Note: `potiuk/get-workflow-origin` is not maintained anymore and throws warnings. - Depends on sagemath#36498 (merged here) URL: sagemath#37818 Reported by: gmou3 Reviewer(s): Dima Pasechnik
Bump up the bumpable actions. Should be complete in conjunction with sagemath#37474. Note: `potiuk/get-workflow-origin` is not maintained anymore and throws warnings. - Depends on sagemath#36498 (merged here) URL: sagemath#37818 Reported by: gmou3 Reviewer(s): Dima Pasechnik
Running the containers explicitly, instead of using the declarative
container:
feature of GH Actions gives us more control:We split out static type checking with pyright into its separate workflow:
The workflow build.yml first launches a job:
Dockerfile
and https://github.com/marketplace/actions/build-and-push-docker-images) and does the quick incremental test. This completes within 10 to 20 minutes when there's no change.After this is completed, more jobs are launched:
The workflows doc-build.yml and doc-build-pdf.yml again build incrementally and then build the documentation. The diffing code for the HTML documentation now runs in the host, not the container, which simplifies things. (To show that diffing still works, we include a small change to the Sage library.)
Splitting the workflow jobs implements @kwankyu's suggestion from:
The steps "again builds incrementally" actually use the GH Actions cache, https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api. When nothing is cached and the 3 workflows are launched in parallel, they may each build the same thing. But when there's congestion that leads to the workflows to be run serially, the 2nd and 3rd workflow will be able to use the cache from the 1st workflow. This elasticity may be helpful in reducing congestion.
There is a rather small per-project limit of 10 GB for this cache, so we'll have to see how effectively caching works in practice. See https://github.com/sagemath/sage/actions/caches
📝 Checklist
⌛ Dependencies
pkgs/sagemath-standard
: Move metadata fromsetup.cfg
topyproject.toml
#36951 (merged here)ubuntu-trusty
,opensuse-{15.3,15.4}
#37351 (merged here)