Compare commits

...

28 Commits

Author SHA1 Message Date
Meghan Denny
7a15f2f654 fix 2024-12-09 23:27:09 -08:00
Meghan Denny
32aa69e0da export node externs too [build images] 2024-12-09 20:27:15 -08:00
Meghan Denny
6d879448aa [build images] 2024-12-09 19:37:35 -08:00
Meghan Denny
b53e5683d1 Merge branch 'main' into nektro-patch-11 2024-12-09 19:37:02 -08:00
Meghan Denny
96697cbbb8 expose the stubs [build images] 2024-12-09 19:35:35 -08:00
Meghan Denny
12f61eb666 remove these [build images] 2024-12-09 19:35:23 -08:00
Meghan Denny
14a3a15cd0 prettier doesn't make commit with [build images] 2024-12-09 17:30:48 -08:00
nektro
1b2d9cdd80 bun run prettier:extra 2024-12-10 01:29:04 +00:00
Meghan Denny
405eebdba0 real version of prev commit [build images] 2024-12-09 17:27:51 -08:00
Meghan Denny
a1d20ee54a macos doesnt build-image [build images] 2024-12-09 17:23:58 -08:00
Meghan Denny
e006781c42 combat dead code elimination [build image] 2024-12-09 17:13:21 -08:00
Meghan Denny
25e365d3fb make the test step depend on the image [build images] 2024-12-09 16:56:39 -08:00
Meghan Denny
3ee3a8ddab make this a define [build images] 2024-12-09 16:56:26 -08:00
Meghan Denny
6d07bb58f3 stub in cpp instead [build images] 2024-12-09 16:07:05 -08:00
Meghan Denny
3b2bea3e7a remove darwin x64 testing [build images] 2024-12-09 15:35:42 -08:00
Meghan Denny
62064490e6 add support for [build images] 2024-12-09 15:35:22 -08:00
Meghan Denny
9153916d69 Merge remote-tracking branch 'origin/main' into nektro-patch-11 2024-12-09 15:23:33 -08:00
Meghan Denny
53877382fb add a few more 2024-12-09 14:32:46 -08:00
Meghan Denny
3d28cd4eb0 support aarch64 too 2024-12-07 04:22:53 -08:00
Meghan Denny
2c6728a8ce remove these 2024-12-06 19:38:46 -08:00
Meghan Denny
ad7343a122 add more 2024-12-06 17:33:17 -08:00
Meghan Denny
9a670fc690 missed a semicolon again smh 2024-12-06 16:28:34 -08:00
Meghan Denny
9cf67e301b weakly define many more symbols 2024-12-06 16:03:01 -08:00
Meghan Denny
b84d96ab0d missing semicolon 2024-12-05 01:28:22 -08:00
Meghan Denny
2eb19063c1 implement v8::Array::Length() 2024-12-05 01:00:51 -08:00
Meghan Denny
d401eab461 undo this merge change 2024-12-04 23:10:47 -08:00
Meghan Denny
2ef22d5c2c Merge branch 'main' into nektro-patch-11 2024-12-04 23:07:07 -08:00
Meghan Denny
deab3a6029 ci: download right node version on musl x64 2024-12-03 23:10:07 -08:00
11 changed files with 5816 additions and 93 deletions

View File

