@@ -14,9 +14,20 @@ ENV["JULIA_DEPOT_PATH"] = new_depot
1414Base. init_depot_path ()
1515
1616const is_ci = tryparse (Bool, get (ENV , " CI" , " " )) === true
17- const is_slow_ci = is_ci && Sys. ARCH == :aarch64
17+ const is_apple_silicon_macos = Sys. ARCH == :aarch64 && Sys. isapple ()
18+
19+ # In order to be "slow CI", we must meet all of the following:
20+ # 1. We are running on CI.
21+ # 2. We are running on aarch64 (arm64).
22+ # 3. We are NOT running on Apple Silicon macOS.
23+ # (Because for GitHub Actions, the GitHub-hosted Apple Silicon
24+ # macOS runners seem to be quite fast.)
25+ const is_slow_ci = is_ci && Sys. ARCH == :aarch64 && ! is_apple_silicon_macos
26+
1827const is_julia_1_6 = VERSION . major == 1 && VERSION . minor == 6
28+ const is_julia_1_9 = VERSION . major == 1 && VERSION . minor == 9
1929const is_julia_1_11 = VERSION . major == 1 && VERSION . minor == 11
30+ const is_julia_1_12 = VERSION . major == 1 && VERSION . minor == 12
2031
2132if is_ci
2233 @show Sys. ARCH
@@ -26,12 +37,15 @@ if is_slow_ci
2637 @warn " This is \" slow CI\" (`is_ci && Sys.ARCH == :aarch64`). Some tests will be skipped or modified." Sys. ARCH
2738end
2839
29- if is_julia_1_6
30- @warn " This is Julia 1.6. Some tests will be skipped or modified." VERSION
31- end
40+ const some_tests_skipped = [
41+ is_julia_1_6,
42+ is_julia_1_9,
43+ is_julia_1_11,
44+ is_julia_1_12,
45+ ]
3246
33- if is_julia_1_11
34- @warn " This is Julia 1.11 . Some tests will be skipped or modified." VERSION
47+ if any (some_tests_skipped)
48+ @warn " This is Julia $( VERSION . major) . $( VERSION . minor) . Some tests will be skipped or modified." VERSION
3549end
3650
3751function remove_llvmextras (project_file)
8094 # Test creating an app
8195 app_source_dir = joinpath (@__DIR__ , " .." , " examples/MyApp/" )
8296 app_compiled_dir = joinpath (tmp, " MyAppCompiled" )
83- @testset for incremental in (is_slow_ci ? (false ,) : (true , false ))
97+ if is_slow_ci
98+ incrementals_list = (true , false )
99+ else
100+ incrementals_list = (true , false )
101+ end
102+ @testset for incremental in incrementals_list
84103 if incremental == false
85- if is_julia_1_11
86- # On Julia 1.11, `incremental=false` is currently broken: https://github.com/JuliaLang/PackageCompiler.jl/issues/976
87- # So, for now, we skip the `incremental=false` tests on Julia 1.11
88- @warn " This is Julia 1.11; skipping incremental=false test due to known bug: https://github.com/JuliaLang/PackageCompiler.jl/issues/976"
89- @test_broken false
104+ if is_julia_1_11 || is_julia_1_12
105+ # On Julia 1.11 and 1.12, `incremental=false` is currently broken.
106+ # 1.11: https://github.com/JuliaLang/PackageCompiler.jl/issues/976
107+ # 1.12: No GitHub issue yet.
108+ # So, for now, we skip the `incremental=false` tests on Julia 1.11 and 1.12
109+ @warn " This is Julia $(VERSION . major) .$(VERSION . minor) ; skipping incremental=false test due to known bug: #976 (for 1.11), issue TODO (for 1.12)"
110+ @test_skip false
90111 continue
91112 end
92- filter_stdlibs = (is_slow_ci ? (true , ) : (true , false ))
113+ if is_slow_ci
114+ filter_stdlibs = (true ,)
115+ else
116+ filter_stdlibs = (true , false )
117+ end
93118 else
94119 filter_stdlibs = (false ,)
95120 end
96121 @testset for filter in filter_stdlibs
97122 @info " starting: create_app testset" incremental filter
98123 tmp_app_source_dir = joinpath (tmp, " MyApp" )
99124 cp (app_source_dir, tmp_app_source_dir)
100- if is_julia_1_6
101- # Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove
125+ if is_julia_1_6 || is_julia_1_9
126+ # Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove.
127+ # Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem.
102128 remove_llvmextras (joinpath (tmp_app_source_dir, " Project.toml" ))
103129 end
104130 try
154180 @test occursin (" From worker 4:\t 8" , app_output)
155181 @test occursin (" From worker 5:\t 8" , app_output)
156182
157- if VERSION >= v " 1.7-"
183+ if is_julia_1_6 || is_julia_1_9
184+ # Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove.
185+ # Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem.
186+ @test_skip false
187+ else
158188 @test occursin (" LLVMExtra path: ok!" , app_output)
159189 end
160190 @test occursin (" micromamba_jll path: ok!" , app_output)
@@ -184,30 +214,52 @@ end
184214 end # testset
185215
186216 if ! is_slow_ci
187- # Test library creation
188- lib_source_dir = joinpath (@__DIR__ , " .." , " examples/MyLib" )
189- lib_target_dir = joinpath (tmp, " MyLibCompiled" )
190-
191- incremental = false
192- filter = true
193- lib_name = " inc"
194-
195- tmp_lib_src_dir = joinpath (tmp, " MyLib" )
196- cp (lib_source_dir, tmp_lib_src_dir)
197- create_library (tmp_lib_src_dir, lib_target_dir; incremental= incremental, force= true , filter_stdlibs= filter,
198- precompile_execution_file= joinpath (lib_source_dir, " build" , " generate_precompile.jl" ),
199- precompile_statements_file= joinpath (lib_source_dir, " build" , " additional_precompile.jl" ),
200- lib_name= lib_name, version= v " 1.0.0" )
201- rm (tmp_lib_src_dir; recursive= true )
217+ if is_julia_1_12
218+ # On Julia 1.12, `incremental=false` is currently broken when doing `create_library()`.
219+ # 1.12: No GitHub issue yet.
220+ # So, for now, we skip the `incremental=false` tests on Julia 1.12 when doing `create_library()`.
221+ @warn " This is Julia $(VERSION . major) .$(VERSION . minor) ; skipping incremental=false test when doing `create_library()` due to known bug: issue TODO (for 1.12)"
222+ @test_skip false
223+ else
224+ # Test library creation
225+ lib_source_dir = joinpath (@__DIR__ , " .." , " examples/MyLib" )
226+ lib_target_dir = joinpath (tmp, " MyLibCompiled" )
227+
228+ # This is why we have to skip this test on 1.12:
229+ incremental = false
230+
231+ filter = true
232+ lib_name = " inc"
233+
234+ tmp_lib_src_dir = joinpath (tmp, " MyLib" )
235+ cp (lib_source_dir, tmp_lib_src_dir)
236+ create_library (tmp_lib_src_dir, lib_target_dir; incremental= incremental, force= true , filter_stdlibs= filter,
237+ precompile_execution_file= joinpath (lib_source_dir, " build" , " generate_precompile.jl" ),
238+ precompile_statements_file= joinpath (lib_source_dir, " build" , " additional_precompile.jl" ),
239+ lib_name= lib_name, version= v " 1.0.0" )
240+ rm (tmp_lib_src_dir; recursive= true )
241+ end
202242 end
203243
204244 # Test creating an empty sysimage
205245 if ! is_slow_ci
206- tmp = mktempdir ()
207- sysimage_path = joinpath (tmp, " empty." * Libdl. dlext)
208- foreach (x -> touch (joinpath (tmp, x)), [" Project.toml" , " Manifest.toml" ])
209- create_sysimage (String[]; sysimage_path= sysimage_path, incremental= false , filter_stdlibs= true , project= tmp)
210- hello = read (` $(Base. julia_cmd ()) -J $(sysimage_path) -e 'print("hello, world")'` , String)
211- @test hello == " hello, world"
246+ if is_julia_1_12
247+ # On Julia 1.12, `incremental=false` is currently broken when doing `create_library()`.
248+ # 1.12: No GitHub issue yet.
249+ # So, for now, we skip the `incremental=false` tests on Julia 1.12 when doing `create_library()`.
250+ @warn " This is Julia $(VERSION . major) .$(VERSION . minor) ; skipping incremental=false test when doing `create_library()` due to known bug: issue TODO (for 1.12)"
251+ @test_skip false
252+ else
253+ tmp = mktempdir ()
254+ sysimage_path = joinpath (tmp, " empty." * Libdl. dlext)
255+ foreach (x -> touch (joinpath (tmp, x)), [" Project.toml" , " Manifest.toml" ])
256+
257+ # This is why we need to skip this test on 1.12:
258+ incremental= false
259+
260+ create_sysimage (String[]; sysimage_path= sysimage_path, incremental= incremental, filter_stdlibs= true , project= tmp)
261+ hello = read (` $(Base. julia_cmd ()) -J $(sysimage_path) -e 'print("hello, world")'` , String)
262+ @test hello == " hello, world"
263+ end
212264 end
213265end
0 commit comments