Skip to content
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

[Runners] Do not generate toolchain files if we are bootstrapping #185

Merged
merged 3 commits into from
Dec 2, 2021
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 .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
jobs:
test:
name: Julia ${{ matrix.julia-version }} - x64 - runner ${{ matrix.runner }} - SquashFS ${{ matrix.squashfs }}
timeout-minutes: 45
timeout-minutes: 60
runs-on: ubuntu-latest
env:
BINARYBUILDER_RUNNER: ${{ matrix.runner }}
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BinaryBuilderBase"
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
authors = ["Elliot Saba <staticfloat@gmail.com>"]
version = "1.0.4"
version = "1.0.5"

[deps]
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
Expand Down
8 changes: 5 additions & 3 deletions src/DockerRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ function DockerRunner(workspace_root::String;
generate_compiler_wrappers!(platform; bin_path=compiler_wrapper_path, extract_kwargs(kwargs, (:compilers,:allow_unsafe_flags,:lock_microarchitecture))...)
push!(workspaces, compiler_wrapper_path => "/opt/bin")

# Generate CMake and Meson files
generate_toolchain_files!(platform, envs; toolchains_path=toolchains_path)
push!(workspaces, toolchains_path => "/opt/toolchains")
if isempty(bootstrap_list)
# Generate CMake and Meson files, only if we are not bootstrapping
generate_toolchain_files!(platform, envs; toolchains_path=toolchains_path)
push!(workspaces, toolchains_path => "/opt/toolchains")
end

# the workspace_root is always a workspace, and we always mount it first
insert!(workspaces, 1, workspace_root => "/workspace")
Expand Down
8 changes: 5 additions & 3 deletions src/UserNSRunner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ function UserNSRunner(workspace_root::String;
generate_compiler_wrappers!(platform; bin_path=compiler_wrapper_path, extract_kwargs(kwargs, (:compilers,:allow_unsafe_flags,:lock_microarchitecture))...)
push!(workspaces, compiler_wrapper_path => "/opt/bin")

# Generate CMake and Meson files
generate_toolchain_files!(platform, envs; toolchains_path=toolchains_path)
push!(workspaces, toolchains_path => "/opt/toolchains")
if isempty(bootstrap_list)
# Generate CMake and Meson files, only if we are not bootstrapping
generate_toolchain_files!(platform, envs; toolchains_path=toolchains_path)
push!(workspaces, toolchains_path => "/opt/toolchains")
end

# the workspace_root is always a workspace, and we always mount it first
insert!(workspaces, 1, workspace_root => "/workspace")
Expand Down
4 changes: 4 additions & 0 deletions test/runners.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ end

@testset "hello world" begin
mktempdir() do dir
# Make sure we can start a shell in a runner when the bootstrap list is non-empty
@eval BinaryBuilderBase bootstrap_list = [:rootfs, :platform_support]
ur = preferred_runner()(dir; platform=Platform("x86_64", "linux"; libc="musl"))
iobuff = IOBuffer()
@test run(ur, `/bin/bash -c "echo test"`, iobuff)
seek(iobuff, 0)
# Test that we get the output we expect (e.g. the second line is `test`)
@test readlines(iobuff)[2] == "test"
# Restore empty bootstrap list
@eval BinaryBuilderBase bootstrap_list = Symbol[]
end
end

Expand Down