@@ -103,7 +103,6 @@ function getTargetLabel(target) {
*/
const buildPlatforms = [
{ os: "darwin", arch: "aarch64", release: "14" },
// { os: "darwin", arch: "x64", release: "14" },
{ os: "linux", arch: "aarch64", distro: "debian", release: "11" },
{ os: "linux", arch: "x64", distro: "debian", release: "11" },
{ os: "linux", arch: "x64", baseline: true, distro: "debian", release: "11" },
@@ -120,8 +119,6 @@ const buildPlatforms = [
const testPlatforms = [
{ os: "darwin", arch: "aarch64", release: "14", tier: "latest" },
{ os: "darwin", arch: "aarch64", release: "13", tier: "previous" },
// { os: "darwin", arch: "x64", release: "14", tier: "latest" },
// { os: "darwin", arch: "x64", release: "13", tier: "previous" },
{ os: "linux", arch: "aarch64", distro: "debian", release: "12", tier: "latest" },
{ os: "linux", arch: "x64", distro: "debian", release: "12", tier: "latest" },
{ os: "linux", arch: "x64", baseline: true, distro: "debian", release: "12", tier: "latest" },
@@ -252,6 +249,7 @@ function getPriority() {
* @property {string} instanceType
* @property {number} cpuCount
* @property {number} threadsPerCore
* @property {boolean} dryRun
*/
/**
@@ -261,7 +259,7 @@ function getPriority() {
*/
function getEc2Agent(platform, options) {
const { os, arch, abi, distro, release } = platform;
const { instanceType, cpuCount, threadsPerCore } = options;
const { instanceType, cpuCount, threadsPerCore, dryRun } = options;
return {
os,
arch,
@@ -272,7 +270,7 @@ function getEc2Agent(platform, options) {
// https://github.com/oven-sh/robobun/blob/d46c07e0ac5ac0f9ffe1012f0e98b59e1a0d387a/src/robobun.ts#L1707
robobun: true,
robobun2: true,
"image-name": getImageName(platform),
"image-name": getImageName(platform, dryRun),
"instance-type": instanceType,
"cpu-count": cpuCount,
"threads-per-core": threadsPerCore,
@@ -284,7 +282,7 @@ function getEc2Agent(platform, options) {
* @param {Platform} platform
* @returns {string}
*/
function getCppAgent(platform) {
function getCppAgent(platform, dryRun) {
const { os, arch } = platform;
if (os === "darwin") {
@@ -299,6 +297,7 @@ function getCppAgent(platform) {
instanceType: arch === "aarch64" ? "c8g.16xlarge" : "c7i.16xlarge",
cpuCount: 32,
threadsPerCore: 1,
dryRun,
});
}
@@ -306,7 +305,7 @@ function getCppAgent(platform) {
* @param {Platform} platform
* @returns {Agent}
*/
function getZigAgent(platform) {
function getZigAgent(platform, dryRun) {
const { arch } = platform;
return {
@@ -332,7 +331,7 @@ function getZigAgent(platform) {
* @param {Platform} platform
* @returns {Agent}
*/
function getTestAgent(platform) {
function getTestAgent(platform, dryRun) {
const { os, arch } = platform;
if (os === "darwin") {
@@ -349,6 +348,7 @@ function getTestAgent(platform) {
instanceType: "c7i.2xlarge",
cpuCount: 2,
threadsPerCore: 1,
dryRun,
});
}
@@ -357,6 +357,7 @@ function getTestAgent(platform) {
instanceType: "c8g.xlarge",
cpuCount: 2,
threadsPerCore: 1,
dryRun,
});
}
@@ -364,6 +365,7 @@ function getTestAgent(platform) {
instanceType: "c7i.xlarge",
cpuCount: 2,
threadsPerCore: 1,
dryRun,
});
}
@@ -391,13 +393,14 @@ function getBuildEnv(target) {
/**
* @param {Platform} platform
* @param {boolean} dryRun
* @returns {Step}
*/
function getBuildVendorStep(platform) {
function getBuildVendorStep(platform, dryRun) {
return {
key: `${getTargetKey(platform)}-build-vendor`,
label: `${getTargetLabel(platform)} - build-vendor`,
agents: getCppAgent(platform),
agents: getCppAgent(platform, dryRun),
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform),
@@ -407,13 +410,14 @@ function getBuildVendorStep(platform) {
/**
* @param {Platform} platform
* @param {boolean} dryRun
* @returns {Step}
*/
function getBuildCppStep(platform) {
function getBuildCppStep(platform, dryRun) {
return {
key: `${getTargetKey(platform)}-build-cpp`,
label: `${getTargetLabel(platform)} - build-cpp`,
agents: getCppAgent(platform),
agents: getCppAgent(platform, dryRun),
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: {
@@ -444,12 +448,12 @@ function getBuildToolchain(target) {
* @param {Platform} platform
* @returns {Step}
*/
function getBuildZigStep(platform) {
function getBuildZigStep(platform, dryRun) {
const toolchain = getBuildToolchain(platform);
return {
key: `${getTargetKey(platform)}-build-zig`,
label: `${getTargetLabel(platform)} - build-zig`,
agents: getZigAgent(platform),
agents: getZigAgent(platform, dryRun),
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform),
@@ -459,9 +463,10 @@ function getBuildZigStep(platform) {
/**
* @param {Platform} platform
* @param {boolean} dryRun
* @returns {Step}
*/
function getLinkBunStep(platform) {
function getLinkBunStep(platform, dryRun) {
return {
key: `${getTargetKey(platform)}-build-bun`,
label: `${getTargetLabel(platform)} - build-bun`,
@@ -470,7 +475,7 @@ function getLinkBunStep(platform) {
`${getTargetKey(platform)}-build-cpp`,
`${getTargetKey(platform)}-build-zig`,
],
agents: getCppAgent(platform),
agents: getCppAgent(platform, dryRun),
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: {
@@ -483,13 +488,14 @@ function getLinkBunStep(platform) {
/**
* @param {Platform} platform
* @param {boolean} dryRun
* @returns {Step}
*/
function getBuildBunStep(platform) {
function getBuildBunStep(platform, dryRun) {
return {
key: `${getTargetKey(platform)}-build-bun`,
label: `${getTargetLabel(platform)} - build-bun`,
agents: getCppAgent(platform),
agents: getCppAgent(platform, dryRun),
retry: getRetry(),
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform),
@@ -502,6 +508,7 @@ function getBuildBunStep(platform) {
* @property {string} [buildId]
* @property {boolean} [unifiedTests]
* @property {string[]} [testFiles]
* @property {boolean} [dryRun]
*/
/**
@@ -511,7 +518,7 @@ function getBuildBunStep(platform) {
*/
function getTestBunStep(platform, options = {}) {
const { os } = platform;
const { buildId, unifiedTests, testFiles } = options;
const { buildId, unifiedTests, testFiles, dryRun } = options;
const args = [`--step=${getTargetKey(platform)}-build-bun`];
if (buildId) {
@@ -522,6 +529,9 @@ function getTestBunStep(platform, options = {}) {
}
const depends = [];
if (dryRun && os !== "darwin") {
depends.push(`${getImageKey(platform)}-build-image`);
}
if (!buildId) {
depends.push(`${getTargetKey(platform)}-build-bun`);
}
@@ -530,7 +540,7 @@ function getTestBunStep(platform, options = {}) {
key: `${getPlatformKey(platform)}-test-bun`,
label: `${getPlatformLabel(platform)} - test-bun`,
depends_on: depends,
agents: getTestAgent(platform),
agents: getTestAgent(platform, dryRun),
cancel_on_build_failing: isMergeQueue(),
retry: getRetry(),
soft_fail: isMainBranch() ? true : [{ exit_status: 2 }],
@@ -960,6 +970,8 @@ async function getPipelineOptions() {
skipBuilds: parseOption(/\[(skip builds?|no builds?|only tests?)\]/i),
forceBuilds: parseOption(/\[(force builds?)\]/i),
skipTests: parseOption(/\[(skip tests?|no tests?|only builds?)\]/i),
buildImages: parseOption(/\[(build images?)\]/i),
publishImages: parseOption(/\[(publish images?)\]/i),
buildPlatforms: Array.from(buildPlatformsMap.values()),
testPlatforms: Array.from(testPlatformsMap.values()),
buildProfiles: ["release"],
@@ -1032,12 +1044,12 @@ async function getPipeline(options = {}) {
key: getTargetKey(target),
group: getTargetLabel(target),
steps: unifiedBuilds
? [getBuildBunStep(target)]
? [getBuildBunStep(target, !!buildImages)]
: [
getBuildVendorStep(target),
getBuildCppStep(target),
getBuildZigStep(target),
getLinkBunStep(target),
getBuildVendorStep(target, !!buildImages),
getBuildCppStep(target, !!buildImages),
getBuildZigStep(target, !!buildImages),
getLinkBunStep(target, !!buildImages),
],
},
imagePlatform ? `${imageKey}-build-image` : undefined,
@@ -1055,7 +1067,7 @@ async function getPipeline(options = {}) {
.map(target => ({
key: getTargetKey(target),
group: getTargetLabel(target),
steps: [getTestBunStep(target, { unifiedTests, testFiles, buildId })],
steps: [getTestBunStep(target, { unifiedTests, testFiles, buildId, dryRun: !!buildImages })],
})),
);
}

View File

@@ -4,7 +4,7 @@ register_repository(
REPOSITORY
oven-sh/boringssl
COMMIT
29a2cd359458c9384694b75456026e4b57e3e567
033d4e8f4fd862b15dc101db6432aadfed670255
)
register_cmake_command(

View File

@@ -293,6 +293,11 @@ check_operating_system() {
fi
;;
esac
nodearch="$arch"
if [ "$arch" = "aarch64" ]; then
nodearch="arm64"
fi
}
check_inside_docker() {
@@ -588,6 +593,10 @@ install_common_software() {
install_packages \
dnf-plugins-core
;;
apk)
install_packages \
minisign
;;
esac
case "$distro" in
@@ -657,7 +666,12 @@ install_nodejs() {
case "$pm" in
apk)
install_packages nodejs npm
node_tar_url="http://mirrors.nektro.net/nodejs/release/v$(nodejs_version_exact)/node-v$(nodejs_version_exact)-linux-$nodearch-musl.tar.xz"
node_tar_file=$(download_file "$node_tar_url")
node_tar_minisgn=$(download_file "$node_tar_url.minisig")
execute mv "$node_tar_minisgn" "$(dirname $node_tar_file)"
execute minisign -Vm "$node_tar_file" -P RWSbSU2slSJU1eCLS8MhjPRg0+yT47pqyoupglip88N2gogeBDxiQmbi
execute tar -xJf "$node_tar_file" -C /usr/local --strip-components=1 --no-same-owner
;;
*)
install_packages nodejs

View File

@@ -23,4 +23,9 @@ Local<Array> Array::New(Isolate* isolate, Local<Value>* elements, size_t length)
return isolate->currentHandleScope()->createLocal<Array>(isolate->vm(), array);
}
uint32_t Array::Length() const
{
return jsCast<JSArray*>(this->localToJSValue())->length();
}
} // namespace v8

View File

@@ -11,6 +11,7 @@ namespace v8 {
class Array : public Object {
public:
BUN_EXPORT static Local<Array> New(Isolate* isolate, Local<Value>* elements, size_t length);
BUN_EXPORT uint32_t Length() const;
};
} // namespace v8

File diff suppressed because it is too large Load Diff

View File

@@ -11,6 +11,10 @@ BUN_1.1 {
v8::*;
node::*;
};
_ZN2v8*;
_ZN4node*;
local:
*;
};

View File

@@ -1821,71 +1821,6 @@ const NAPI_MODULE_VERSION = @as(c_int, 1);
///
// TODO: write a script to generate this struct. ideally it wouldn't even need to be committed to source.
const V8API = if (!bun.Environment.isWindows) struct {
pub extern fn _ZN2v87Isolate10GetCurrentEv() *anyopaque;
pub extern fn _ZN2v87Isolate13TryGetCurrentEv() *anyopaque;
pub extern fn _ZN2v87Isolate17GetCurrentContextEv() *anyopaque;
pub extern fn _ZN4node25AddEnvironmentCleanupHookEPN2v87IsolateEPFvPvES3_() *anyopaque;
pub extern fn _ZN4node28RemoveEnvironmentCleanupHookEPN2v87IsolateEPFvPvES3_() *anyopaque;
pub extern fn _ZN2v86Number3NewEPNS_7IsolateEd() *anyopaque;
pub extern fn _ZNK2v86Number5ValueEv() *anyopaque;
pub extern fn _ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS_13NewStringTypeEi() *anyopaque;
pub extern fn _ZNK2v86String9WriteUtf8EPNS_7IsolateEPciPii() *anyopaque;
pub extern fn _ZN2v812api_internal12ToLocalEmptyEv() *anyopaque;
pub extern fn _ZNK2v86String6LengthEv() *anyopaque;
pub extern fn _ZN2v88External3NewEPNS_7IsolateEPv() *anyopaque;
pub extern fn _ZNK2v88External5ValueEv() *anyopaque;
pub extern fn _ZN2v86Object3NewEPNS_7IsolateE() *anyopaque;
pub extern fn _ZN2v86Object3SetENS_5LocalINS_7ContextEEENS1_INS_5ValueEEES5_() *anyopaque;
pub extern fn _ZN2v86Object16SetInternalFieldEiNS_5LocalINS_4DataEEE() *anyopaque;
pub extern fn _ZN2v86Object20SlowGetInternalFieldEi() *anyopaque;
pub extern fn _ZN2v811HandleScope12CreateHandleEPNS_8internal7IsolateEm() *anyopaque;
pub extern fn _ZN2v811HandleScopeC1EPNS_7IsolateE() *anyopaque;
pub extern fn _ZN2v811HandleScopeD1Ev() *anyopaque;
pub extern fn _ZN2v811HandleScopeD2Ev() *anyopaque;
pub extern fn _ZN2v816FunctionTemplate11GetFunctionENS_5LocalINS_7ContextEEE() *anyopaque;
pub extern fn _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeEPKNS_9CFunctionEttt() *anyopaque;
pub extern fn _ZN2v814ObjectTemplate11NewInstanceENS_5LocalINS_7ContextEEE() *anyopaque;
pub extern fn _ZN2v814ObjectTemplate21SetInternalFieldCountEi() *anyopaque;
pub extern fn _ZNK2v814ObjectTemplate18InternalFieldCountEv() *anyopaque;
pub extern fn _ZN2v814ObjectTemplate3NewEPNS_7IsolateENS_5LocalINS_16FunctionTemplateEEE() *anyopaque;
pub extern fn _ZN2v824EscapableHandleScopeBase10EscapeSlotEPm() *anyopaque;
pub extern fn _ZN2v824EscapableHandleScopeBaseC2EPNS_7IsolateE() *anyopaque;
pub extern fn _ZN2v88internal35IsolateFromNeverReadOnlySpaceObjectEm() *anyopaque;
pub extern fn _ZN2v85Array3NewEPNS_7IsolateEPNS_5LocalINS_5ValueEEEm() *anyopaque;
pub extern fn _ZN2v88Function7SetNameENS_5LocalINS_6StringEEE() *anyopaque;
pub extern fn _ZNK2v85Value9IsBooleanEv() *anyopaque;
pub extern fn _ZNK2v87Boolean5ValueEv() *anyopaque;
pub extern fn _ZNK2v85Value10FullIsTrueEv() *anyopaque;
pub extern fn _ZNK2v85Value11FullIsFalseEv() *anyopaque;
pub extern fn _ZN2v820EscapableHandleScopeC1EPNS_7IsolateE() *anyopaque;
pub extern fn _ZN2v820EscapableHandleScopeC2EPNS_7IsolateE() *anyopaque;
pub extern fn _ZN2v820EscapableHandleScopeD1Ev() *anyopaque;
pub extern fn _ZN2v820EscapableHandleScopeD2Ev() *anyopaque;
pub extern fn _ZNK2v85Value8IsObjectEv() *anyopaque;
pub extern fn _ZNK2v85Value8IsNumberEv() *anyopaque;
pub extern fn _ZNK2v85Value8IsUint32Ev() *anyopaque;
pub extern fn _ZNK2v85Value11Uint32ValueENS_5LocalINS_7ContextEEE() *anyopaque;
pub extern fn _ZNK2v85Value11IsUndefinedEv() *anyopaque;
pub extern fn _ZNK2v85Value6IsNullEv() *anyopaque;
pub extern fn _ZNK2v85Value17IsNullOrUndefinedEv() *anyopaque;
pub extern fn _ZNK2v85Value6IsTrueEv() *anyopaque;
pub extern fn _ZNK2v85Value7IsFalseEv() *anyopaque;
pub extern fn _ZNK2v85Value8IsStringEv() *anyopaque;
pub extern fn _ZN2v87Boolean3NewEPNS_7IsolateEb() *anyopaque;
pub extern fn _ZN2v86Object16GetInternalFieldEi() *anyopaque;
pub extern fn _ZN2v87Context10GetIsolateEv() *anyopaque;
pub extern fn _ZN2v86String14NewFromOneByteEPNS_7IsolateEPKhNS_13NewStringTypeEi() *anyopaque;
pub extern fn _ZNK2v86String10Utf8LengthEPNS_7IsolateE() *anyopaque;
pub extern fn _ZNK2v86String10IsExternalEv() *anyopaque;
pub extern fn _ZNK2v86String17IsExternalOneByteEv() *anyopaque;
pub extern fn _ZNK2v86String17IsExternalTwoByteEv() *anyopaque;
pub extern fn _ZNK2v86String9IsOneByteEv() *anyopaque;
pub extern fn _ZNK2v86String19ContainsOnlyOneByteEv() *anyopaque;
pub extern fn _ZN2v812api_internal18GlobalizeReferenceEPNS_8internal7IsolateEm() *anyopaque;
pub extern fn _ZN2v812api_internal13DisposeGlobalEPm() *anyopaque;
pub extern fn _ZNK2v88Function7GetNameEv() *anyopaque;
pub extern fn _ZNK2v85Value10IsFunctionEv() *anyopaque;
pub extern fn _ZN2v812api_internal17FromJustIsNothingEv() *anyopaque;
pub extern fn uv_os_getpid() *anyopaque;
pub extern fn uv_os_getppid() *anyopaque;
} else struct {
@@ -1957,6 +1892,7 @@ const V8API = if (!bun.Environment.isWindows) struct {
pub extern fn @"?GetName@Function@v8@@QEBA?AV?$Local@VValue@v8@@@2@XZ"() *anyopaque;
pub extern fn @"?IsFunction@Value@v8@@QEBA_NXZ"() *anyopaque;
pub extern fn @"?FromJustIsNothing@api_internal@v8@@YAXXZ"() *anyopaque;
pub extern fn @"?Length@Array@v8@@QEBAHXZ"() *anyopaque;
};
// To update this list, use find + multi-cursor in your editor.

View File

@@ -629,3 +629,4 @@ EXPORTS
?GetName@Function@v8@@QEBA?AV?$Local@VValue@v8@@@2@XZ
?IsFunction@Value@v8@@QEBA_NXZ
?FromJustIsNothing@api_internal@v8@@YAXXZ
?Length@Array@v8@@QEBAHXZ

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff