Install binaries
Some checks failed
CI / ci (Release, ubuntu-latest) (pull_request) Failing after 5m9s
CI / ci (Debug, ubuntu-latest) (pull_request) Failing after 17m48s

This commit is contained in:
David Gonzalez Martin 2025-06-21 12:07:06 -06:00
parent aa76d7e081
commit d3a3b33b53
2 changed files with 46 additions and 45 deletions

View File

@ -19,7 +19,7 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ ubuntu-latest ] os: [ ubuntu-latest ]
BIRTH_CMAKE_BUILD_TYPE: [ Debug, RelWithDebInfo, Release, MinSizeRel ] BIRTH_CMAKE_BUILD_TYPE: [ Debug, Release ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -30,7 +30,12 @@ jobs:
CMAKE_BUILD_TYPE: ${{matrix.BIRTH_CMAKE_BUILD_TYPE}} CMAKE_BUILD_TYPE: ${{matrix.BIRTH_CMAKE_BUILD_TYPE}}
CLANG_PATH: clang-19 CLANG_PATH: clang-19
CLANGXX_PATH: clang++-19 CLANGXX_PATH: clang++-19
GITEA_SHA: $(git rev-parse HEAD)
GITEA_REF: $(git rev-parse --abbrev-ref HEAD)
run: | run: |
set -eu
./generate.sh ./generate.sh
./build.sh ./build.sh
./build/bb test ./build/bb test
mkdir -p $HOME/bloat-buster-artifacts/$GITEA_REF/$GITEA_SHA/$CMAKE_BUILD_TYPE
mv ./self-hosted-bb-cache $HOME/bloat-buster-artifacts/$GITEA_REF/$GITEA_SHA/$CMAKE_BUILD_TYPE/cache

View File

@ -624,53 +624,49 @@ void entry_point(Slice<char* const> arguments, Slice<char* const> envp)
} }
} }
for (BuildMode compiler_build_mode = BuildMode::debug_none; compiler_build_mode < BuildMode::count; compiler_build_mode = (BuildMode)((backing_type(BuildMode))compiler_build_mode + 1)) BuildMode compiler_build_mode = BuildMode::debug_none;
{ bool compiler_has_debug_info = true;
for (bool compiler_has_debug_info : has_debug_info_array) auto compiler = compile_file(arena, {
{ .relative_file_path = string_literal("src/compiler.bbb"),
auto compiler = compile_file(arena, { .build_mode = compiler_build_mode,
.relative_file_path = string_literal("src/compiler.bbb"), .has_debug_info = compiler_has_debug_info,
.build_mode = compiler_build_mode, .silent = true,
.has_debug_info = compiler_has_debug_info,
.silent = true,
}); });
char* const compiler_arguments[] = char* const compiler_arguments[] =
{ {
(char*)compiler.pointer, (char*)compiler.pointer,
(char*)"test", (char*)"test",
0, 0,
}; };
Slice<char* const> arg_slice = array_to_slice(compiler_arguments); Slice<char* const> arg_slice = array_to_slice(compiler_arguments);
arg_slice.length -= 1; arg_slice.length -= 1;
auto execution = os_execute(arena, arg_slice, environment, {}); auto execution = os_execute(arena, arg_slice, environment, {});
auto success = execution.termination_kind == TerminationKind::exit && execution.termination_code == 0; auto success = execution.termination_kind == TerminationKind::exit && execution.termination_code == 0;
if (!success) if (!success)
{ {
print(string_literal("Self-hosted tests failed: ")); print(string_literal("Self-hosted tests failed: "));
print(build_mode_to_string(compiler_build_mode)); print(build_mode_to_string(compiler_build_mode));
print(compiler_has_debug_info ? string_literal(" with debug info\n") : string_literal(" with no debug info\n")); print(compiler_has_debug_info ? string_literal(" with debug info\n") : string_literal(" with no debug info\n"));
bb_fail(); bb_fail();
} }
char* const reproduce_arguments[] = char* const reproduce_arguments[] =
{ {
(char*)compiler.pointer, (char*)compiler.pointer,
(char*)"reproduce", (char*)"reproduce",
0, 0,
}; };
arg_slice = array_to_slice(reproduce_arguments); arg_slice = array_to_slice(reproduce_arguments);
arg_slice.length -= 1; arg_slice.length -= 1;
execution = os_execute(arena, arg_slice, environment, {}); execution = os_execute(arena, arg_slice, environment, {});
success = execution.termination_kind == TerminationKind::exit && execution.termination_code == 0; success = execution.termination_kind == TerminationKind::exit && execution.termination_code == 0;
if (!success) if (!success)
{ {
print(string_literal("Self-hosted reproduction failed: ")); print(string_literal("Self-hosted reproduction failed: "));
print(build_mode_to_string(compiler_build_mode)); print(build_mode_to_string(compiler_build_mode));
print(compiler_has_debug_info ? string_literal(" with debug info\n") : string_literal(" with no debug info\n")); print(compiler_has_debug_info ? string_literal(" with debug info\n") : string_literal(" with no debug info\n"));
bb_fail(); bb_fail();
}
}
} }
} break; } break;
case Command::count: case Command::count: