Skip to content

Commit 07028da

Browse files
authored
Add tests to ensure reproducibility on more platforms (#1234)
* Add tests to ensure reproducibility on more platforms * Skip reproducibility test with GCC 5 for i686 Windows
1 parent 728cae4 commit 07028da

File tree

3 files changed

+69
-49
lines changed

3 files changed

+69
-49
lines changed

Manifest.toml

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.8.0"
3+
julia_version = "1.7.2"
44
manifest_format = "2.0"
55
project_hash = "1e87134dc5853b26c2f65af5a46eb0a2d987da86"
66

@@ -12,7 +12,6 @@ version = "1.1.4"
1212

1313
[[deps.ArgTools]]
1414
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
15-
version = "1.1.1"
1615

1716
[[deps.Artifacts]]
1817
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
@@ -33,11 +32,16 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
3332

3433
[[deps.BinaryBuilderBase]]
3534
deps = ["CodecZlib", "Downloads", "InteractiveUtils", "JSON", "LibGit2", "LibGit2_jll", "Libdl", "Logging", "OrderedCollections", "OutputCollectors", "Pkg", "ProgressMeter", "Random", "SHA", "Scratch", "SimpleBufferStream", "TOML", "Tar", "UUIDs", "p7zip_jll", "pigz_jll"]
36-
git-tree-sha1 = "29d27e44a3eb75a8487e08e7e26cf3873f1759db"
35+
git-tree-sha1 = "af7cdc65f6ef4e2434baff93cf2d805cb54efbe6"
3736
repo-rev = "master"
3837
repo-url = "https://github.com/JuliaPackaging/BinaryBuilderBase.jl.git"
3938
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
40-
version = "1.17.0"
39+
version = "1.18.0"
40+
41+
[[deps.BitFlags]]
42+
git-tree-sha1 = "84259bb6172806304b9101094a7cc4bc6f56dbc6"
43+
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
44+
version = "0.1.5"
4145

4246
[[deps.CodecZlib]]
4347
deps = ["TranscodingStreams", "Zlib_jll"]
@@ -54,12 +58,11 @@ version = "3.46.0"
5458
[[deps.CompilerSupportLibraries_jll]]
5559
deps = ["Artifacts", "Libdl"]
5660
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
57-
version = "0.5.2+0"
5861

5962
[[deps.DataAPI]]
60-
git-tree-sha1 = "fb5f5316dd3fd4c5e7c30a24d50643b73e37cd40"
63+
git-tree-sha1 = "1106fa7e1256b402a86a8e7b15c00c85036fef49"
6164
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
62-
version = "1.10.0"
65+
version = "1.11.0"
6366

6467
[[deps.DataValueInterfaces]]
6568
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
@@ -79,9 +82,8 @@ deps = ["Random", "Serialization", "Sockets"]
7982
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
8083

8184
[[deps.Downloads]]
82-
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
85+
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
8386
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
84-
version = "1.6.0"
8587

8688
[[deps.ExprTools]]
8789
git-tree-sha1 = "56559bbef6ca5ea0c0818fa5c90320398a6fbf8d"
@@ -110,10 +112,10 @@ uuid = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
110112
version = "5.7.3"
111113

112114
[[deps.HTTP]]
113-
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
114-
git-tree-sha1 = "59ba44e0aa49b87a8c7a8920ec76f8afe87ed502"
115+
deps = ["Base64", "CodecZlib", "Dates", "IniFile", "Logging", "LoggingExtras", "MbedTLS", "NetworkOptions", "OpenSSL", "Random", "SimpleBufferStream", "Sockets", "URIs", "UUIDs"]
116+
git-tree-sha1 = "4abede886fcba15cd5fd041fef776b230d004cee"
115117
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
116-
version = "1.3.3"
118+
version = "1.4.0"
117119

118120
[[deps.Hiccup]]
119121
deps = ["MacroTools", "Test"]
@@ -162,12 +164,10 @@ version = "0.3.4"
162164
[[deps.LibCURL]]
163165
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
164166
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
165-
version = "0.6.3"
166167

167168
[[deps.LibCURL_jll]]
168169
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
169170
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
170-
version = "7.84.0+0"
171171

172172
[[deps.LibGit2]]
173173
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
@@ -176,12 +176,10 @@ uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
176176
[[deps.LibGit2_jll]]
177177
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
178178
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
179-
version = "1.3.0+0"
180179

181180
[[deps.LibSSH2_jll]]
182181
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
183182
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
184-
version = "1.10.2+0"
185183

186184
[[deps.Libdl]]
187185
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -218,7 +216,6 @@ version = "1.1.6"
218216
[[deps.MbedTLS_jll]]
219217
deps = ["Artifacts", "Libdl"]
220218
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
221-
version = "2.28.0+0"
222219

223220
[[deps.Mmap]]
224221
uuid = "a63ad114-7e13-5084-954f-fe012c677804"
@@ -231,7 +228,6 @@ version = "0.7.3"
231228

232229
[[deps.MozillaCACerts_jll]]
233230
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
234-
version = "2022.2.1"
235231

236232
[[deps.Mustache]]
237233
deps = ["Printf", "Tables"]
@@ -247,7 +243,6 @@ version = "1.0.0"
247243

248244
[[deps.NetworkOptions]]
249245
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
250-
version = "1.2.0"
251246

252247
[[deps.ObjectFile]]
253248
deps = ["Reexport", "StructIO"]
@@ -258,7 +253,18 @@ version = "0.3.7"
258253
[[deps.OpenBLAS_jll]]
259254
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
260255
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
261-
version = "0.3.20+0"
256+
257+
[[deps.OpenSSL]]
258+
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
259+
git-tree-sha1 = "02be9f845cb58c2d6029a6d5f67f4e0af3237814"
260+
uuid = "4d8831e6-92b7-49fb-bdf8-b643e874388c"
261+
version = "1.1.3"
262+
263+
[[deps.OpenSSL_jll]]
264+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
265+
git-tree-sha1 = "e60321e3f2616584ff98f0a4f18d98ae6f89bbb3"
266+
uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95"
267+
version = "1.1.17+0"
262268

263269
[[deps.OrderedCollections]]
264270
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
@@ -285,7 +291,6 @@ version = "1.3.0"
285291
[[deps.Pkg]]
286292
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
287293
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
288-
version = "1.8.0"
289294

290295
[[deps.PkgLicenses]]
291296
deps = ["Test"]
@@ -342,7 +347,6 @@ version = "1.3.0"
342347

343348
[[deps.SHA]]
344349
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
345-
version = "0.7.0"
346350

347351
[[deps.Scratch]]
348352
deps = ["Dates"]
@@ -388,7 +392,6 @@ version = "0.3.0"
388392
[[deps.TOML]]
389393
deps = ["Dates"]
390394
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
391-
version = "1.0.0"
392395

393396
[[deps.TableTraits]]
394397
deps = ["IteratorInterfaceExtensions"]
@@ -398,14 +401,13 @@ version = "1.0.1"
398401

399402
[[deps.Tables]]
400403
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "TableTraits", "Test"]
401-
git-tree-sha1 = "7149a60b01bf58787a1b83dad93f90d4b9afbe5d"
404+
git-tree-sha1 = "2d7164f7b8a066bcfa6224e67736ce0eb54aef5b"
402405
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
403-
version = "1.8.1"
406+
version = "1.9.0"
404407

