SOURCE_DATE_EPOCH is set in both jobs, so turso_core stops rebuilding on every run: with CARGO_HOME in the workspace its build.rs found our repo and watched .git/HEAD, which is new in every job
Browse files at this commit75d5a52fc127df54bf9e44a4e633edc6d338b306Parent: aa3031d- ci
- SOURCE_DATE_EPOCH is set in both jobs, so turso_core stops rebuilding on every run: with CARGO_HOME in the workspace its build.rs found our repo and watched .git/HEAD, which is new in every job
1 changed file +4 -2
- .forge/ci.toml +4 -2
.forge/ci.tomlmodified+4 -2
| @@ -19,7 +19,9 @@ tags = ["v*"] | |||
| 19 | image = "docker.io/library/rust:1" | 19 | image = "docker.io/library/rust:1" |
| 20 | # Build parallelism comes from the runner (CARGO_BUILD_JOBS follows its CPU limit). Drops debuginfo. | 20 | # Build parallelism comes from the runner (CARGO_BUILD_JOBS follows its CPU limit). Drops debuginfo. |
| 21 | # CARGO_HOME in the workspace puts the downloaded crates in the cache, so a run downloads only new ones. | 21 | # CARGO_HOME in the workspace puts the downloaded crates in the cache, so a run downloads only new ones. |
| 22 | -env = { CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0", CARGO_HOME = "/workspace/.cargo-home" } | 22 | +# That places turso_core's source inside this repo, and its build.rs then watches our .git/HEAD, which |
| 23 | +# is new in every job, so it would rebuild on every run. With SOURCE_DATE_EPOCH set it skips git. | ||
| 24 | +env = { CARGO_PROFILE_DEV_DEBUG = "0", CARGO_PROFILE_TEST_DEBUG = "0", CARGO_INCREMENTAL = "0", CARGO_HOME = "/workspace/.cargo-home", SOURCE_DATE_EPOCH = "0" } | ||
| 23 | # main.rs holds the whole forge-web crate, so `cargo test` compiles it twice: the `forge` binary | 25 | # main.rs holds the whole forge-web crate, so `cargo test` compiles it twice: the `forge` binary |
| 24 | # (the e2e tests run it) and its unit-test harness, ~3.4 GB of rustc each. Built in parallel they | 26 | # (the e2e tests run it) and its unit-test harness, ~3.4 GB of rustc each. Built in parallel they |
| 25 | # hit the runner's box cap and got OOM-killed now and then. The e2e build makes the binary first, | 27 | # hit the runner's box cap and got OOM-killed now and then. The e2e build makes the binary first, |
| @@ -35,7 +37,7 @@ timeout_minutes = 120 | |||
| 35 | image = "docker.io/library/rust:1" | 37 | image = "docker.io/library/rust:1" |
| 36 | needs = ["test"] | 38 | needs = ["test"] |
| 37 | # Build parallelism comes from the runner (CARGO_BUILD_JOBS follows its CPU limit). | 39 | # Build parallelism comes from the runner (CARGO_BUILD_JOBS follows its CPU limit). |
| 38 | -env = { CARGO_INCREMENTAL = "0", CARGO_HOME = "/workspace/.cargo-home" } | 40 | +env = { CARGO_INCREMENTAL = "0", CARGO_HOME = "/workspace/.cargo-home", SOURCE_DATE_EPOCH = "0" } |
| 39 | run = """ | 41 | run = """ |
| 40 | cargo build --profile dist -p forge-web -p forge-runner | 42 | cargo build --profile dist -p forge-web -p forge-runner |
| 41 | ARCH=$(uname -m) | 43 | ARCH=$(uname -m) |