From 21057638ee1872cb079c8b07e0074bcf313510c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 20 Apr 2021 01:24:42 +0100 Subject: [PATCH 1/4] Run the testsuite for one platform as sanity check --- test/runners.jl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/runners.jl b/test/runners.jl index 22687abf..9eff61c2 100644 --- a/test/runners.jl +++ b/test/runners.jl @@ -189,3 +189,18 @@ end end end end + +@testset "Shards" begin + # Run the testsuite as sanity check + @testset "testsuite" begin + mktempdir() do dir + ur = preferred_runner()(dir; platform=Platform("x86_64", "linux"; libc="glibc"), preferred_gcc_version=v"5", compilers=[:c, :rust, :go]) + iobuff = IOBuffer() + test_script = raw""" + set -e + make -j${nproc} -sC /usr/share/testsuite install + """ + @test run(ur, `/bin/bash -c "$(test_script)"`, iobuff; tee_stream=devnull) + end + end +end From 1b17deef7f5391993ae50313d39eff941a5b6b9a Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Sat, 24 Apr 2021 03:59:59 +0000 Subject: [PATCH 2/4] Add protection from double `--target` specification in `rustc` wrapper This may be a little bit too strict; we'll have to see. --- src/Runner.jl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/Runner.jl b/src/Runner.jl index 9bb38b46..ccecd4cd 100644 --- a/src/Runner.jl +++ b/src/Runner.jl @@ -457,7 +457,6 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr # Rust stuff function rust_flags!(p::AbstractPlatform, flags::Vector{String} = String[]) - push!(flags, "--target=$(map_rust_target(p))") if Sys.islinux(p) push!(flags, "-Clinker=$(aatriplet(p))-gcc") @@ -474,7 +473,20 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr end return flags end - rustc(io::IO, p::AbstractPlatform) = wrapper(io, "/opt/$(host_target)/bin/rustc"; flags=rust_flags!(p), allow_ccache=false) + function rustc(io::IO, p::AbstractPlatform) + extra_cmds = """ + if [[ " \${ARGS[@]} " == *'--target'* ]]; then + if ! [[ " \${ARGS[@]} " =~ --target(=| )$(map_rust_target(p)) ]]; then + echo "Attempting to invoke targeted 'rustc' wrapper with a different target! (Expected $(map_rust_target(p)))" >&2 + echo "args: \${ARGS[@]}" >&2 + exit 1 + fi + else + PRE_FLAGS+=( '--target=$(map_rust_target(p))' ) + fi + """ + wrapper(io, "/opt/$(host_target)/bin/rustc"; flags=rust_flags!(p), allow_ccache=false, extra_cmds=extra_cmds) + end rustup(io::IO, p::AbstractPlatform) = wrapper(io, "/opt/$(host_target)/bin/rustup"; allow_ccache=false) cargo(io::IO, p::AbstractPlatform) = wrapper(io, "/opt/$(host_target)/bin/cargo"; allow_ccache=false) From 7221e657c2789c52f3529d7c89155a3976894011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 27 Apr 2021 00:01:13 +0100 Subject: [PATCH 3/4] [CI] Delete `/opt` before running tests to make up some space --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef03ed99..d7eaea17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,8 @@ jobs: version: ${{ matrix.julia-version }} arch: x64 - uses: julia-actions/julia-buildpkg@latest + - name: Clean up + run: sudo rm -rf /opt - name: System info run: julia --project=. --color=yes -e "using BinaryBuilderBase; BinaryBuilderBase.versioninfo()" - uses: julia-actions/julia-runtest@latest From 4b9f737f68bd1cc1b23b26a6e51d7c14091f7e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Tue, 27 Apr 2021 01:00:07 +0100 Subject: [PATCH 4/4] Bump version to v0.6.1 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 93614e06..3df354c8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "BinaryBuilderBase" uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e" authors = ["Elliot Saba "] -version = "0.6.0" +version = "0.6.1" [deps] CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"