405408
[[deps.Tar]]
406409
deps = ["ArgTools", "SHA"]
407410
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
408-
version = "1.10.0"
409411

410412
[[deps.Test]]
411413
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
@@ -455,7 +457,6 @@ version = "4.3.4+0"
455457
[[deps.Zlib_jll]]
456458
deps = ["Libdl"]
457459
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
458-
version = "1.2.12+3"
459460

460461
[[deps.ghr_jll]]
461462
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -466,7 +467,6 @@ version = "0.14.0+0"
466467
[[deps.libblastrampoline_jll]]
467468
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
468469
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
469-
version = "5.1.1+0"
470470

471471
[[deps.libsodium_jll]]
472472
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -477,12 +477,10 @@ version = "1.0.20+0"
477477
[[deps.nghttp2_jll]]
478478
deps = ["Artifacts", "Libdl"]
479479
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
480-
version = "1.48.0+0"
481480

482481
[[deps.p7zip_jll]]
483482
deps = ["Artifacts", "Libdl"]
484483
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
485-
version = "17.4.0+0"
486484

487485
[[deps.pigz_jll]]
488486
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ ghr_jll = "07c12ed4-43bc-5495-8a2a-d5838ef8d533"
3333

3434
[compat]
3535
ArgParse = "1.1"
36-
BinaryBuilderBase = "1.17"
36+
BinaryBuilderBase = "1.18"
3737
GitHub = "5.1"
3838
HTTP = "0.8, 0.9, 1"
3939
JLD2 = "0.1.6, 0.2, 0.3, 0.4"

