Compare commits

...

4 Commits

Author SHA1 Message Date
Ashcon Partovi
23ff937b3f Disable sccache 2024-08-01 17:51:37 -07:00
Ashcon Partovi
c844a4d5d8 Pushes to main use clean 2024-08-01 17:43:19 -07:00
Ashcon Partovi
e4edb9273e Use ccache recache 2024-08-01 17:39:23 -07:00
Ashcon Partovi
ae7df14a8a Workaround to deflake test and build issues 2024-08-01 17:31:28 -07:00
4 changed files with 35 additions and 28 deletions

View File

@@ -78,6 +78,7 @@ function export_environment() {
export CCACHE_DIR="$HOME/.cache/ccache/$BUILDKITE_STEP_KEY"
export SCCACHE_DIR="$HOME/.cache/sccache/$BUILDKITE_STEP_KEY"
export ZIG_LOCAL_CACHE_DIR="$HOME/.cache/zig-cache/$BUILDKITE_STEP_KEY"
export ZIG_GLOBAL_CACHE_DIR="$HOME/.cache/zig-cache/$BUILDKITE_STEP_KEY"
export BUN_DEPS_CACHE_DIR="$HOME/.cache/bun-deps/$BUILDKITE_STEP_KEY"
if [ "$(assert_arch)" == "aarch64" ]; then
export CPU_TARGET="native"
@@ -106,11 +107,13 @@ function export_environment() {
else
export USE_DEBUG_JSC="OFF"
fi
if [ "$BUILDKITE_CLEAN_CHECKOUT" == "true" ]; then
if [ "$BUILDKITE_CLEAN_CHECKOUT" == "true" || "$BUILDKITE_BRANCH" == "main" ]; then
rm -rf "$CCACHE_DIR"
rm -rf "$SCCACHE_DIR"
rm -rf "$ZIG_LOCAL_CACHE_DIR"
rm -rf "$ZIG_GLOBAL_CACHE_DIR"
rm -rf "$BUN_DEPS_CACHE_DIR"
export CCACHE_RECACHE="1"
fi
}

View File

@@ -487,7 +487,7 @@ if(USE_UNIFIED_SOURCES)
endif()
# CCache
find_program(CCACHE_PROGRAM sccache)
# find_program(CCACHE_PROGRAM sccache)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)

View File

@@ -103,7 +103,10 @@ if ($Lto) {
$CMAKE_FLAGS += "-DUSE_LTO=ON"
}
if (Get-Command sccache -ErrorAction SilentlyContinue) {
if (Get-Command ccache -ErrorAction SilentlyContinue) {
$CMAKE_FLAGS += "-DCMAKE_C_COMPILER_LAUNCHER=ccache"
$CMAKE_FLAGS += "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
} elseif (Get-Command sccache -ErrorAction SilentlyContinue) {
# Continue with local compiler if sccache has an error
$env:SCCACHE_IGNORE_SERVER_IO_ERROR = "1"

View File

@@ -134,36 +134,37 @@ async function printInfo() {
async function runTests() {
let execPath;
if (options["step"]) {
execPath = await getExecPathFromBuildKite(options["step"]);
downloadLoop: for (let i = 0; i < 10; i++) {
execPath = await getExecPathFromBuildKite(options["step"]);
for (let j = 0; j < 10; j++) {
const { error } = spawnSync(execPath, ["--version"], {
encoding: "utf-8",
timeout: spawnTimeout,
env: {
PATH: process.env.PATH,
BUN_DEBUG_QUIET_LOGS: 1,
},
});
if (!error) {
break;
}
const { code } = error;
if (code === "EBUSY") {
console.log("Bun appears to be busy, retrying...");
continue;
}
if (code === "UNKNOWN") {
console.log("Bun appears to be corrupted, downloading again...");
rmSync(execPath, { force: true });
continue downloadLoop;
}
}
}
} else {
execPath = getExecPath(options["exec-path"]);
}
console.log("Bun:", execPath);
for (let i = 0; i < 10; i++) {
try {
const { error } = spawnSync(execPath, ["--version"], {
encoding: "utf-8",
timeout: spawnTimeout,
env: {
PATH: process.env.PATH,
BUN_DEBUG_QUIET_LOGS: 1,
},
});
if (!error) {
break;
}
throw error;
} catch (error) {
const { code } = error;
if (code === "EBUSY" || code === "UNKNOWN") {
console.log(`Bun appears to be busy, retrying... [code: ${code}]`);
await new Promise(resolve => setTimeout(resolve, 1000 * (i + 1)));
continue;
}
}
}
const revision = getRevision(execPath);
console.log("Revision:", revision);