Skip to content

Commit ca49b75

Browse files
authored
Merge branch 'main' into ganders/CC-6219
2 parents e7b1716 + cfbf415 commit ca49b75

File tree

499 files changed

+12850
-6086
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

499 files changed

+12850
-6086
lines changed

.bazeliskrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

.bazelrc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ build --test_size_filters=-enormous
1010
# corresponds to small,medium,large,enormous tests (medium is default)
1111
build --test_timeout=3,15,60,240
1212

13-
# Use GitHub mirror for BCR to work around bcr.bazel.build outages
14-
common --registry=https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/
15-
1613
# We're only using bzlmod in a nominal capacity so far
1714
common --enable_workspace
1815

.github/actions/setup-runner/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ runs:
3434
if: runner.os == 'Windows'
3535
# Set a custom output root directory to avoid long file name issues.
3636
run: |
37+
# Enable Developer Mode to allow Bazel to create real symlinks
38+
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
3739
git config --global core.symlinks true
3840
git config --show-scope --show-origin core.symlinks
3941
git config --system core.longpaths true

.github/workflows/_bazel.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
image:
66
type: string
77
required: false
8-
default: 'ubuntu-22.04'
8+
default: 'ubuntu-22.04-16core'
99
os_name:
1010
type: string
1111
required: false
@@ -144,15 +144,13 @@ jobs:
144144
run: |
145145
bazel build --config=parse_headers --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.devprod.cloudflare.dev --config=ci ${{ inputs.extra_bazel_args }} //src/workerd/util
146146
- name: Upload test logs
147-
if: inputs.upload_test_logs
147+
if: always() && inputs.upload_test_logs
148148
uses: actions/upload-artifact@v4
149149
with:
150150
name: test-logs-${{ inputs.os_name }}-${{ inputs.arch_name }}${{ inputs.suffix }}.zip
151151
path: bazel-testlogs/**/test.xml
152152
- name: Report disk usage (in MB)
153-
# This step takes a few seconds on Mac and Linux but takes 16 minutes on Windows for
154-
# some reason. It doesn't seem important enough to wait for 16 minutes on every build.
155-
if: runner.os != 'Windows'
153+
if: always() && runner.os != 'Windows'
156154
shell: bash
157155
run: |
158156
BAZEL_OUTPUT_BASE=$(bazel info output_base)
@@ -163,6 +161,26 @@ jobs:
163161
du -ms -t 1 $BAZEL_OUTPUT_BASE
164162
echo "Workspace usage statistics"
165163
du -ms -t 1 $GITHUB_WORKSPACE
164+
- name: Report disk usage (in MB)
165+
if: always() && runner.os == 'Windows'
166+
shell: pwsh
167+
run: |
168+
function Get-SizeMB($path) {
169+
if (Test-Path $path) {
170+
$size = (Get-ChildItem -Path $path -Recurse -Force -ErrorAction SilentlyContinue |
171+
Measure-Object -Property Length -Sum -ErrorAction SilentlyContinue).Sum
172+
[math]::Round($size / 1MB)
173+
} else { 0 }
174+
}
175+
$outputBase = bazel info output_base 2>$null
176+
$repoCache = bazel info repository_cache 2>$null
177+
echo "Bazel cache usage statistics"
178+
echo "$(Get-SizeMB $env:USERPROFILE\bazel-disk-cache)`t$env:USERPROFILE\bazel-disk-cache"
179+
echo "$(Get-SizeMB $repoCache)`t$repoCache"
180+
echo "Bazel output usage statistics"
181+
echo "$(Get-SizeMB $outputBase)`t$outputBase"
182+
echo "Workspace usage statistics"
183+
echo "$(Get-SizeMB $env:GITHUB_WORKSPACE)`t$env:GITHUB_WORKSPACE"
166184
167185
- name: Upload binary
168186
if: inputs.upload_binary
@@ -172,7 +190,7 @@ jobs:
172190
path: bazel-bin/src/workerd/server/workerd${{ runner.os == 'Windows' && '.exe' || '' }}
173191
if-no-files-found: error
174192
- name: Upload build statistics
175-
if: inputs.run_tests
193+
if: always() && inputs.run_tests
176194
uses: actions/upload-artifact@v4
177195
with:
178196
name: ${{ inputs.os_name }}${{ inputs.arch_name }}${{ inputs.suffix }}-bazel-profile
@@ -196,5 +214,6 @@ jobs:
196214
fi
197215
198216
- name: Bazel shutdown
217+
if: always()
199218
# Check that there are no .bazelrc issues that prevent shutdown.
200219
run: bazel shutdown