test/building.jl

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,48 @@ end
180180

181181
@testset "gfortran linking specialty flags" begin
182182
# We test things like linking against libgfortran with `$FC` on a couple of troublesome platforms
183+
x86_64_linux = Platform("x86_64", "linux"; libgfortran_version=v"3")
184+
aarch64_linux = Platform("aarch64", "linux"; libgfortran_version=v"3")
185+
ppc64le_linux = Platform("powerpc64le", "linux"; libgfortran_version=v"3")
186+
armv7l_linux = Platform("armv7l", "linux"; libgfortran_version=v"3")
187+
x86_64_macos = Platform("x86_64", "macos"; libgfortran_version=v"3")
188+
i686_windows = Platform("i686", "windows"; libgfortran_version=v"3")
189+
troublesome_platforms = [
190+
x86_64_linux,
191+
ppc64le_linux,
192+
armv7l_linux,
193+
aarch64_linux,
194+
x86_64_macos,
195+
i686_windows,
196+
]
183197
expected_git_shas = Dict(
184198
v"4" => Dict(
185-
Platform("x86_64", "linux"; libgfortran_version=v"3") => Base.SHA1("6b705c0ff5760e236ab414fb9a366193f36d3e45"),
186-
Platform("aarch64", "linux"; libgfortran_version=v"3") => Base.SHA1("fb501d0fb03bbf8f034cff50d8d8a1b2956cdf1a"),
199+
x86_64_linux => Base.SHA1("6b705c0ff5760e236ab414fb9a366193f36d3e45"),
200+
ppc64le_linux => Base.SHA1("2fa9900c01dc87dad914de469e662cacd9c48e01"),
201+
armv7l_linux => Base.SHA1("192f05a64cc969cde17c026517166f98048ce27a"),
202+
aarch64_linux => Base.SHA1("fb501d0fb03bbf8f034cff50d8d8a1b2956cdf1a"),
203+
x86_64_macos => Base.SHA1("5a927c7c1b0c7813564bf47ec7ff287071ed5aae"),
204+
i686_windows => Base.SHA1("f39858ccc34a63a648cf21d33ae236bfdd706d09"),
187205
),
188206
v"5" => Dict(
189-
Platform("x86_64", "linux"; libgfortran_version=v"3") => Base.SHA1("ef9653f47abba2895b14c1086ba40ad8c64ac098"),
190-
Platform("aarch64", "linux"; libgfortran_version=v"3") => Base.SHA1("ed873d488f47fb8bf5b4b89bb31ed1cad27ee27c"),
207+
x86_64_linux => Base.SHA1("ef9653f47abba2895b14c1086ba40ad8c64ac098"),
208+
ppc64le_linux => Base.SHA1("b402ba20da0b800d37f69e1fbfe0e30c3b11a8db"),
209+
armv7l_linux => Base.SHA1("b282db91a2c2a33485718d8e8a743b7f5c384719"),
210+
aarch64_linux => Base.SHA1("ed873d488f47fb8bf5b4b89bb31ed1cad27ee27c"),
211+
x86_64_macos => Base.SHA1("099b6a75d4f417c9f67c4da9218a56327086ec72"),
212+
i686_windows => Base.SHA1("9390a3c24a8e274e6d7245c6c977f97b406bc3f5"),
191213
),
192214
v"6" => Dict(
193-
Platform("x86_64", "linux"; libgfortran_version=v"3") => Base.SHA1("b3829adf90f6521e4a05f20924506c8358247e06"),
194-
Platform("aarch64", "linux"; libgfortran_version=v"3") => Base.SHA1("641031469413f4fa776c74310098b1b181796720"),
215+
x86_64_linux => Base.SHA1("b3829adf90f6521e4a05f20924506c8358247e06"),
216+
ppc64le_linux => Base.SHA1("a12153a57fc6d8c415dc77161a39ed8ab01b16b2"),
217+
armv7l_linux => Base.SHA1("a5c66513ca6a0348ca7b1e99412524fb1ee75e87"),
218+
aarch64_linux => Base.SHA1("641031469413f4fa776c74310098b1b181796720"),
219+
x86_64_macos => Base.SHA1("c01c6e840c4268123fbbd8703c8a153219752800"),
220+
i686_windows => Base.SHA1("ae50af4ca8651cb3c8f71f34d0b66ca0d8f14a99"),
195221
),
196222
)
197223

