Skip to content

Commit b2d31c9

Browse files
authored
Merge branch 'master' into dpa/jayscook/xcode-flag-fix
2 parents 90931fe + cdde346 commit b2d31c9

File tree

4 files changed

+162
-40
lines changed

4 files changed

+162
-40
lines changed

.github/workflows/ci.nightly.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Nightly CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'master'
8+
- 'release-*'
9+
tags: '*'
10+
merge_group: # GitHub Merge Queue
11+
12+
concurrency:
13+
# Skip intermediate builds: all builds except for builds on the `master` branch
14+
# Cancel intermediate builds: only pull request builds
15+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
16+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
17+
18+
jobs:
19+
test-nightly:
20+
timeout-minutes: 90
21+
runs-on: ${{ matrix.github-runner }}
22+
strategy:
23+
max-parallel: 5 # leave space for other runs in the JuliaLang org, given these tests are long
24+
fail-fast: false
25+
matrix:
26+
include:
27+
# 1. We intentionally put nightly CI into a separate YAML
28+
# file (`ci.nightly.yml` versus the main `ci.yml` file).
29+
# This allows us to enable and disable the nightly CI
30+
# workflow from the GitHub web UI, without having any
31+
# impact on the main CI.
32+
# 2. We intentionally only run one CI job on Julia nightly,
33+
# in order to conserve CI resources.
34+
# 3. This CI only runs on Julia nightly. It doesn't run on
35+
# Julia pre-releases. For CI on Julia pre-releases, see
36+
# the main CI workflow file.
37+
- julia-version: 'nightly'
38+
julia-wordsize: '64'
39+
github-runner: ubuntu-latest
40+
coverage: false
41+
steps:
42+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
43+
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
44+
with:
45+
version: ${{ matrix.julia-version }}
46+
# If `julia-wordsize` is 32, then we set `arch` to `x86`, because we know that
47+
# 32-bit builds of Julia are only available for x86.
48+
#
49+
# If `julia-wordsize` is 64, then we set `arch` to `${{ runner.arch }}`, which
50+
# GitHub will automatically expand to the correct value (`x86_64` or `aarch64`)
51+
# based on the architecture of the underlying GitHub Runner (virtual machine).
52+
arch: ${{ github.ref == '32' && 'x86' || runner.arch }}
53+
- uses: julia-actions/cache@824243901fb567ccb490b0d0e2483ccecde46834 # v2.0.5
54+
- uses: julia-actions/julia-runtest@d0c4f093badade621cd041bba567d1e832480ac2 # v1.10.0
55+
with:
56+
coverage: ${{ matrix.coverage }}
57+
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38 # v1.2.2
58+
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
59+
with:
60+
file: lcov.info
61+
env:
62+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
matrix:
4848
julia-version:
4949
- '1.6' # previous LTS
50-
# - '1.9' # TODO: uncomment this line once we fix the tests on 1.9
50+
- '1.9'
5151
- '1.10' # current LTS
5252
- '1.11'
5353
# - 'nightly' # TODO: decide whether we want to run any CI jobs on nightly.
@@ -66,6 +66,10 @@ jobs:
6666
- 'true'
6767
- 'false' # needed for Julia 1.9+ to test from a session using pkgimages
6868
exclude:
69+
# For now, we'll disable testing 32-bit Julia 1.9 on all operating systems.
70+
# TODO: remove the following once we fix the tests for 32-bit Julia 1.9 .
71+
- julia-version: '1.9'
72+
julia-wordsize: '32'
6973
# For now, we'll disable testing 32-bit Julia 1.9 on Windows.
7074
# TODO: remove the following once we fix the tests for 32-bit Julia 1.9 on Windows.
7175
- github-runner: windows-latest

examples/MyApp/src/MyApp.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ using HelloWorldC_jll
55
using Artifacts
66
using Distributed
77
using Random
8-
if VERSION >= v"1.7.0"
8+
9+
# We seem to get problems with LLVMExtra_jll on Julia 1.6 and 1.9
10+
# Issue for 1.6: https://github.com/JuliaLang/PackageCompiler.jl/issues/706
11+
# There's no GitHub Issue for 1.9
12+
@static if (VERSION.major, VERSION.minor) ((1, 6), (1, 9),)
913
using LLVMExtra_jll
1014
end
1115

@@ -85,7 +89,7 @@ function real_main()
8589
@eval @everywhere using Example
8690
@everywhere println(Example.domath(3))
8791

88-
if VERSION >= v"1.7.0"
92+
@static if (VERSION.major, VERSION.minor) ((1, 6), (1, 9),)
8993
if isfile(LLVMExtra_jll.libLLVMExtra_path)
9094
println("LLVMExtra path: ok!")
9195
else

test/runtests.jl

Lines changed: 89 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,20 @@ ENV["JULIA_DEPOT_PATH"] = new_depot
1414
Base.init_depot_path()
1515

1616
const 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+
1827
const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6
28+
const is_julia_1_9 = VERSION.major == 1 && VERSION.minor == 9
1929
const is_julia_1_11 = VERSION.major == 1 && VERSION.minor == 11
30+
const is_julia_1_12 = VERSION.major == 1 && VERSION.minor == 12
2031

2132
if 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
2738
end
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
3549
end
3650

3751
function remove_llvmextras(project_file)
@@ -80,25 +94,37 @@ end
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
@@ -154,7 +180,11 @@ end
154180
@test occursin("From worker 4:\t8", app_output)
155181
@test occursin("From worker 5:\t8", 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
213265
end

0 commit comments

Comments
 (0)