Build waits for test instead of running beside it
Browse files at this commit3637bc962eb213b733061530cbe15bf44c4b6277Parent: 3f4e1ca- ci
- build waits for test instead of running beside it
1 changed file +4 -5
- .forge/ci.toml +4 -5
.forge/ci.tomlmodified+4 -5
| @@ -1,11 +1,9 @@ | |||
| 1 | # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs. | 1 | # CI for forge itself. Format: docs/ci.md, parser: crates/forge-ci/src/config.rs. |
| 2 | # | 2 | # |
| 3 | # The workflow has no branch condition, so the build job also runs for pull requests. | 3 | # The workflow has no branch condition, so the build job also runs for pull requests. |
| 4 | -# test and build have no `needs` between them, so they run in parallel when runner capacity allows | 4 | +# build has `needs = ["test"]`, so it starts only after test succeeds. Only one job uses the |
| 5 | -# (two runners, or one runner with concurrency = 2). Memory is not declared: when two jobs together | 5 | +# runner's memory at a time, so no memory is declared. An earlier run with concurrency 4 hit a |
| 6 | -# near the runner's memory budget, the runner pauses the younger one and parks it in swap until the | 6 | +# host-wide OOM and the kernel killed rustc mid-build. |
| 7 | -# other finishes (docs/ci.md, Memory). An earlier run with concurrency 4 hit a host-wide OOM and | ||
| 8 | -# the kernel killed rustc mid-build. | ||
| 9 | # The build job's artifacts are still only used | 7 | # The build job's artifacts are still only used |
| 10 | # once the whole run is green: a tag push matching "v*" publishes a release with the build job's | 8 | # once the whole run is green: a tag push matching "v*" publishes a release with the build job's |
| 11 | # binaries and SHA256SUMS, and self-update deploys dist/forge, only when every job in the run, | 9 | # binaries and SHA256SUMS, and self-update deploys dist/forge, only when every job in the run, |
| @@ -29,6 +27,7 @@ timeout_minutes = 120 | |||
| 29 | 27 | ||
| 30 | [jobs.build] | 28 | [jobs.build] |
| 31 | image = "docker.io/library/rust:1" | 29 | image = "docker.io/library/rust:1" |
| 30 | +needs = ["test"] | ||
| 32 | # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB. | 31 | # Runner has a few GB RAM and 2 CPUs: rustc runs one crate at a time because a single forge-web compile needs several GB. |
| 33 | env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" } | 32 | env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" } |
| 34 | run = """ | 33 | run = """ |