mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
GitHub actions
This commit is contained in:
2
.github/workflows/run-lint-cpp.yml
vendored
2
.github/workflows/run-lint-cpp.yml
vendored
@@ -4,6 +4,8 @@ permissions:
|
||||
contents: read
|
||||
env:
|
||||
LLVM_VERSION: 16
|
||||
LC_CTYPE: "en_US.UTF-8"
|
||||
LC_ALL: "en_US.UTF-8"
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"bump": "bun ./scripts/bump.ts",
|
||||
"build": "if [ ! -e build ]; then bun setup; fi && ninja -C build",
|
||||
"build:valgrind": "cmake . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-valgrind && ninja -Cbuild-valgrind",
|
||||
"build:tidy": "cmake --log-level=WARNING . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DBUN_TIDY_ONLY=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-tidy && ninja -Cbuild-tidy",
|
||||
"build:tidy": "BUN_SILENT=1 cmake --log-level=WARNING . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DBUN_TIDY_ONLY=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-tidy && BUN_SILENT=1 ninja -Cbuild-tidy",
|
||||
"build:tidy-extra": "cmake . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DBUN_TIDY_ONLY_EXTRA=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-tidy && ninja -Cbuild-tidy",
|
||||
"build:release": "cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -Bbuild-release && ninja -Cbuild-release",
|
||||
"build:debug-zig-release": "cmake . -DCMAKE_BUILD_TYPE=Release -DZIG_OPTIMIZE=Debug -GNinja -Bbuild-debug-zig-release && ninja -Cbuild-debug-zig-release",
|
||||
|
||||
@@ -41,12 +41,15 @@ const JS_DIR = path.join(CMAKE_BUILD_ROOT, "js");
|
||||
const t = new Bun.Transpiler({ loader: "tsx" });
|
||||
|
||||
let start = performance.now();
|
||||
function mark(log: string) {
|
||||
const silent = process.env.BUN_SILENT === "1";
|
||||
function markVerbose(log: string) {
|
||||
const now = performance.now();
|
||||
console.log(`${log} (${(now - start).toFixed(0)}ms)`);
|
||||
start = now;
|
||||
}
|
||||
|
||||
const mark = silent ? (log: string) => {} : markVerbose;
|
||||
|
||||
const { moduleList, nativeModuleIds, nativeModuleEnumToId, nativeModuleEnums, requireTransformer } =
|
||||
createInternalModuleRegistry(BASE);
|
||||
globalThis.requireTransformer = requireTransformer;
|
||||
@@ -431,19 +434,21 @@ writeIfNotChanged(js2nativeZigPath, getJS2NativeZig(js2nativeZigPath));
|
||||
|
||||
mark("Generate Code");
|
||||
|
||||
console.log("");
|
||||
console.timeEnd(timeString);
|
||||
console.log(
|
||||
` %s kb`,
|
||||
Math.floor(
|
||||
(moduleList.reduce((a, b) => a + outputs.get(b.slice(0, -3).replaceAll("/", path.sep)).length, 0) +
|
||||
globalThis.internalFunctionJSSize) /
|
||||
1000,
|
||||
),
|
||||
);
|
||||
console.log(` %s internal modules`, moduleList.length);
|
||||
console.log(
|
||||
` %s internal functions across %s files`,
|
||||
globalThis.internalFunctionCount,
|
||||
globalThis.internalFunctionFileCount,
|
||||
);
|
||||
if (!silent) {
|
||||
console.log("");
|
||||
console.timeEnd(timeString);
|
||||
console.log(
|
||||
` %s kb`,
|
||||
Math.floor(
|
||||
(moduleList.reduce((a, b) => a + outputs.get(b.slice(0, -3).replaceAll("/", path.sep)).length, 0) +
|
||||
globalThis.internalFunctionJSSize) /
|
||||
1000,
|
||||
),
|
||||
);
|
||||
console.log(` %s internal modules`, moduleList.length);
|
||||
console.log(
|
||||
` %s internal functions across %s files`,
|
||||
globalThis.internalFunctionCount,
|
||||
globalThis.internalFunctionFileCount,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user