Skip to content

Commit 2e90dee

Browse files
committed
Fix tests on aarch64-linux-gnu
This drastically improves the multiarch build process, directly reusing other `qemu-*-static` binaries, and ensuring that tests can actually pass on an `aarch64-linux-gnu` VM.
1 parent fe81e2b commit 2e90dee

File tree

7 files changed

+334
-155
lines changed

7 files changed

+334
-155
lines changed

Artifacts.toml

Lines changed: 206 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
[debian-minimal-rootfs-x86_64]
2-
git-tree-sha1 = "16738e2d713323e608ff891cb66de38d9d667d45"
3-
lazy = true
4-
5-
[[debian-minimal-rootfs-x86_64.download]]
6-
sha256 = "5be53620d001a4907e5471689d1876dfd26f7e7d8e14af6424418218d0eb4e08"
7-
url = "https://github.com/JuliaCI/rootfs-images/releases/download/v5.53/debian_minimal.x86_64.tar.gz"
8-
9-
[debian-minimal-rootfs-i686]
10-
git-tree-sha1 = "6acbceb9cb6e0dca4165cb0ba6935595601592a7"
11-
lazy = true
12-
13-
[[debian-minimal-rootfs-i686.download]]
14-
sha256 = "d69ccf1f27808593be02dfdb5c2fb93e3e5098138a25b8dcb0e5d884b8c2f707"
15-
url = "https://github.com/JuliaCI/rootfs-images/releases/download/v5.53/debian_minimal.i686.tar.gz"
16-
171
[debian-minimal-rootfs-aarch64]
182
git-tree-sha1 = "14e9dcabf9b1eb2870158b06f16fc3742b53c493"
193
lazy = true
@@ -30,6 +14,14 @@ lazy = true
3014
sha256 = "dd1f98b273a5322532bd64796326b1c0132a70f4cee1ad77270e6e307a646c05"
3115
url = "https://github.com/JuliaCI/rootfs-images/releases/download/v5.53/debian_minimal.armv7l.tar.gz"
3216

17+
[debian-minimal-rootfs-i686]
18+
git-tree-sha1 = "6acbceb9cb6e0dca4165cb0ba6935595601592a7"
19+
lazy = true
20+
21+
[[debian-minimal-rootfs-i686.download]]
22+
sha256 = "d69ccf1f27808593be02dfdb5c2fb93e3e5098138a25b8dcb0e5d884b8c2f707"
23+
url = "https://github.com/JuliaCI/rootfs-images/releases/download/v5.53/debian_minimal.i686.tar.gz"
24+
3325
[debian-minimal-rootfs-powerpc64le]
3426
git-tree-sha1 = "b77c22a4a1dff4bdde33d07fb02146ad3a58bd88"
3527
lazy = true
@@ -38,6 +30,14 @@ lazy = true
3830
sha256 = "1a2293147ccf9a158b0a272ba5dee48c0206a172a002a2556fa0296a71b5cec7"
3931
url = "https://github.com/JuliaCI/rootfs-images/releases/download/v5.53/debian_minimal.ppc64le.tar.gz"
4032

33+
[debian-minimal-rootfs-x86_64]
34+
git-tree-sha1 = "16738e2d713323e608ff891cb66de38d9d667d45"
35+
lazy = true
36+
37+
[[debian-minimal-rootfs-x86_64.download]]
38+
sha256 = "5be53620d001a4907e5471689d1876dfd26f7e7d8e14af6424418218d0eb4e08"
39+
url = "https://github.com/JuliaCI/rootfs-images/releases/download/v5.53/debian_minimal.x86_64.tar.gz"
40+
4141
[multiarch-rootfs]
4242
git-tree-sha1 = "b9bc181be08c4a0598539af7ef93340778df527c"
4343
lazy = true
@@ -46,21 +46,200 @@ lazy = true
4646
sha256 = "d88de5783becfc22cfd13dfa5ad965197f9bae2256e8ad89ff358adb2994b4c1"
4747
url = "https://github.com/staticfloat/Sandbox.jl/releases/download/multiarch-78df527c/multiarch.tar.gz"
4848

