Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ jobs:
fail-fast: false
matrix:
julia-version:
- '1.6' # previous LTS
- '1.9'
- '1.10' # current LTS
- '1.11' # current stable
#
Expand All @@ -73,20 +71,6 @@ jobs:
- 'true'
- 'false' # needed for Julia 1.9+ to test from a session using pkgimages
exclude:
# For now, we'll disable testing 32-bit Julia 1.9 on all operating systems.
# TODO: remove the following once we fix the tests for 32-bit Julia 1.9 .
- julia-version: '1.9'
julia-wordsize: '32'
# For now, we'll disable testing 32-bit Julia 1.9 on Windows.
# TODO: remove the following once we fix the tests for 32-bit Julia 1.9 on Windows.
- github-runner: windows-latest
julia-version: '1.9'
julia-wordsize: '32'
#
# Julia 1.6 did not support Apple Silicon:
- github-runner: macos-14 # macos-14 = Apple Silicon.
julia-version: '1.6'
#
# We don't have 32-bit builds of Julia for Intel macOS:
- github-runner: macos-13 # macos-13 = Intel.
julia-wordsize: '32'
Expand All @@ -95,13 +79,6 @@ jobs:
- github-runner: macos-14 # macos-14 = Apple Silicon.
julia-wordsize: '32'
#
# We don't need to run the coverage=false job for Julia < 1.9:
- julia-version: '1.6'
coverage: 'false'
- julia-version: '1.7'
coverage: 'false'
- julia-version: '1.8'
coverage: 'false'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Printf = "1"
RelocatableFolders = "0.1, 0.3, 1"
TOML = "<0.0.1, 1"
UUIDs = "<0.0.1, 1"
julia = "1.6"
julia = "1.10"

[extras]
Example = "7876af07-990d-54b4-ab0e-23690620f79a"
Expand Down
20 changes: 6 additions & 14 deletions examples/MyApp/src/MyApp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ using HelloWorldC_jll
using Artifacts
using Distributed
using Random

# We seem to get problems with LLVMExtra_jll on Julia 1.6 and 1.9
# Issue for 1.6: https://github.com/JuliaLang/PackageCompiler.jl/issues/706
# There's no GitHub Issue for 1.9
@static if (VERSION.major, VERSION.minor) ∉ ((1, 6), (1, 9),)
using LLVMExtra_jll
end
using LLVMExtra_jll

using micromamba_jll

Expand Down Expand Up @@ -66,7 +60,7 @@ function real_main()

println("Running the artifact")
res = readchomp(`$(hello_world_path())`)
println("Artifact printed: $res")
println("Artifact printed: $res")

@show unsafe_string(Base.JLOptions().image_file)
@show Example.domath(5)
Expand All @@ -89,12 +83,10 @@ function real_main()
@eval @everywhere using Example
@everywhere println(Example.domath(3))

@static if (VERSION.major, VERSION.minor) ∉ ((1, 6), (1, 9),)
if isfile(LLVMExtra_jll.libLLVMExtra_path)
println("LLVMExtra path: ok!")
else
println("LLVMExtra path: fail!")
end
if isfile(LLVMExtra_jll.libLLVMExtra_path)
println("LLVMExtra path: ok!")
else
println("LLVMExtra path: fail!")
end

if isfile(micromamba_jll.micromamba_path)
Expand Down
31 changes: 5 additions & 26 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ include("library_selection.jl")
##############

const NATIVE_CPU_TARGET = "native"
const TLS_SYNTAX = VERSION >= v"1.7.0-DEV.1205" ? `-DNEW_DEFINE_FAST_TLS_SYNTAX` : ``
const TLS_SYNTAX = `-DNEW_DEFINE_FAST_TLS_SYNTAX`

const DEFAULT_EMBEDDING_WRAPPER = @path joinpath(@__DIR__, "embedding_wrapper.c")
const DEFAULT_JULIA_INIT = @path joinpath(@__DIR__, "julia_init.c")
Expand Down Expand Up @@ -78,22 +78,18 @@ function create_pkg_context(project)
end

function load_all_deps(ctx)
ctx_or_env = VERSION <= v"1.7.0-" ? ctx : ctx.env
env = ctx.env
if isdefined(Pkg.Operations, :load_all_deps!)
pkgs = Pkg.Types.PackageSpec[]
Pkg.Operations.load_all_deps!(ctx_or_env, pkgs)
Pkg.Operations.load_all_deps!(env, pkgs)
else
pkgs = Pkg.Operations.load_all_deps(ctx_or_env)
pkgs = Pkg.Operations.load_all_deps(env)
end
return pkgs
end

