Skip to content

Commit faf862d

Browse files
bartlomiejuclaude
andcommitted
add prebuilt simdutf artifacts to CI matrix
Instead of requiring V8_FROM_SOURCE for simdutf, add CI matrix entries to build and publish prebuilt binaries with the simdutf feature enabled. This mirrors the existing pattern used for v8_enable_pointer_compression. Adds debug+release builds for: x86_64-apple-darwin, aarch64-apple-darwin, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7e955f1 commit faf862d

File tree

2 files changed

+64
-13
lines changed

2 files changed

+64
-13
lines changed

.github/workflows/ci.yml

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions: write-all
1212

1313
jobs:
1414
build:
15-
name: ${{ matrix.config.variant }} ${{ matrix.config.target }} ${{ matrix.config.v8_enable_pointer_compression && 'ptrcomp' || '' }}
15+
name: ${{ matrix.config.variant }} ${{ matrix.config.target }} ${{ matrix.config.v8_enable_pointer_compression && 'ptrcomp' || '' }} ${{ matrix.config.simdutf && 'simdutf' || '' }}
1616
runs-on: ${{ matrix.config.os }}
1717
timeout-minutes: 180
1818
strategy:
@@ -117,13 +117,70 @@ jobs:
117117
v8_enable_pointer_compression: false
118118
cargo: cargo
119119

120+
# simdutf builds
121+
- os: macos-15-large
122+
target: x86_64-apple-darwin
123+
variant: debug
124+
v8_enable_pointer_compression: false
125+
simdutf: true
126+
cargo: cargo
127+
128+
- os: macos-15-large
129+
target: x86_64-apple-darwin
130+
variant: release
131+
v8_enable_pointer_compression: false
132+
simdutf: true
133+
cargo: cargo
134+
135+
- os: macos-15
136+
target: aarch64-apple-darwin
137+
variant: debug
138+
v8_enable_pointer_compression: false
139+
simdutf: true
140+
cargo: cargo
141+
142+
- os: macos-15
143+
target: aarch64-apple-darwin
144+
variant: release
145+
v8_enable_pointer_compression: false
146+
simdutf: true
147+
cargo: cargo
148+
149+
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
150+
target: x86_64-unknown-linux-gnu
151+
variant: debug
152+
v8_enable_pointer_compression: false
153+
simdutf: true
154+
cargo: cargo
155+
156+
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
157+
target: x86_64-unknown-linux-gnu
158+
variant: release
159+
v8_enable_pointer_compression: false
160+
simdutf: true
161+
cargo: cargo
162+
163+
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
164+
target: aarch64-unknown-linux-gnu
165+
variant: debug
166+
v8_enable_pointer_compression: false
167+
simdutf: true
168+
cargo: cargo
169+
170+
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
171+
target: aarch64-unknown-linux-gnu
172+
variant: release
173+
v8_enable_pointer_compression: false
174+
simdutf: true
175+
cargo: cargo
176+
120177
env:
121178
V8_FROM_SOURCE: true
122179
CARGO_VARIANT_FLAG: ${{ matrix.config.variant == 'release' && '--release' || '' }}
123-
CARGO_FEATURE_FLAGS: ${{ matrix.config.v8_enable_pointer_compression && '--features v8_enable_pointer_compression' || '' }}
180+
CARGO_FEATURE_FLAGS: ${{ format('{0} {1}', matrix.config.v8_enable_pointer_compression && '--features v8_enable_pointer_compression' || '', matrix.config.simdutf && '--features simdutf' || '') }}
124181
LIB_NAME: ${{ contains(matrix.config.target, 'windows') && 'rusty_v8' || 'librusty_v8' }}
125182
LIB_EXT: ${{ contains(matrix.config.target, 'windows') && 'lib' || 'a' }}
126-
FEATURES_SUFFIX: ${{ matrix.config.v8_enable_pointer_compression && '_ptrcomp' || '' }}
183+
FEATURES_SUFFIX: ${{ format('{0}{1}', matrix.config.v8_enable_pointer_compression && '_ptrcomp' || '', matrix.config.simdutf && '_simdutf' || '') }}
127184
RUSTFLAGS: -D warnings
128185

129186
steps:
@@ -187,7 +244,7 @@ jobs:
187244
target/*/.*
188245
target/*/build
189246
target/*/deps
190-
key: cargo1-${{ matrix.config.target }}-${{ matrix.config.variant }}-${{ matrix.config.v8_enable_pointer_compression }}-${{ hashFiles('Cargo.lock', 'build.rs', 'git_submodule_status.txt') }}
247+
key: cargo1-${{ matrix.config.target }}-${{ matrix.config.variant }}-${{ matrix.config.v8_enable_pointer_compression }}-${{ matrix.config.simdutf }}-${{ hashFiles('Cargo.lock', 'build.rs', 'git_submodule_status.txt') }}
191248
restore-keys: cargo1-${{ matrix.config.target }}-${{ matrix.config.variant }}-${{ matrix.config.v8_enable_pointer_compression }}-
192249

193250
- name: Install and start sccache

build.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,6 @@ fn main() {
9999
// because we store everything in a parent directory of OUT_DIR.
100100
let _lockfile = acquire_lock();
101101

102-
// The simdutf feature requires building from source because prebuilt
103-
// artifacts are not produced with simdutf enabled.
104-
if env::var("CARGO_FEATURE_SIMDUTF").is_ok() && !env_bool("V8_FROM_SOURCE") {
105-
panic!(
106-
"The `simdutf` cargo feature requires V8_FROM_SOURCE=1. \
107-
Prebuilt binaries do not include simdutf."
108-
);
109-
}
110-
111102
// Build from source
112103
if env_bool("V8_FROM_SOURCE") {
113104
if is_asan && env::var_os("OPT_LEVEL").unwrap_or_default() == "0" {
@@ -552,6 +543,9 @@ fn prebuilt_features_suffix() -> String {
552543
if env::var("CARGO_FEATURE_V8_ENABLE_SANDBOX").is_ok() {
553544
features.push_str("_sandbox");
554545
}
546+
if env::var("CARGO_FEATURE_SIMDUTF").is_ok() {
547+
features.push_str("_simdutf");
548+
}
555549
features
556550
}
557551

0 commit comments

Comments
 (0)