mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-10-18 19:10:45 +08:00
Pin source mtimes to the commit time at image build, so cargo's fingerprints survive the image layer and the warm build stays fresh. Build with line-tables-only debug info and drop the incremental cache to shrink the baked target/.
25 lines
1.4 KiB
YAML
25 lines
1.4 KiB
YAML
steps:
|
|
# An image layer keeps whole-second mtimes, but cargo fingerprints the
|
|
# nanoseconds it saw at build time, so every crate with a build script
|
|
# rebuilt on every run. Building from whole-second mtimes keeps the warm
|
|
# target/ fresh. Image builds only: at run time this would hide the files
|
|
# the run's checkout changed.
|
|
- name: pin source mtimes to the commit time (image builds only)
|
|
run: '[ "$RYPH_SETUP_PHASE" != image ] || git ls-files -z | xargs -0 touch -d "@$(git log -1 --format=%ct)"'
|
|
- name: install npm dependencies
|
|
run: npm install --prefer-offline
|
|
- name: install Playwright WebKit
|
|
run: npx playwright install webkit
|
|
- name: install the pinned Radicle binaries for e2e tests
|
|
run: scripts/install-binaries
|
|
- name: warm clippy (scripts/check-rs)
|
|
run: mkdir -p build && cargo clippy --workspace --all-targets --locked
|
|
- name: warm cargo test (scripts/check-rs)
|
|
run: cargo test --workspace --no-run --locked
|
|
- name: warm the e2e backend (tests/support/globalSetup.ts)
|
|
run: cargo build --manifest-path ./crates/test-http-api/Cargo.toml --locked && cargo build -p radicle-job --bin rad-job --locked
|
|
# rustc's incremental cache only speeds up rebuilding this repo's own
|
|
# crates after an edit, and it is gigabytes. Image builds only.
|
|
- name: drop the incremental cache (image builds only)
|
|
run: '[ "$RYPH_SETUP_PHASE" != image ] || rm -rf target/debug/incremental'
|