Commit Graph

146 Commits

Author SHA1 Message Date
SUZUKI Sosuke
3feea91087 ci: add QEMU JIT stress tests when WebKit is updated (#26589)
## Summary

Add a CI step that runs JSC JIT stress tests under QEMU when
`SetupWebKit.cmake` is modified. This complements #26571 (basic baseline
CPU verification) by also testing JIT-generated code.

## Motivation

PR #26571 added QEMU-based verification that catches illegal
instructions in:
- Startup code
- Static initialization
- Basic interpreter execution

However, JIT compilers (DFG, FTL, Wasm BBQ/OMG) generate code at runtime
that could emit AVX or LSE instructions even if the compiled binary
doesn't. The JSC stress tests from #26380 exercise all JIT tiers through
hot loops that trigger tier-up.

## How it works

1. Detects if `cmake/tools/SetupWebKit.cmake` is modified in the PR
2. If WebKit changes are detected, runs `verify-jit-stress-qemu.sh`
after the build
3. Executes all 78 JIT stress test fixtures under QEMU with restricted
CPU features:
   - x64: `qemu-x86_64 -cpu Nehalem` (SSE4.2, no AVX)
   - aarch64: `qemu-aarch64 -cpu cortex-a53` (ARMv8.0-A, no LSE)
4. Any SIGILL from JIT-generated code fails the build

## Platforms tested

| Target | CPU Model | What it catches |
|---|---|---|
| `linux-x64-baseline` | Nehalem | JIT emitting AVX/AVX2/AVX512 |
| `linux-x64-musl-baseline` | Nehalem | JIT emitting AVX/AVX2/AVX512 |
| `linux-aarch64` | Cortex-A53 | JIT emitting LSE atomics, SVE |
| `linux-aarch64-musl` | Cortex-A53 | JIT emitting LSE atomics, SVE |

## Timeout

The step has a 30-minute timeout since QEMU emulation is ~10-50x slower
than native. This only runs on WebKit update PRs, so it won't affect
most CI runs.

## Refs

