forge
Explore
Log in

Don't you dare go Hollow

Limit build parallelism and debuginfo to fit the runner's memory

Browse files at this commit

4c4575ab407fdc173ff60ac5ca01948331124684Ahmet Kaan GümüşParent: 52200c8
  • ci
    • limit build parallelism and debuginfo to fit the runner's memory
Show full message
💚 ci: limit build parallelism and debuginfo to fit the runner's memory
.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 --workspace15 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-web25 cargo build --profile dist -p forge-web
22 mkdir -p dist26 mkdir -p dist