Build one crate at a time to stay under the runner memory cap
Browse files at this commit670a51d9cd2c743b8816d22ff1e2ecc1cd7f0e74Parent: 4c4575a- ci
- build one crate at a time to stay under the runner memory cap
1 changed file +6 -6
- .forge/ci.toml +6 -6
.forge/ci.tomlmodified+6 -6
| @@ -9,22 +9,22 @@ manual = true | |||
| 9 | 9 | ||
| 10 | [jobs.test] | 10 | [jobs.test] |
| 11 | image = "docker.io/library/rust:1" | 11 | image = "docker.io/library/rust:1" |
| 12 | -# Runner has a few GB RAM and 2 CPUs: cap rustc parallelism and drop debuginfo to avoid OOM kills. | 12 | +# 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. Also drops debuginfo. |
| 13 | -env = { CARGO_BUILD_JOBS = "2", CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0" } | 13 | +env = { CARGO_BUILD_JOBS = "1", CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0" } |
| 14 | run = """ | 14 | run = """ |
| 15 | cargo test --workspace | 15 | cargo test --workspace |
| 16 | """ | 16 | """ |
| 17 | -timeout_minutes = 60 | 17 | +timeout_minutes = 120 |
| 18 | 18 | ||
| 19 | [jobs.build] | 19 | [jobs.build] |
| 20 | image = "docker.io/library/rust:1" | 20 | image = "docker.io/library/rust:1" |
| 21 | needs = ["test"] | 21 | needs = ["test"] |
| 22 | -# Runner has a few GB RAM and 2 CPUs: cap rustc parallelism to avoid OOM kills. | 22 | +# 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. |
| 23 | -env = { CARGO_BUILD_JOBS = "2", CARGO_INCREMENTAL = "0" } | 23 | +env = { CARGO_BUILD_JOBS = "1", CARGO_INCREMENTAL = "0" } |
| 24 | run = """ | 24 | run = """ |
| 25 | cargo build --profile dist -p forge-web | 25 | cargo build --profile dist -p forge-web |
| 26 | mkdir -p dist | 26 | mkdir -p dist |
| 27 | cp target/dist/forge dist/forge | 27 | cp target/dist/forge dist/forge |
| 28 | """ | 28 | """ |
| 29 | artifacts = ["dist/forge"] | 29 | artifacts = ["dist/forge"] |
| 30 | -timeout_minutes = 60 | 30 | +timeout_minutes = 120 |