bitcode build fix (#7394)

* new broader workaround
This commit is contained in:
Anton-4 2024-12-20 20:38:56 +01:00 committed by GitHub
parent c9a1ca84b4
commit 1bae24b3ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -174,23 +174,21 @@ fn run_command(mut command: Command, flaky_fail_counter: usize) {
Err(_) => format!("Failed to run \"{command_str}\""),
};
// Flaky test errors that only occur sometimes on MacOS ci server.
if error_str.contains("FileNotFound")
|| error_str.contains("unable to save cached ZIR code")
|| error_str.contains("LLVM failed to emit asm")
|| error_str.contains("ir-wasm32 transitive failure")
{
if flaky_fail_counter == 10 {
internal_error!("{} failed 10 times in a row. The following error is unlikely to be a flaky error: {}", command_str, error_str);
} else {
run_command(command, flaky_fail_counter + 1)
}
} else if error_str
if error_str
.contains("lld-link: error: failed to write the output file: Permission denied")
{
internal_error!("{} failed with:\n\n {}\n\nWorkaround:\n\n Re-run the cargo command that triggered this build.\n\n", command_str, error_str);
} else {
internal_error!("{} failed with:\n\n {}\n", command_str, error_str);
// We have bunch of flaky failures here on macos, particularly since upgrading to zig 13 github.com/roc-lang/roc/pull/6921
if cfg!(target_os = "macos") {
if flaky_fail_counter == 10 {
internal_error!("{} failed 10 times in a row. The following error is unlikely to be a flaky error: {}", command_str, error_str);
} else {
run_command(command, flaky_fail_counter + 1)
}
} else {
internal_error!("{} failed with:\n\n {}\n", command_str, error_str);
}
}
}
},