Skip to content

Commit 2b9abd2

Browse files
authored
[Runners] Do not generate toolchain files if we are bootstrapping (#185)
* [Runners] Do not generate toolchain files if we are bootstrapping * [Runners] Add test about starting a bootstrap runner * [CI] Further increase timeout to 60 minutes
1 parent fb93175 commit 2b9abd2

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ env:
1414
jobs:
1515
test:
1616
name: Julia ${{ matrix.julia-version }} - x64 - runner ${{ matrix.runner }} - SquashFS ${{ matrix.squashfs }}
17-
timeout-minutes: 45
17+
timeout-minutes: 60
1818
runs-on: ubuntu-latest
1919
env:
2020
BINARYBUILDER_RUNNER: ${{ matrix.runner }}

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BinaryBuilderBase"
22
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
33
authors = ["Elliot Saba <staticfloat@gmail.com>"]
4-
version = "1.0.4"
4+
version = "1.0.5"
55

66
[deps]
77
CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"

src/DockerRunner.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,11 @@ function DockerRunner(workspace_root::String;
9292
generate_compiler_wrappers!(platform; bin_path=compiler_wrapper_path, extract_kwargs(kwargs, (:compilers,:allow_unsafe_flags,:lock_microarchitecture))...)
9393
push!(workspaces, compiler_wrapper_path => "/opt/bin")
9494

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

99101
# the workspace_root is always a workspace, and we always mount it first
100102
insert!(workspaces, 1, workspace_root => "/workspace")

src/UserNSRunner.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ function UserNSRunner(workspace_root::String;
4747
generate_compiler_wrappers!(platform; bin_path=compiler_wrapper_path, extract_kwargs(kwargs, (:compilers,:allow_unsafe_flags,:lock_microarchitecture))...)
4848
push!(workspaces, compiler_wrapper_path => "/opt/bin")
4949

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

5456
# the workspace_root is always a workspace, and we always mount it first
5557
insert!(workspaces, 1, workspace_root => "/workspace")

test/runners.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,16 @@ end
6060

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

0 commit comments

Comments
 (0)