function source_path(ctx, pkg)
if VERSION <= v"1.7.0-"
Pkg.Operations.source_path(ctx, pkg)
else
Pkg.Operations.source_path(ctx.env.project_file, pkg)
end
Pkg.Operations.source_path(ctx.env.project_file, pkg)
end

const _STDLIBS = readdir(Sys.STDLIB)
Expand Down Expand Up @@ -379,28 +375,11 @@ function create_sysimg_object_file(object_file::String,
isexpr(ps, :call) || continue
popfirst!(ps.args) # precompile(...)
ps.head = :tuple
@static if VERSION <= v"1.9.0"
l = ps.args[end]
if (isexpr(l, :tuple) || isexpr(l, :curly)) && length(l.args) > 0 # Tuple{...} or (...)
# XXX: precompile doesn't currently handle overloaded Vararg arguments very well.
# Replacing N with a large number works around it.
l = l.args[end]
if isexpr(l, :curly) && length(l.args) == 2 && l.args[1] === :Vararg # Vararg{T}
push!(l.args, 100) # form Vararg{T, 100} instead
end
end
end
# println(ps)
local ps
while true
try
ps = Core.eval(PrecompileStagingArea, ps)
@static if VERSION <= v"1.9.0-beta1"
# XXX: precompile doesn't currently handle overloaded nospecialize arguments very well.
# Skipping them avoids the warning.
ms = length(ps) == 1 ? Base._methods_by_ftype(ps[1], 1, Base.get_world_counter()) : Base.methods(ps...)
ms isa Vector || @goto skip_precompile
end
break
catch e
if e isa UndefVarError
Expand Down
6 changes: 1 addition & 5 deletions src/library_selection.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ const required_libraries = Dict(
"mac" => ["libLLVM", "libatomic", "libdSFMT", "libgcc_s", "libgfortran", "libgmp", "libgmpxx", "libgomp", "libjulia-codegen", "libjulia-internal", "libmpfr", "libopenlibm", "libpcre2-8", "libquadmath", "libssp", "libstdc++", "libuv", "libz"]
)
push!(required_libraries["windows"], "libgcc_s_jlj")
if Sys.VERSION < v"1.7.0"
push!(required_libraries["mac"], "libosxunwind")
else
push!(required_libraries["mac"], "libunwind")
end
push!(required_libraries["mac"], "libunwind")
23 changes: 3 additions & 20 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ const is_gha_ci = tryparse(Bool, get(ENV, "GITHUB_ACTIONS", "")) === true
# macOS runners seem to be quite fast.)
const is_slow_ci = is_ci && Sys.ARCH == :aarch64 && !Sys.isapple()

const is_julia_1_6 = VERSION.major == 1 && VERSION.minor == 6
const is_julia_1_9 = VERSION.major == 1 && VERSION.minor == 9

if is_ci || is_gha_ci
@info "This is a CI job" Sys.ARCH VERSION is_ci is_gha_ci
end
Expand All @@ -41,15 +38,6 @@ if is_slow_ci
@warn "This is \"slow CI\" (defined as any non-macOS CI running on aarch64). Some tests will be skipped or modified." Sys.ARCH
end

const jlver_some_tests_skipped = [
is_julia_1_6,
is_julia_1_9,
]

if any(jlver_some_tests_skipped)
@warn "This is Julia $(VERSION.major).$(VERSION.minor). Some tests will be skipped or modified." VERSION
end

function remove_llvmextras(project_file)
proj = TOML.parsefile(project_file)
delete!(proj["deps"], "LLVMExtra_jll")
Expand Down Expand Up @@ -117,7 +105,7 @@ end
@info "starting: create_app testset" incremental filter
tmp_app_source_dir = joinpath(tmp, "MyApp")
cp(app_source_dir, tmp_app_source_dir)
if is_gha_ci && (is_julia_1_6 || is_julia_1_9)
if is_gha_ci
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd want to remove this entire if-end block.

# Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove.
# Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem.
@test_skip false
Expand Down Expand Up @@ -176,13 +164,8 @@ end
@test occursin("From worker 4:\t8", app_output)
@test occursin("From worker 5:\t8", app_output)

if is_julia_1_6 || is_julia_1_9
# Julia 1.6: Issue #706 "Cannot locate artifact 'LLVMExtra'" on 1.6 so remove.
# Julia 1.9: There's no GitHub Issue, but it seems we hit a similar problem.
@test_skip false
else
@test occursin("LLVMExtra path: ok!", app_output)
end

@test occursin("LLVMExtra path: ok!", app_output)
@test occursin("micromamba_jll path: ok!", app_output)

# Test second app
Expand Down
Loading