aboutsummaryrefslogtreecommitdiff
path: root/.github/ci/build.sh
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2023-11-21 16:53:28 +0100
committerDario Nieuwenhuis <[email protected]>2023-11-21 17:33:07 +0100
commitba9cc102e295634035a3f9bac1b4656e735c5fc6 (patch)
treed080028538cf75a9a18a562ef1e947179c828b22 /.github/ci/build.sh
parent32b59148a8c40f3c8d74510d26c7c36791f53580 (diff)
ci: cache lockfiles
- Removes the slow "updating crates.io index, updating git" at start of the job. - Avoids CI being randomly slower if a widely-used dep (like serde) gets bumped causing rebuilding everything.
Diffstat (limited to '.github/ci/build.sh')
-rwxr-xr-x.github/ci/build.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/ci/build.sh b/.github/ci/build.sh
index 78ab976df..e7a6c0d86 100755
--- a/.github/ci/build.sh
+++ b/.github/ci/build.sh
@@ -18,7 +18,17 @@ fi
18# used when pointing stm32-metapac to a CI-built one. 18# used when pointing stm32-metapac to a CI-built one.
19export CARGO_NET_GIT_FETCH_WITH_CLI=true 19export CARGO_NET_GIT_FETCH_WITH_CLI=true
20 20
21# Restore lockfiles
22if [ -f /ci/cache/lockfiles.tar ]; then
23 echo Restoring lockfiles...
24 tar xf /ci/cache/lockfiles.tar
25fi
26
21hashtime restore /ci/cache/filetime.json || true 27hashtime restore /ci/cache/filetime.json || true
22hashtime save /ci/cache/filetime.json 28hashtime save /ci/cache/filetime.json
23 29
24./ci.sh 30./ci.sh
31
32# Save lockfiles
33echo Saving lockfiles...
34find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+ \ No newline at end of file