Skip to content

Commit cdfadc8

Browse files
committed
[CI] Updated sccache, added downloading of ARM64 binaries.
1 parent 1384f71 commit cdfadc8

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

.github/workflows/install-sccache.py

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import hashlib
33
import io
44
import os
5+
import platform
56
import stat
67
import sys
78
import tarfile
@@ -10,20 +11,29 @@
1011
import gha
1112

1213
# Configuration
13-
url_base = "https://github.com/mozilla/sccache/releases/download/0.2.12/"
14+
version = "v0.2.15"
15+
url_base = f"https://github.com/mozilla/sccache/releases/download/{version}/"
1416

15-
platform = sys.platform
16-
if platform == 'win32':
17-
expected_hash = "fd05e91c59b9497d4ebae311b47a982f2a6eb942dca3c9c314cc1fb36f8bc64d"
18-
download_file_name = "sccache-0.2.12-x86_64-pc-windows-msvc"
17+
platform = f"{platform.system()}-{platform.machine()}"
18+
if platform == 'Windows-AMD64':
19+
expected_hash = "3dfecdbb85561c55e899d3ad039c671f806d283c49da0721c2ef5c1310d87965"
20+
download_file_name = f"sccache-{version}-x86_64-pc-windows-msvc"
1921
binary_name = "sccache.exe"
20-
elif platform == 'linux':
21-
expected_hash = "26fd04c1273952cc2a0f359a71c8a1857137f0ee3634058b3f4a63b69fc8eb7f"
22-
download_file_name = "sccache-0.2.12-x86_64-unknown-linux-musl"
22+
elif platform == 'Linux-x86_64':
23+
expected_hash = "e5d03a9aa3b9fac7e490391bbe22d4f42c840d31ef9eaf127a03101930cbb7ca"
24+
download_file_name = f"sccache-{version}-x86_64-unknown-linux-musl"
2325
binary_name = "sccache"
24-
elif platform == 'darwin':
25-
expected_hash = "4945d295fa045dce9bf669d1313e4af4a504e74b08b61c1678902feb810c9ab7"
26-
download_file_name = "sccache-0.2.12-x86_64-apple-darwin"
26+
elif platform == 'Linux-aarch64':
27+
expected_hash = "90d91d21a767e3f558196dbd52395f6475c08de5c4951a4c8049575fa6894489"
28+
download_file_name = f"sccache-{version}-aarch64-unknown-linux-musl"
29+
binary_name = "sccache"
30+
elif platform == 'Darwin-x86_64':
31+
expected_hash = "908e939ea3513b52af03878753a58e7c09898991905b1ae3c137bb8f10fa1be2"
32+
download_file_name = f"sccache-{version}-x86_64-apple-darwin"
33+
binary_name = "sccache"
34+
elif platform == 'Darwin-arm64':
35+
expected_hash = "4120626b3a13b8e615e995b926db4166dc2b34274908b8f159ca65be4928b32a"
36+
download_file_name = f"sccache-{version}-aarch64-apple-darwin"
2737
binary_name = "sccache"
2838
else:
2939
assert(False), f"Unknown platform '{platform}'"

0 commit comments

Comments
 (0)