Limit build parallelism and debuginfo to fit the runner's memory
Browse files at this commit4c4575ab407fdc173ff60ac5ca01948331124684Parent: 52200c8- ci
- limit build parallelism and debuginfo to fit the runner's memory
1 changed file +4 -0
- .forge/ci.toml +4 -0
.forge/ci.tomlmodified+4 -0
| @@ -9,6 +9,8 @@ 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. | ||
| 13 | +env = { CARGO_BUILD_JOBS = "2", CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0" } | ||
| 12 | run = """ | 14 | run = """ |
| 13 | cargo test --workspace | 15 | cargo test --workspace |
| 14 | """ | 16 | """ |
| @@ -17,6 +19,8 @@ timeout_minutes = 60 | |||
| 17 | [jobs.build] | 19 | [jobs.build] |
| 18 | image = "docker.io/library/rust:1" | 20 | image = "docker.io/library/rust:1" |
| 19 | needs = ["test"] | 21 | needs = ["test"] |
| 22 | +# Runner has a few GB RAM and 2 CPUs: cap rustc parallelism to avoid OOM kills. | ||
| 23 | +env = { CARGO_BUILD_JOBS = "2", CARGO_INCREMENTAL = "0" } | ||
| 20 | run = """ | 24 | run = """ |
| 21 | cargo build --profile dist -p forge-web | 25 | cargo build --profile dist -p forge-web |
| 22 | mkdir -p dist | 26 | mkdir -p dist |