.github/workflows/codspeed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ permissions:
2424
jobs:
2525
benchmarks:
2626
name: Run benchmarks
27-
runs-on: ubuntu-22.04
27+
runs-on: ubuntu-22.04-16core
2828
env:
2929
BAZEL_ARGS: --config=benchmark --@google_benchmark//:codspeed_mode=instrumentation --remote_cache=https://bazel:${{ secrets.BAZEL_CACHE_KEY }}@bazel-remote-cache.devprod.cloudflare.dev
3030
steps:

.github/workflows/release.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,31 +77,31 @@ jobs:
7777
include:
7878
- title: linux
7979
os-name: Linux
80-
image: ubuntu-22.04
80+
image: ubuntu-22.04-16core
8181
bazel-config: release_linux
8282
target-arch: X64
8383
- title: linux-arm64
8484
os-name: Linux
85-
image: ubuntu-22.04-arm
85+
image: ubuntu-22.04-arm-16core
8686
bazel-config: release_linux
8787
target-arch: ARM64
8888
# Based on runner availability, we build both Apple Silicon and (cross-compiled) x86
89-
# release binaries on the macos-15 runner.
89+
# release binaries on the macos-15-xlarge runner.
9090
- title: macOS-x64
9191
os-name: macOS
92-
# This configuration is used for cross-compiling – macos-15 is Apple Silicon-based but
92+
# This configuration is used for cross-compiling – macos-15-xlarge is Apple Silicon-based but
9393
# we use it to compile the x64 release.
94-
image: macos-15
94+
image: macos-15-xlarge
9595
bazel-config: release_macos_cross_x86_64
9696
target-arch: X64
9797
- title: macOS-arm64
9898
os-name: macOS
99-
image: macos-15
99+
image: macos-15-xlarge
100100
bazel-config: release_macos
101101
target-arch: ARM64
102102
- title: windows
103103
os-name: Windows
104-
image: windows-2025
104+
image: windows-2025-16core
105105
bazel-config: release_windows
106106
target-arch: X64
107107
name: build (${{ matrix.title }})
@@ -237,7 +237,7 @@ jobs:
237237
publish-wrapper:
238238
name: Publish `workerd` to NPM
239239
needs: [version, upload-artifacts]
240-
runs-on: ubuntu-22.04
240+
runs-on: ubuntu-22.04-16core
241241
steps:
242242
- name: Checkout Repo
243243
uses: actions/checkout@v4
@@ -294,7 +294,7 @@ jobs:
294294
- run: cd npm/workerd && npm publish --access public --tag ${{ startsWith(needs.version.outputs.version, '0') && 'beta' || 'latest'}}
295295

296296
build-and-publish-types:
297-
runs-on: ubuntu-22.04
297+
runs-on: ubuntu-22.04-16core
298298
needs: [version, upload-artifacts]
299299
steps:
300300
- uses: actions/checkout@v4

