Skip to content

Commit

Permalink
ci: Allow populating the caches without building the releases
Browse files Browse the repository at this point in the history
This can be necessary if Travis's 50 minutes limit is exceeded.
  • Loading branch information
shesek committed Sep 26, 2020
1 parent 1ef06a5 commit 163833f
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,20 @@ script:
- cargo clippy --all-targets --all-features
- ./test/tests.sh

# Report reproducible builds shasums
# Build releases and report reproducibe shasums
- >
docker_mounts="-v `pwd`:/usr/src/bwt -v ${CARGO_HOME:-$HOME/.cargo}:/usr/local/cargo" &&
(docker inspect bwt-builder &> /dev/null || docker build -t bwt-builder -f scripts/builder.Dockerfile .) &&
(docker inspect bwt-builder-osx &> /dev/null || docker build -t bwt-builder-osx -f scripts/builder-osx.Dockerfile .) &&
docker run $docker_mounts bwt-builder &&
docker run $docker_mounts bwt-builder-osx &&
echo '-----BEGIN SHA256SUM-----' &&
(cd dist && sha256sum *) | sort &&
echo ''
[ -n "$PREPARE_CACHE_ONLY" ] || (
docker_mounts="-v `pwd`:/usr/src/bwt -v ${CARGO_HOME:-$HOME/.cargo}:/usr/local/cargo" &&
docker run $docker_mounts bwt-builder &&
docker run $docker_mounts bwt-builder-osx &&
echo '-----BEGIN SHA256SUM-----' &&
(cd dist && sha256sum *) | sort &&
echo ''
)
# Running the full build without any cache may exceed Travis's 50 minutes limit.
# If this happens, its possible to run the CI once with PREPARE_CACHE_ONLY to
# populate the caches, then restart it to build the releases themselves.

0 comments on commit 163833f

Please sign in to comment.