@@ -18,6 +18,7 @@ const is_slow_ci = is_ci && Sys.ARCH == :aarch64
1818const is_julia_1_6 = VERSION . major == 1 && VERSION . minor == 6
1919const is_julia_1_9 = VERSION . major == 1 && VERSION . minor == 9
2020const is_julia_1_11 = VERSION . major == 1 && VERSION . minor == 11
21+ const is_julia_1_12 = VERSION . major == 1 && VERSION . minor == 12
2122
2223if is_ci
2324 @show Sys. ARCH
@@ -27,7 +28,14 @@ if is_slow_ci
2728 @warn " This is \" slow CI\" (`is_ci && Sys.ARCH == :aarch64`). Some tests will be skipped or modified." Sys. ARCH
2829end
2930
30- if any ([is_julia_1_6, is_julia_1_9, is_julia_1_11])
31+ const some_tests_skipped = [
32+ is_julia_1_6,
33+ is_julia_1_9,
34+ is_julia_1_11,
35+ is_julia_1_12,
36+ ]
37+
38+ if any (some_tests_skipped)
3139 @warn " This is Julia $(VERSION . major) .$(VERSION . minor) . Some tests will be skipped or modified." VERSION
3240end
3341
7987 app_compiled_dir = joinpath (tmp, " MyAppCompiled" )
8088 @testset for incremental in (is_slow_ci ? (false ,) : (true , false ))
8189 if incremental == false
82- if is_julia_1_11
83- # On Julia 1.11, `incremental=false` is currently broken: https://github.com/JuliaLang/PackageCompiler.jl/issues/976
84- # So, for now, we skip the `incremental=false` tests on Julia 1.11
85- @warn " This is Julia 1.11; skipping incremental=false test due to known bug: https://github.com/JuliaLang/PackageCompiler.jl/issues/976"
90+ if is_julia_1_11 || is_julia_1_12
91+ # On Julia 1.11 and 1.12, `incremental=false` is currently broken.
92+ # 1.11: https://github.com/JuliaLang/PackageCompiler.jl/issues/976
93+ # 1.12: No GitHub issue yet.
94+ # So, for now, we skip the `incremental=false` tests on Julia 1.11 and 1.12
95+ @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)"
8696 @test_skip false
8797 continue
8898 end
@@ -186,30 +196,52 @@ end
186196 end # testset
187197
188198 if ! is_slow_ci
189- # Test library creation
190- lib_source_dir = joinpath (@__DIR__ , " .." , " examples/MyLib" )
191- lib_target_dir = joinpath (tmp, " MyLibCompiled" )
192-
193- incremental = false
194- filter = true
195- lib_name = " inc"
196-
197- tmp_lib_src_dir = joinpath (tmp, " MyLib" )
198- cp (lib_source_dir, tmp_lib_src_dir)
199- create_library (tmp_lib_src_dir, lib_target_dir; incremental= incremental, force= true , filter_stdlibs= filter,
200- precompile_execution_file= joinpath (lib_source_dir, " build" , " generate_precompile.jl" ),
201- precompile_statements_file= joinpath (lib_source_dir, " build" , " additional_precompile.jl" ),
202- lib_name= lib_name, version= v " 1.0.0" )
203- rm (tmp_lib_src_dir; recursive= true )
199+ if is_julia_1_12
200+ # On Julia 1.12, `incremental=false` is currently broken when doing `create_library()`.
201+ # 1.12: No GitHub issue yet.
202+ # So, for now, we skip the `incremental=false` tests on Julia 1.12 when doing `create_library()`.
203+ @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)"
204+ @test_skip false
205+ else
206+ # Test library creation
207+ lib_source_dir = joinpath (@__DIR__ , " .." , " examples/MyLib" )
208+ lib_target_dir = joinpath (tmp, " MyLibCompiled" )
209+
210+ # This is why we have to skip this test on 1.12:
211+ incremental = false
212+
213+ filter = true
214+ lib_name = " inc"
215+
216+ tmp_lib_src_dir = joinpath (tmp, " MyLib" )
217+ cp (lib_source_dir, tmp_lib_src_dir)
218+ create_library (tmp_lib_src_dir, lib_target_dir; incremental= incremental, force= true , filter_stdlibs= filter,
219+ precompile_execution_file= joinpath (lib_source_dir, " build" , " generate_precompile.jl" ),
220+ precompile_statements_file= joinpath (lib_source_dir, " build" , " additional_precompile.jl" ),
221+ lib_name= lib_name, version= v " 1.0.0" )
222+ rm (tmp_lib_src_dir; recursive= true )
223+ end
204224 end
205225
206226 # Test creating an empty sysimage
207227 if ! is_slow_ci
208- tmp = mktempdir ()
209- sysimage_path = joinpath (tmp, " empty." * Libdl. dlext)
210- foreach (x -> touch (joinpath (tmp, x)), [" Project.toml" , " Manifest.toml" ])
211- create_sysimage (String[]; sysimage_path= sysimage_path, incremental= false , filter_stdlibs= true , project= tmp)
212- hello = read (` $(Base. julia_cmd ()) -J $(sysimage_path) -e 'print("hello, world")'` , String)
213- @test hello == " hello, world"
228+ if is_julia_1_12
229+ # On Julia 1.12, `incremental=false` is currently broken when doing `create_library()`.
230+ # 1.12: No GitHub issue yet.
231+ # So, for now, we skip the `incremental=false` tests on Julia 1.12 when doing `create_library()`.
232+ @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)"
233+ @test_skip false
234+ else
235+ tmp = mktempdir ()
236+ sysimage_path = joinpath (tmp, " empty." * Libdl. dlext)
237+ foreach (x -> touch (joinpath (tmp, x)), [" Project.toml" , " Manifest.toml" ])
238+
239+ # This is why we need to skip this test on 1.12:
240+ incremental= false
241+
242+ create_sysimage (String[]; sysimage_path= sysimage_path, incremental= incremental, filter_stdlibs= true , project= tmp)
243+ hello = read (` $(Base. julia_cmd ()) -J $(sysimage_path) -e 'print("hello, world")'` , String)
244+ @test hello == " hello, world"
245+ end
214246 end
215247end
0 commit comments