Skip to content

[AutoBuild] Always require JLLWrappers v1.7.0 #1357

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BinaryBuilder"
uuid = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
authors = ["Elliot Saba <staticfloat@gmail.com>"]
version = "0.6.1"
version = "0.6.2"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Expand Down
4 changes: 2 additions & 2 deletions src/AutoBuild.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import PkgLicenses

const DEFAULT_JULIA_VERSION_SPEC = "1.0"
const DEFAULT_JLLWRAPPERS_VERSION_SPEC = "1.2.0"
const DEFAULT_JLLWRAPPERS_VERSION_SPEC = "1.7.0"
const PKG_VERSIONS = Base.VERSION >= v"1.7-" ? Pkg.Versions : Pkg.Types

mutable struct BuildTimer
Expand Down Expand Up @@ -597,7 +597,7 @@
cache = RegistryTools.RegistryCache(joinpath(Pkg.depots1(), "registries_binarybuilder"))
registry_url = "https://$(gh_username):$(gh_auth.token)@github.com/JuliaRegistries/General"
cache.registries[registry_url] = Base.UUID("23338594-aafe-5451-b93e-139f81909106")
jllwrappers_compat = isempty(augment_platform_block) ? DEFAULT_JLLWRAPPERS_VERSION_SPEC : "1.4.0"
jllwrappers_compat = DEFAULT_JLLWRAPPERS_VERSION_SPEC

Check warning on line 600 in src/AutoBuild.jl

View check run for this annotation

Codecov / codecov/patch

src/AutoBuild.jl#L600

Added line #L600 was not covered by tests
project = Pkg.Types.Project(build_project_dict(name, build_version, dependencies, julia_compat; jllwrappers_compat, lazy_artifacts, augment_platform_block))
project_file = joinpath(mktempdir(), "Project.toml")
Pkg.Types.write_project(project, project_file)
Expand Down
6 changes: 3 additions & 3 deletions test/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ end
@test dict["name"] == "$(name)_jll"
@test dict["version"] == "1.0.0"
@test dict["uuid"] == "8fcd9439-76b0-55f4-a525-bad0597c05d8"
@test dict["compat"] == Dict{String,Any}("julia" => "1.0", "JLLWrappers" => "1.2.0", "Pkg" => "< 0.0.1, 1", "Libdl" => "< 0.0.1, 1", "Artifacts" => "< 0.0.1, 1")
@test dict["compat"] == Dict{String,Any}("julia" => "1.0", "JLLWrappers" => "1.7.0", "Pkg" => "< 0.0.1, 1", "Libdl" => "< 0.0.1, 1", "Artifacts" => "< 0.0.1, 1")
@test all(in.(
(
"Pkg" => "44cfe95a-1eb2-52ea-b672-e2afdf69b78f",
Expand All @@ -224,10 +224,10 @@ end

# Ensure passing a Julia dependency bound works
dict = build_project_dict(name, version, dependencies, "1.4")
@test dict["compat"] == Dict{String,Any}("julia" => "1.4", "JLLWrappers" => "1.2.0", "Pkg" => "< 0.0.1, 1", "Libdl" => "< 0.0.1, 1", "Artifacts" => "< 0.0.1, 1")
@test dict["compat"] == Dict{String,Any}("julia" => "1.4", "JLLWrappers" => "1.7.0", "Pkg" => "< 0.0.1, 1", "Libdl" => "< 0.0.1, 1", "Artifacts" => "< 0.0.1, 1")

dict = build_project_dict(name, version, dependencies, "~1.4")
@test dict["compat"] == Dict{String,Any}("julia" => "~1.4", "JLLWrappers" => "1.2.0", "Pkg" => "< 0.0.1, 1", "Libdl" => "< 0.0.1, 1", "Artifacts" => "< 0.0.1, 1")
@test dict["compat"] == Dict{String,Any}("julia" => "~1.4", "JLLWrappers" => "1.7.0", "Pkg" => "< 0.0.1, 1", "Libdl" => "< 0.0.1, 1", "Artifacts" => "< 0.0.1, 1")

@test_throws ErrorException build_project_dict(name, version, dependencies, "nonsense")

Expand Down
22 changes: 17 additions & 5 deletions test/building.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,17 @@ shards_to_test = expand_cxxstring_abis(expand_gfortran_versions(shards_to_test))
]

if !(platforms_match(shard, Platform("i686", "windows")) ||
platforms_match(shard, Platform("aarch64", "freebsd")))
# Rust is broken on 32-bit Windows and unavailable on FreeBSD AArch64, let's skip it
platforms_match(shard, Platform("aarch64", "freebsd")) ||
platforms_match(shard, Platform("riscv64", "linux")))
# Rust is broken on 32-bit Windows and unavailable on FreeBSD AArch64 and RISC-V, let's skip it
push!(products, ExecutableProduct("hello_world_rust", :hello_world_rust))
end

compilers = [:c, :go]
# Don't even ask for Rust on FreeBSD AArch64
if !platforms_match(shard, Platform("aarch64", "freebsd"))
# Don't even ask for Rust on FreeBSD AArch64 or RISC-V
if !(platforms_match(shard, Platform("aarch64", "freebsd")) ||
platforms_match(shard, Platform("riscv64", "linux"))
)
push!(compilers, :rust)
end

Expand All @@ -137,8 +140,17 @@ shards_to_test = expand_cxxstring_abis(expand_gfortran_versions(shards_to_test))
if [[ "${target}" == i686-*-mingw* ]]; then
while which rustc &> /dev/null; do rm $(which rustc); done
fi

FLAGS=()
if [[ "${target}" == riscv*-linux-* ]]; then
# There's currently a bug in the testsuite where we force linking to
# libquadmath on RISC-V. We use this hack to quickly fix it here without
# rebuilding the RootFS.
FLAGS=(CFLDFLAGS="-lgfortran -lm")
fi

# Build testsuite
make -j${nproc} -sC /usr/share/testsuite install
make -j${nproc} -sC /usr/share/testsuite install "${FLAGS[@]}"
# Install fake license just to silence the warning
install_license /usr/share/licenses/libuv/LICENSE
""",
Expand Down
2 changes: 1 addition & 1 deletion test/jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module TestJLL end
@test project["compat"] == Dict(
"julia" => "1.0",
"XZ_jll" => "=2.4.6",
"JLLWrappers" => "1.2.0",
"JLLWrappers" => "1.7.0",
"Libdl" => "< 0.0.1, 1",
"Artifacts" => "< 0.0.1, 1",
"Pkg" => "< 0.0.1, 1",
Expand Down
Loading