49-
[[multiarch-support]]
49+
[multiarch-testing]
50+
git-tree-sha1 = "d0e5365dc9e5083e1624a2733d0a8834dc9f14af"
51+
lazy = true
52+
53+
[[multiarch-testing.download]]
54+
sha256 = "0a3603e2e76f9614c6b9c6e5ba67a64a2442660718b5bbe1e07da08bee631f83"
55+
url = "https://github.com/staticfloat/Sandbox.jl/releases/download/multiarch-testing-dc9f14af/multiarch-testing.tar.gz"
56+
57+
[[qemu-aarch64]]
5058
arch = "x86_64"
51-
git-tree-sha1 = "378e2a4e3e4421d517f01b24f96f3eb2e3674774"
59+
git-tree-sha1 = "e35008c8e38ee71e3e4c9c2b4ad472d37665fa17"
5260
lazy = true
53-
libc = "glibc"
5461
os = "linux"
5562

56-
[[multiarch-support.download]]
57-
sha256 = "711afa233aa47132871dd0638ef94cb6329ca9c5bb397a9622e47b19a94e50c4"
58-
url = "https://github.com/staticfloat/Sandbox.jl/releases/download/multiarch-support-e3674774/multiarch-support.tar.gz"
63+
[[qemu-aarch64.download]]
64+
sha256 = "c83bf89f81d142dd258a0325f7ab9dbe197490d3f0f0816b3eb9ddac1ceaf4f0"
65+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-aarch64-static_amd64.tgz"
66+
[[qemu-aarch64]]
67+
arch = "aarch64"
68+
git-tree-sha1 = "1e8dc9efe0e04fdb232328d059c7bb83fba966bc"
69+
lazy = true
70+
os = "linux"
5971

60-
[multiarch-testing]
61-
git-tree-sha1 = "88a9ec7a6394e96eae6304799ba03d6f65fee52d"
72+
[[qemu-aarch64.download]]
73+
sha256 = "b4c723c38a372b0297c1e81d9b59212282e4728196985ce7f0367d0713dc661e"
74+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-aarch64-static_arm64v8.tgz"
75+
[[qemu-aarch64]]
76+
arch = "armv7l"
77+
call_abi = "eabihf"
78+
git-tree-sha1 = "55ab825a49473b89edec04d0709eae9e551f9fd2"
6279
lazy = true
80+
os = "linux"
6381