- #26380 - Added JSC JIT stress tests
- #26571 - Added basic QEMU baseline verification
2026-01-29 21:12:36 -08:00
Dylan Conway
baea21f0c7 ci: add QEMU-based baseline CPU verification steps (#26571)
## Summary

Add CI steps that verify baseline builds don't use CPU instructions
beyond their target. Uses QEMU user-mode emulation with restricted CPU
features — any illegal instruction causes SIGILL and fails the build.

## Platforms verified

| Build Target | QEMU Command | What it catches |
|---|---|---|
| `linux-x64-baseline` (glibc) | `qemu-x86_64 -cpu Nehalem` | AVX, AVX2,
AVX512 |
| `linux-x64-musl-baseline` | `qemu-x86_64 -cpu Nehalem` | AVX, AVX2,
AVX512 |
| `linux-aarch64` (glibc) | `qemu-aarch64 -cpu cortex-a35` | LSE
atomics, SVE, dotprod |
| `linux-aarch64-musl` | `qemu-aarch64 -cpu cortex-a35` | LSE atomics,
SVE, dotprod |

## How it works

Each verify step:
1. Downloads the built binary artifact from the `build-bun` step
2. Installs `qemu-user-static` on-the-fly (dnf/apk/apt-get)
3. Runs two smoke tests under QEMU with restricted CPU features:
   - `bun --version` — validates startup, linker, static init code
   - `bun -e eval` — validates JSC initialization and basic execution
4. Hard fails on SIGILL (exit code 132)

The verify step runs in the build group after `build-bun`, with a
5-minute timeout.

## Known issue this will surface

**mimalloc on aarch64**: Built with `MI_OPT_ARCH=ON` which adds
`-march=armv8.1-a`, enabling LSE atomics. This will SIGILL on
Cortex-A35/A53 CPUs. The aarch64 verify steps are expected to fail
initially, confirming the test catches real issues. Fix can be done
separately in `cmake/targets/BuildMimalloc.cmake`.
2026-01-29 15:53:34 -08:00
robobun
2a9980076d feat(windows): Add Windows ARM64 support (#26215) 2026-01-22 04:22:45 -08:00
Jarred Sumner
dda9a9b0fd Increase shard count for Windows & Linux test runs (#25913)
### What does this PR do?

### How did you verify your code works?
2026-01-08 14:38:35 -08:00
robobun
81b4a40fbd [publish images] Remove sccache, use ccache only (#25682)
## Summary
- Remove sccache support entirely, use ccache only
- Missing ccache no longer fails the build (just skips caching)
- Remove S3 distributed cache support

## Changes
- Remove `cmake/tools/SetupSccache.cmake` and S3 distributed cache
support
- Simplify `CMakeLists.txt` to only use ccache
- Update `SetupCcache.cmake` to not fail when ccache is missing
- Replace sccache with ccache in bootstrap scripts (sh, ps1)
- Update `.buildkite/Dockerfile` to install ccache instead of sccache
- Update `flake.nix` and `shell.nix` to use ccache
- Update documentation (CONTRIBUTING.md, contributing.mdx,
building-windows.mdx)
- Remove `scripts/build-cache/` directory (was only for sccache S3
access)

## Test plan
- [x] Build completes successfully with `bun bd`

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-26 20:24:27 -08:00
Jarred Sumner
08e03814e5 [publish images] Fix CI, remove broken freebsd image step 2025-12-24 20:02:56 -08:00
SUZUKI Sosuke
bffccf3d5f Upgrade WebKit 2025/12/07 (#25429)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Claude Bot <claude-bot@bun.sh>
2025-12-23 22:24:18 -08:00
Meghan Denny
24bc8aa416 ci: remove ubuntu 24 (#25288)
redundant with 25
2025-12-01 17:01:14 -08:00
Meghan Denny
5bdb8ec0cb all: update to debian 13 (#24055) [publish images] 2025-11-28 15:01:40 -08:00
Meghan Denny
22f4dfae7c ci: fix release step
don't try to release freebsd yet
2025-11-25 22:27:02 -08:00
Meghan Denny
9fce97bac3 scripts: add freebsd support to bootstrap.sh (#24534) 2025-11-25 17:16:38 -08:00
Marko Vejnovic
e03d3bee10 ci(ENG-21502): Fix sccache not working inside Docker (#24597) 2025-11-12 14:40:12 -08:00
Meghan Denny
e0aae8adc1 ci: remove unified-builds and unified-tests options (#24626) 2025-11-11 22:52:46 -08:00
Meghan Denny
7a931d5b26 [publish images] 2025-11-07 16:41:57 -08:00
Meghan Denny
2b42be9dcc [publish images] 2025-11-07 16:40:13 -08:00
Meghan Denny
d0a1984a20 ci: skip running tests when a PR only changes docs (#24459)
fixes https://linear.app/oven/issue/ENG-21489
2025-11-07 15:52:37 -08:00
Marko Vejnovic
267be9a54a ci(ENG-21474): Minor Cleanup (#24450) 2025-11-06 17:26:19 -08:00
Marko Vejnovic
782f684b2e build(ENG-21330): Replace ccache with sccache (#24200) 2025-11-05 14:30:56 -08:00
Meghan Denny
fb1fbe62e6 ci: update alpine linux to 3.22 (#24052) [publish images] 2025-10-25 15:52:34 -07:00
Meghan Denny
92bc522e85 lsan: fix reporting on linux ci (#22806) 2025-09-24 00:47:52 -07:00
Meghan Denny
b82c676ce5 ci: increase asan to 2xlarge (#22916) 2025-09-23 14:16:01 -07:00
connerlphillippi
73fe9a4484 Add Windows code signing setup for x64 builds (#22022)
## Summary
- Implements automated Windows code signing for x64 and x64-baseline
builds
- Integrates DigiCert KeyLocker for secure certificate management
- Adds CI/CD pipeline support for signing during builds

## Changes
- Added `.buildkite/scripts/sign-windows.sh` script for automated
signing
- Updated CMake configurations to support signing workflow
- Modified build scripts to integrate signing step

## Testing
- Script tested locally with manual signing process
- Successfully signed test binaries at:
  - `C:\Builds\bun-windows-x64\bun.exe`
  - `C:\Builds\bun-windows-x64-baseline\bun.exe`

## References
Uses DigiCert KeyLocker tools for Windows signing

## Next Steps
- Validate Buildkite environment variables in CI
- Test full pipeline in CI environment

---------

Co-authored-by: Jarred Sumner <jarred@bun.sh>
Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-22 03:53:57 -07:00
Meghan Denny
a9d62d58ea Revert "ci: lower windows test agent from c7i.2xlarge to c7i.xlarge (#21707)" (#21717) 2025-08-08 22:45:26 -07:00
Meghan Denny
f5c138d646 ci: lower build-cpp agent from 16xlarge to 4xlarge (#21711)
this instance type was reported to be our 1st most expensive per aws
bill

as long as it finishes before build-zig it doesnt affect the total run
time

----

<img width="1512" height="165" alt="image"
src="https://github.com/user-attachments/assets/8581f0d6-348c-4be8-98e2-bff8f659b26f"
/>

<img width="1512" height="163" alt="image"
src="https://github.com/user-attachments/assets/cefd5a50-26b2-4dfb-8592-f723874bc461"
/>

<img width="1512" height="164" alt="image"
src="https://github.com/user-attachments/assets/7234cc28-2f7d-4ffa-97c1-67106749dd4e"
/>
2025-08-08 18:52:21 -07:00
Meghan Denny
5893ae99c2 ci: lower link-bun agent from c7i.16xlarge to r7i.large (#21706)
this instance type was reported to be our 1st most expensive per aws
bill

----

before:

x64-linux: 19.5m
arm64-linux: 14m
x64-musl: 16.3m
arm64-musl: 13.3m
x64-windows: 2m

after:

x64-linux: 20.3m
arm64-linux: 15.3m
x64-musl: 16m
arm64-musl: 13.5m
x64-windows: 2.5m
2025-08-08 17:44:05 -07:00
Meghan Denny
0c46791d28 ci: lower windows test agent from c7i.2xlarge to c7i.xlarge (#21707)
this instance type was reported to be our 2nd most expensive per aws
bill
2025-08-08 17:06:33 -07:00
Jarred Sumner
f5b397c040 Revert "ci: increase mac test parallelism to 7" (#21690)
Reverts oven-sh/bun#21530
2025-08-07 18:36:10 -07:00
Meghan Denny
e9dc25200a ci: increase mac test parallelism to 7 (#21530) 2025-08-05 23:17:18 -07:00
Meghan Denny
75027e9616 ci: give windows a bit more time for tests
noticed in the wild napi compiling slow
2025-07-23 18:04:20 -07:00
Meghan Denny
a242c878c3 [publish images] ci: add ubuntu 25.04 (#20996)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2025-07-15 01:22:41 -07:00
Meghan Denny
dbd577cde6 ci: download exact version of node specifed (#20936)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-07-12 00:53:52 -07:00
190n
172aecb02e [publish images] Upgrade self-reported Node.js version from 22.6.0 to 24.3.0 (v2) (#20772)
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
Co-authored-by: pfg <pfg@pfg.pw>
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-07-02 12:06:08 -07:00
Ben Grant
ea57037567 Revert "Upgrade self-reported Node.js version from 22.6.0 to 24.3.0 (#20659) [publish images]"
This reverts commit 80309e4d59. It breaks the Windows CI.
2025-07-02 09:40:32 -07:00
Jarred Sumner
80309e4d59 Upgrade self-reported Node.js version from 22.6.0 to 24.3.0 (#20659) [publish images]
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Meghan Denny <meghan@bun.sh>
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
Co-authored-by: pfg <pfg@pfg.pw>
Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Ben Grant <ben@bun.sh>
2025-07-02 00:03:05 -07:00
Roman A
13ea970852 A couple grammar fixes (#20096) 2025-05-31 19:14:51 -07:00
Ashcon Partovi
da87890532 ci: Fix build image step with zig (#20023) 2025-05-29 16:07:35 -07:00
Ashcon Partovi
cd0756c95c Revert "ci: Fix build image step with cross-compiled zig"
This reverts commit c92f3f7b72.
2025-05-29 12:44:43 -07:00
Ashcon Partovi
c92f3f7b72 ci: Fix build image step with cross-compiled zig 2025-05-29 12:43:29 -07:00
Meghan Denny
809992229f node:net rework (#18962)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-05-28 17:04:37 -07:00
190n
d1ac52da2c ci: use ARM EC2 instances for build-zig (#19781) 2025-05-20 12:41:06 -07:00
pfg
862ae48ebd add back perf tester (#19484) 2025-05-05 19:40:29 -07:00
Ashcon Partovi
c130d1bd69 ci: Switch build-zig to use EC2 (#19487) 2025-05-05 18:05:08 -07:00
Jarred Sumner
c419ae587a Fix CI build 2025-05-03 17:00:48 -07:00
Jarred Sumner
ffa1d85642 Update ci.mjs 2025-05-03 04:02:16 -07:00
Jarred Sumner
26ae8b7ff6 Update ci.mjs 2025-05-03 03:58:36 -07:00
Jarred Sumner
9639630110 Disable benchmark step for now 2025-05-03 03:47:54 -07:00
Jarred Sumner
d8a69d6823 Enable ASAN with linux-x64-asan in CI 2025-05-02 10:44:09 -07:00
Ashcon Partovi
397aa4a8a4 ci: merge build c++ and build vendor steps (#19292) 2025-04-25 18:11:33 -07:00
Meghan Denny
f2c8e63ae1 update to llvm 19 and c++ 23 (#18317)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-03-20 21:44:19 -07:00
Meghan Denny
50b36696f8 ci: upgrade to alpine 3.21 (#18054) 2025-03-14 23:52:39 -07:00