Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ concurrency:

env:
CARGO_TERM_COLOR: always
# Pinned to what release.yml uses. This workflow runs the same build, so a
# different toolchain version here would let CI pass on something the release
# then fails on — which is the drift this parity is meant to remove.
BUN_VERSION: 1.3.14
NODE_VERSION: 24

jobs:
Expand Down Expand Up @@ -64,14 +68,16 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Install wasm-pack
uses: taiki-e/install-action@v2
uses: taiki-e/install-action@91ddec75689c4c78665b598d188dc821c5a43e5c # v2.85.9
with:
tool: wasm-pack
# Same pin as the release workflow: this job now runs the same build,
# and the point is for it to fail here rather than there.
tool: wasm-pack,protoc@3.35.1
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
Comment thread
jlucaso1 marked this conversation as resolved.

- name: Install Bun
uses: oven-sh/setup-bun@v2
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
bun-version: ${{ env.BUN_VERSION }}

- name: Install Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
Expand All @@ -81,14 +87,11 @@ jobs:
- name: Install JavaScript dependencies
run: bun install

- name: Build WASM package
run: |
wasm-pack build --target web --out-dir pkg --release
# Fix .gitignore issue in pkg (wasm-pack includes it by default)
rm -f pkg/.gitignore

- name: Run TypeScript compilation (generate .d.ts)
run: bun run build:ts
# The package's real build, the same command the release runs. Calling
# wasm-pack and build:ts directly skipped `gen`, so a codegen or tooling
# break surfaced for the first time at publish, where it costs a version.
- name: Build the wasm package
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
run: bun run build
Comment thread
jlucaso1 marked this conversation as resolved.

- name: Run Tests with Bun
run: bun test
Expand All @@ -114,14 +117,14 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Install wasm-pack
uses: taiki-e/install-action@v2
uses: taiki-e/install-action@91ddec75689c4c78665b598d188dc821c5a43e5c # v2.85.9
with:
tool: wasm-pack

- name: Install Bun
uses: oven-sh/setup-bun@v2
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
bun-version: ${{ env.BUN_VERSION }}

- name: Install Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v6
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,12 @@ jobs:
- name: Install wasm-pack
uses: taiki-e/install-action@91ddec75689c4c78665b598d188dc821c5a43e5c # v2.85.9
with:
# protoc: `bun run build` regenerates the proto codec, which ci.yml
# never exercises because it calls wasm-pack and build:ts directly.
# protoc pinned like bun and npm: verify and publish each install it, and
# publish can start much later behind the environment gate, so an
# unpinned default could generate one codec for the tests and another
# for the tarball.
tool: wasm-pack,protoc@35.1
# protoc is needed because `bun run build` regenerates the proto
# codec. Pinned to the same versions ci.yml uses, so a break shows up
# on a pull request; and pinned at all because publish can start much
# later than verify, behind the environment gate, where a new default
# would generate one codec for the tests and another for the tarball.
tool: wasm-pack,protoc@3.35.1

- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
Expand Down Expand Up @@ -287,13 +286,12 @@ jobs:
- name: Install wasm-pack
uses: taiki-e/install-action@91ddec75689c4c78665b598d188dc821c5a43e5c # v2.85.9
with:
# protoc: `bun run build` regenerates the proto codec, which ci.yml
# never exercises because it calls wasm-pack and build:ts directly.
# protoc pinned like bun and npm: verify and publish each install it, and
# publish can start much later behind the environment gate, so an
# unpinned default could generate one codec for the tests and another
# for the tarball.
tool: wasm-pack,protoc@35.1
# protoc is needed because `bun run build` regenerates the proto
# codec. Pinned to the same versions ci.yml uses, so a break shows up
# on a pull request; and pinned at all because publish can start much
# later than verify, behind the environment gate, where a new default
# would generate one codec for the tests and another for the tarball.
tool: wasm-pack,protoc@3.35.1

# Pinned, unlike ci.yml: this bun builds the wasm artifact that ships to
# npm, so a floating version would change the published bytes without a
Expand Down