64-
[[multiarch-testing.download]]
65-
sha256 = "32aa6559ff62b9114967614a1e8947d7e385f9aaf7daa99fb7a79e9972abebb9"
66-
url = "https://github.com/staticfloat/Sandbox.jl/releases/download/multiarch-testing-65fee52d/multiarch-testing.tar.gz"
82+
[[qemu-aarch64.download]]
83+
sha256 = "93f12f528fb706f9f9026f00837c8c04f7d829570b0894d74a6582aaca489bf2"
84+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-aarch64-static_arm32v7.tgz"
85+
[[qemu-aarch64]]
86+
arch = "powerpc64le"
87+
git-tree-sha1 = "0e4aba704dd70bbe9aedf4c66faf5d346547cfa3"
88+
lazy = true
89+
os = "linux"
90+
91+
[[qemu-aarch64.download]]
92+
sha256 = "49d02309ada4028566efd075a18abedceff94102f5c34f6a7f9a35988f9f2e48"
93+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-aarch64-static_ppc64le.tgz"
94+
95+
[[qemu-arm]]
96+
arch = "x86_64"
97+
git-tree-sha1 = "cc5e763bd0383fb5030e2846f72fcdd42f426079"
98+
lazy = true
99+
os = "linux"
100+
101+
[[qemu-arm.download]]
102+
sha256 = "338e80f422da2f1ce391ff44a07f3091aa3669caeef36c871f0acfdea6a0ae49"
103+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-arm-static_amd64.tgz"
104+
[[qemu-arm]]
105+
arch = "aarch64"
106+
git-tree-sha1 = "4584318d303b0215132c046893971eb8815836c6"
107+
lazy = true
108+
os = "linux"
109+
110+
[[qemu-arm.download]]
111+
sha256 = "cafdcb659e581a587182030cbb2e2910d7a1b8bba482a38fd2fe6389691d045d"
112+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-arm-static_arm64v8.tgz"
113+
[[qemu-arm]]
114+
arch = "armv7l"
115+
call_abi = "eabihf"
116+
git-tree-sha1 = "ebd96913b6ea99524cf278ef05355e7476b33c63"
117+
lazy = true
118+
os = "linux"
119+
120+
[[qemu-arm.download]]
121+
sha256 = "78746fddd2cbc6f6b93da0140545ce9bdb41e3be1ca3a8cd8afafcaf5e6b84ee"
122+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-arm-static_arm32v7.tgz"
123+
[[qemu-arm]]
124+
arch = "powerpc64le"
125+
git-tree-sha1 = "e3aa9d8f1c5ca1b91bd4ae8f44694139f8cb58d4"
126+
lazy = true
127+
os = "linux"
128+
129+
[[qemu-arm.download]]
130+
sha256 = "c2c2685410cec3b66378a2b03f0d2f5cfac799dd171658a672e27774eb09a26b"
131+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-arm-static_ppc64le.tgz"
132+
133+
[[qemu-i386]]
134+
arch = "x86_64"
135+
git-tree-sha1 = "9ddc7fc256b2a85facf877196721917235df051b"
136+
lazy = true
137+
os = "linux"
138+
139+
[[qemu-i386.download]]
140+
sha256 = "8daddbf18f11e871df86ecced50f6942cfbc419e58c3e5c03c5f581ea933b703"
141+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-i386-static_amd64.tgz"
142+
[[qemu-i386]]
143+
arch = "aarch64"
144+
git-tree-sha1 = "efb9b46225c916dd63319fb1035d97b6d48ed327"
145+
lazy = true
146+
os = "linux"
147+
148+
[[qemu-i386.download]]
149+
sha256 = "3b873f1d8ee35e8918bb3bf46617a45d0c5f2f3a0e44dccd6aff6e6beadd986a"
150+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-i386-static_arm64v8.tgz"
151+
[[qemu-i386]]
152+
arch = "armv7l"
153+
call_abi = "eabihf"
154+
git-tree-sha1 = "be1c6999815ae41586d617d013679efe85773698"
155+
lazy = true
156+
os = "linux"
157+
158+
[[qemu-i386.download]]
159+
sha256 = "e4d5c5a68e663af1331e8ed48b0e19da687d9787f90f30eb8d390bb007cf11ae"
160+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-i386-static_arm32v7.tgz"
161+
[[qemu-i386]]
162+
arch = "powerpc64le"
163+
git-tree-sha1 = "e654eb5edbfc577e389fafde1bc24c0b3d3e8172"
164+
lazy = true
165+
os = "linux"
166+
167+
[[qemu-i386.download]]
168+
sha256 = "e4ec15af65edaf88421cd351bd2ff83d51adebe37228d3e29092b8bbed2be98f"
169+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-i386-static_ppc64le.tgz"
170+
171+
[[qemu-ppc64le]]
172+
arch = "x86_64"
173+
git-tree-sha1 = "80ba72c58ad50c856304e160b9e20dc6a6960652"
174+
lazy = true
175+
os = "linux"
176+
177+
[[qemu-ppc64le.download]]
178+
sha256 = "d97277890cb3513935262a02218a66f67fbad8d63715f599ca36e838b1b2b360"
179+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-ppc64le-static_amd64.tgz"
180+
[[qemu-ppc64le]]
181+
arch = "aarch64"
182+
git-tree-sha1 = "42320d44ebbf7e6cbba0690fb20c099164135a67"
183+
lazy = true
184+
os = "linux"
185+
186+
[[qemu-ppc64le.download]]
187+
sha256 = "a1023fca3b5172494df1b29f2a0b51857f621c7e5a9e9154f3f962fa5c5852d1"
188+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-ppc64le-static_arm64v8.tgz"
189+
[[qemu-ppc64le]]
190+
arch = "armv7l"
191+
call_abi = "eabihf"
192+
git-tree-sha1 = "88c508d2e366856b69ba2ab5108a6f0756a92208"
193+
lazy = true
194+
os = "linux"
195+
196+
[[qemu-ppc64le.download]]
197+
sha256 = "0fbd0237ffdd48df96a8fc845f4cc5617309f5db70300e1d78d0902e388f8194"
198+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-ppc64le-static_arm32v7.tgz"
199+
[[qemu-ppc64le]]
200+
arch = "powerpc64le"
201+
git-tree-sha1 = "229cb21bd293ec774343a4c58e52c4eae4291a00"
202+
lazy = true
203+
os = "linux"
204+
205+
[[qemu-ppc64le.download]]
206+
sha256 = "5e685f388546da1fc140934fa9886d8b077e9bce90d1cb1a098506cca18a9eea"
207+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-ppc64le-static_ppc64le.tgz"
208+
209+
[[qemu-x86_64]]
210+
arch = "x86_64"
211+
git-tree-sha1 = "4700fc8a9b0449c05f890f444f854b00dfdb34a2"
212+
lazy = true
213+
os = "linux"
214+
215+
[[qemu-x86_64.download]]
216+
sha256 = "60dfecc8d9c4937bae782b927caed430766c8b176b9868e5646682f4a97cd8f8"
217+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-x86_64-static_amd64.tgz"
218+
[[qemu-x86_64]]
219+
arch = "aarch64"
220+
git-tree-sha1 = "a2d47598ec825bb8964113a77bbca138324e37c1"
221+
lazy = true
222+
os = "linux"
223+
224+
[[qemu-x86_64.download]]
225+
sha256 = "1e75f4f8f84306bbe944c98bbd26e25134d34cfa940308e2f9871ad8bc8d76ca"
226+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-x86_64-static_arm64v8.tgz"
227+
[[qemu-x86_64]]
228+
arch = "armv7l"
229+
call_abi = "eabihf"
230+
git-tree-sha1 = "9d5e29117909f4db9f40e7f9e5b20fa728673812"
231+
lazy = true
232+
os = "linux"
233+
234+
[[qemu-x86_64.download]]
235+
sha256 = "1a8641e7e2db4ee2b7e6f4eee6b0ea1bd84f53bf95ca225a776524d8d38296b0"
236+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-x86_64-static_arm32v7.tgz"
237+
[[qemu-x86_64]]
238+
arch = "powerpc64le"
239+
git-tree-sha1 = "f6a6ab80ffdb0970059a1bd0edb04ba2eab7a9f7"
240+
lazy = true
241+
os = "linux"
242+
243+
[[qemu-x86_64.download]]
244+
sha256 = "7700bff013489b748ed27fbd2042c5bc5224d681eb446b359b91cf7618ec8039"
245+
url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3/qemu-x86_64-static_ppc64le.tgz"