.github/workflows/test.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
matrix:
3434
os:
3535
[
36-
{ name: linux, arch: X64, image: ubuntu-22.04 },
37-
{ name: linux-arm, arch: ARM64, image: ubuntu-22.04-arm },
38-
{ name: macOS, arch: ARM64, image: macos-15 },
39-
{ name: windows, arch: X64, image: windows-2025 },
36+
{ name: linux, arch: X64, image: ubuntu-22.04-16core },
37+
{ name: linux-arm, arch: ARM64, image: ubuntu-22.04-arm-16core },
38+
{ name: macOS, arch: ARM64, image: macos-15-xlarge, use_lld: true },
39+
{ name: windows, arch: X64, image: windows-2025-16core },
4040
]
4141
config: [
4242
# Default build: no suffix or additional bazel arguments
@@ -46,7 +46,7 @@ jobs:
4646
]
4747
include:
4848
# Add an Address Sanitizer (ASAN) build on Linux for additional checking.
49-
- os: { name: linux, arch: X64, image: ubuntu-22.04 }
49+
- os: { name: linux, arch: X64, image: ubuntu-22.04-16core }
5050
config: { suffix: -asan }
5151
# TODO (later): The custom Windows-debug configuration consistently runs out of disk
5252
# space on CI, disable it for now. Once https://github.com/bazelbuild/bazel/issues/21615
@@ -55,17 +55,17 @@ jobs:
5555
# - os: { name : windows, image : windows-2025 }
5656
# config: { suffix: -debug, bazel-args: --config=windows_dbg }
5757
exclude:
58-
- os: { name: windows, arch: X64, image: windows-2025 }
58+
- os: { name: windows, arch: X64, image: windows-2025-16core }
5959
config: { suffix: -debug }
6060
# due to resource constraints, exclude the macOS and x64 Linux debug runners for now.
6161
# linux-asan and arm64 linux-debug should provide sufficient coverage for building in the
6262
# debug configuration.
63-
- os: { name: macOS, arch: ARM64 ,image: macos-15 }
63+
- os: { name: macOS, arch: ARM64 ,image: macos-15-xlarge }
6464
config: { suffix: -debug }
65-
- os: { name: linux, arch: X64, image: ubuntu-22.04 }
65+
- os: { name: linux, arch: X64, image: ubuntu-22.04-16core }
6666
config: { suffix: -debug }
6767
# linux release is handled by separate test-linux job
68-
- os: { name: linux, arch: X64, image: ubuntu-22.04 }
68+
- os: { name: linux, arch: X64, image: ubuntu-22.04-16core }
6969
config: { suffix: '' }
7070
fail-fast: false
7171
name: test (${{ matrix.os.name }}, ${{ matrix.os.image}}${{matrix.config.suffix != '' && format(', {0}', matrix.config.suffix) || ''}})
@@ -76,6 +76,7 @@ jobs:
7676
arch_name: ${{ matrix.os.arch }}
7777
suffix: ${{ matrix.config.suffix }}
7878
extra_bazel_args: '--config=ci-test --config=ci-${{matrix.os.name}}${{matrix.config.suffix}}'
79+
macos_use_lld: ${{ matrix.os.use_lld || false }}
7980
secrets:
8081
BAZEL_CACHE_KEY: ${{ secrets.BAZEL_CACHE_KEY }}
8182
WORKERS_MIRROR_URL: ${{ secrets.WORKERS_MIRROR_URL }}
@@ -84,7 +85,7 @@ jobs:
8485
test-linux:
8586
uses: ./.github/workflows/_bazel.yml
8687
with:
87-
image: ubuntu-22.04
88+
image: ubuntu-22.04-16core
8889
os_name: linux
8990
arch_name: 'X64'
9091
suffix: ''
@@ -107,7 +108,7 @@ jobs:
107108
WORKERS_MIRROR_URL: ${{ secrets.WORKERS_MIRROR_URL }}
108109

109110
check-snapshot:
110-
runs-on: ubuntu-22.04
111+
runs-on: ubuntu-22.04-16core
111112
steps:
112113
- uses: actions/checkout@v4
113114
with:
@@ -169,7 +170,7 @@ jobs:
169170
workers-sdk-test:
170171
needs: [test-linux, check-snapshot]
171172
name: Run workers-sdk tests
172-
runs-on: ubuntu-22.04
173+
runs-on: ubuntu-22.04-16core
173174
steps:
174175
- name: Checkout workers-sdk
175176
uses: actions/checkout@v4
@@ -244,6 +245,6 @@ jobs:
244245
needs: [test-linux]
245246
uses: ./.github/workflows/_wpt.yml
246247
with:
247-
image: 'ubuntu-22.04'
248+
image: 'ubuntu-22.04-16core'
248249
logs_artifact: 'test-logs-linux-X64.zip'
249250
report_artifact: 'wpt-report-linux-X64.json'

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ The compiled binary will be located at `bazel-bin/src/workerd/server/workerd`.
103103
If you run a Bazel build before you've installed some dependencies (like clang or libc++), and then you install the dependencies, you must resync locally cached toolchains, or clean Bazel's cache, otherwise you might get strange errors:
104104

105105
```sh
106-
bazel sync --configure
106+
bazel fetch --configure --force
107107
```
108108

109109
If that fails, you can try:

WORKSPACE

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
11
workspace(name = "workerd")
2-
3-
load("//build/deps:dep_pyodide.bzl", "dep_pyodide")
4-
5-
dep_pyodide()

build/BUILD.nbytes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
2+
13
cc_library(
24
name = "nbytes",
35
srcs = ["src/nbytes.cpp"],

0 commit comments

Comments
 (0)