198-
for gcc_version in (v"4", v"5", v"6")
224+
@testset "gcc version $(gcc_version)" for gcc_version in (v"4", v"5", v"6")
199225
mktempdir() do build_path
200226
build_output_meta = autobuild(
201227
build_path,
@@ -211,27 +237,23 @@ end
211237
install_license /usr/share/licenses/libuv/LICENSE
212238
""",
213239
# Build for a few troublesome platforms
214-
[
215-
Platform("x86_64", "linux"; libgfortran_version=v"3"),
216-
Platform("powerpc64le", "linux"; libgfortran_version=v"3"),
217-
Platform("armv7l", "linux"; libgfortran_version=v"3"),
218-
Platform("aarch64", "linux"; libgfortran_version=v"3"),
219-
Platform("x86_64", "macos"; libgfortran_version=v"3"),
220-
Platform("i686", "windows"; libgfortran_version=v"3"),
221-
],
240+
troublesome_platforms,
222241
[ExecutableProduct("hello_world_fortran", :hello_world_fortran)],
223242
# Express a dependency on CSL to silence warning for fortran code
224243
[Dependency("CompilerSupportLibraries_jll")];
225244
preferred_gcc_version=gcc_version,
226245
)
227246

228-
for p in (Platform("x86_64", "linux"; libgfortran_version=v"3"), Platform("aarch64", "linux"; libgfortran_version=v"3"))
247+
for p in troublesome_platforms
229248
# Test build reproducibility
230-
@test build_output_meta[p][3] == expected_git_shas[gcc_version][p]
249+
# Note: for some reasons, GCC 5 for i686 windows gives different results on
250+
# different systems, while still always reproducible on each of them:
251+
# https://github.com/JuliaPackaging/BinaryBuilder.jl/pull/1234#issuecomment-1264192726
252+
@test build_output_meta[p][3] == expected_git_shas[gcc_version][p] skip=(Sys.iswindows(p) && gcc_version==v"5")
231253
end
232254

233255
# Just a simple test to ensure that it worked.
234-
@test length(keys(build_output_meta)) == 6
256+
@test length(keys(build_output_meta)) == length(troublesome_platforms)
235257
end
236258
end
237259

0 commit comments

Comments
 (0)