contrib/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
44
Sandbox = "9307e30f-c43e-9ca7-d17c-c2dc59df670d"
55
Scratch = "6c6a2e73-6563-6170-7368-637461726353"
66
Tar = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
7+
TreeArchival = "216c6a2e-6c61-7669-6863-726165657274"
78
ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"

contrib/bind_multiarch_support.jl

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using Pkg, Downloads, TreeArchival, SHA, Base.BinaryPlatforms
2+
3+
root_url = "https://github.com/dbhi/qus/releases/download/v0.0.11-v7.1%2Bdfsg-2--bpo11%2B3"
4+
5+
qemu_host_maps = (
6+
"x86_64" => "amd64",
7+
"aarch64" => "arm64v8",
8+
"armv7l" => "arm32v7",
9+
"ppc64le" => "ppc64le",
10+
)
11+
qemu_target_arch_list = [
12+
"x86_64",
13+
"i386",
14+
"aarch64",
15+
"arm",
16+
"ppc64le",
17+
]
18+
19+
for (host_arch, tarball_arch) in qemu_host_maps
20+
for target_arch in qemu_target_arch_list
21+
# First, download the tarball
22+
mktempdir() do dir
23+
url = "$(root_url)/qemu-$(target_arch)-static_$(tarball_arch).tgz"
24+
file_path = joinpath(dir, basename(url))
25+
Downloads.download(url, file_path)
26+
27+
# Get the tarball and tree hashes
28+
tarball_hash = bytes2hex(open(SHA.sha256, file_path))
29+
tree_hash = Base.SHA1(TreeArchival.treehash(file_path))
30+
31+
artifacts_toml = Pkg.Artifacts.find_artifacts_toml(dirname(@__DIR__))
32+
33+
# Because this is technically a static executable, we drop the implicit `libc` constraint
34+
# so that it matches both `glibc` and `musl` hosts:
35+
host_platform = Platform(host_arch, "linux")
36+
delete!(tags(host_platform), "libc")
37+
Pkg.Artifacts.bind_artifact!(
38+
artifacts_toml,
39+
"qemu-$(target_arch)",
40+
tree_hash;
41+
platform=host_platform,
42+
download_info=[(url, tarball_hash)],
43+
lazy=true,
44+
force=true,
45+
)
46+
end
47+
end
48+
end
49+

0 commit comments

Comments
 (0)