Skip to content

Commit e5bdf16

Browse files
authored
Merge pull request #2814 from pierwill/ci-verify-sccache
ci: verify checksum of sccache
2 parents c30ac62 + 7935c17 commit e5bdf16

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ci/docker/scripts/sccache.bash

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@ set -xe
33

44
VERSION=0.2.12
55
TARGET=x86_64-unknown-linux-musl
6+
# from https://github.com/mozilla/sccache/releases
7+
SHA="26fd04c1273952cc2a0f359a71c8a1857137f0ee3634058b3f4a63b69fc8eb7f"
8+
DL_URL="https://github.com/mozilla/sccache/releases/download"
69
BIN_DIR=/usr/local/bin
710
TEMP_DIR=$(mktemp -d)
811

912
cd "${TEMP_DIR}"
1013
mkdir -p "${BIN_DIR}"
1114

12-
curl -sSL "https://github.com/mozilla/sccache/releases/download/${VERSION}/sccache-${VERSION}-${TARGET}.tar.gz" | \
15+
curl -sSL -O "${DL_URL}/${VERSION}/sccache-${VERSION}-${TARGET}.tar.gz"
16+
echo "${SHA} sccache-${VERSION}-${TARGET}.tar.gz" | sha256sum --check -
1317
tar -xzf - --strip-components 1
1418
cp sccache "${BIN_DIR}/sccache"
1519
chmod +x "${BIN_DIR}/sccache"

0 commit comments

Comments
 (0)