Skip to content

Commit 10cc776

Browse files
authored
Merge pull request #35 from lann/just-adoption
Adopt just as the command surface: recipes are the exact commands, CI runs them
2 parents 83fff30 + 4df5612 commit 10cc776

7 files changed

Lines changed: 330 additions & 217 deletions

File tree

‎.github/justfile‎

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# CI job bodies: each workflow job runs exactly one `gha::` recipe, so
2+
# `just ci` is exactly CI and the workflow files carry no logic beyond
3+
# environment setup (checkout, toolchains, caches). Step-level rationale
4+
# lives on the root-justfile recipes these compose.
5+
6+
set working-directory := '..'
7+
8+
# Wrap one recipe in a GitHub Actions log group (plain passthrough
9+
# locally).
10+
[private]
11+
_step recipe:
12+
#!/usr/bin/env bash
13+
set -euo pipefail
14+
if [ "${GITHUB_ACTIONS:-}" = "true" ]; then
15+
echo "::group::just {{recipe}}"
16+
status=0
17+
just {{recipe}} || status=$?
18+
echo "::endgroup::"
19+
if [ $status -ne 0 ]; then
20+
echo "::error title=just {{recipe}} failed::exit status $status"
21+
exit $status
22+
fi
23+
else
24+
just {{recipe}}
25+
fi
26+
27+
# Like _step, but failures are tolerated: the CI-side replacement for the
28+
# workflow-level `continue-on-error` the collapsed steps used to carry. A
29+
# failure surfaces as a ::warning annotation, never as a job failure.
30+
[private]
31+
_step-tolerated recipe:
32+
#!/usr/bin/env bash
33+
set -euo pipefail
34+
if [ "${GITHUB_ACTIONS:-}" = "true" ]; then
35+
echo "::group::just {{recipe}} (non-blocking)"
36+
status=0
37+
just {{recipe}} || status=$?
38+
echo "::endgroup::"
39+
if [ $status -ne 0 ]; then
40+
echo "::warning title=just {{recipe}} (non-blocking)::exit status $status — tolerated; see the recipe's comment for why"
41+
fi
42+
else
43+
just {{recipe}} || echo "just {{recipe}}: FAILED (tolerated in CI; see the recipe's comment)"
44+
fi
45+
46+
# The required per-push/PR matrix job (ci.yml `core`).
47+
core:
48+
@just gha::_step build
49+
@just gha::_step test-rust
50+
@just gha::_step shim
51+
@just gha::_step fixtures
52+
@just gha::_step corpus
53+
@just gha::_step shells
54+
@just gha::_step test-runtime
55+
@just gha::_step test-wasi-shims
56+
@just gha::_step test-ct-runner
57+
@just gha::_step test-bundle
58+
@just gha::_step conformance
59+
@just gha::_step sched-seeds
60+
@just gha::_step test-ports
61+
@just gha::_step-tolerated test-webrtc
62+
63+
# The post-merge browser job (ci.yml `browser`; gates the prerelease).
64+
browser:
65+
@just gha::_step shim
66+
@just gha::_step corpus
67+
@just gha::_step "browsers-install --with-deps"
68+
@just gha::_step "browser-lane chromium"
69+
@just gha::_step "browser-lane firefox"
70+
@just gha::_step-tolerated "browsers-install-webkit --with-deps"
71+
@just gha::_step-tolerated "browser-lane webkit"
72+
73+
# Never gates: the drivers themselves exit 0 on deviations, 2 on
74+
# infrastructure failure.
75+
# The findings-only canary lanes (canary.yml, x64 leg).
76+
canary:
77+
@just gha::_step shim
78+
@just gha::_step corpus
79+
@just gha::_step "shell-lane sm-nightly --json sm-results.json"
80+
@just gha::_step "shell-lane jsc-trunk --json jsc-results.json"
81+
@just gha::_step "deno-canary --json deno-canary-results.json"
82+
83+
# JSC trunk has no arm64 channel — the two lanes with arm64 coverage.
84+
# The findings-only canary lanes (canary.yml, arm64 leg).
85+
canary-arm:
86+
@just gha::_step shim
87+
@just gha::_step corpus
88+
@just gha::_step "shell-lane sm-nightly --json sm-results.json"
89+
@just gha::_step "deno-canary --json deno-canary-results.json"

‎.github/workflows/canary.yml‎

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323
env:
2424
DENO_VERSION: "2.9.5"
2525
WASM_TOOLS_VERSION: "1.247.0"
26+
JUST_VERSION: "1.54.0"
2627

2728
jobs:
2829
shell-canaries:
@@ -38,36 +39,18 @@ jobs:
3839
- uses: Swatinem/rust-cache@v2
3940
- uses: taiki-e/install-action@v2
4041
with:
41-
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }}
42+
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }},just@${{ env.JUST_VERSION }}
4243
- uses: denoland/setup-deno@v2
4344
with:
4445
deno-version: ${{ env.DENO_VERSION }}
4546

46-
- name: build the translator shim (wasm32)
47-
run: cargo build -p translator-shim --target wasm32-unknown-unknown --release
48-
- name: generate the conformance corpus
49-
working-directory: harness
50-
run: deno task gen
51-
5247
# Deliberately NO actions/cache for .shell-cache: trunk/nightly
5348
# builds change daily by design (fetching fresh IS the lane's
5449
# purpose), and a prefix-restored cache from a failed earlier run
5550
# can resurrect a broken extraction that fetch.ts's existence
5651
# check would then trust (bitten once: the first-run jsc layout
5752
# bug would have been pinned in place by exactly that).
58-
59-
- name: fetch SpiderMonkey nightly
60-
run: deno run -A tools/shell/fetch.ts sm-nightly
61-
- name: SpiderMonkey nightly lane
62-
run: deno run -A tools/shell/run-lane.ts sm-nightly --json sm-results.json
63-
64-
- name: fetch JSC trunk (x86_64)
65-
run: deno run -A tools/shell/fetch.ts jsc-trunk
66-
- name: JSC trunk lane
67-
run: deno run -A tools/shell/run-lane.ts jsc-trunk --json jsc-results.json
68-
69-
- name: Deno canary probe (V8-trailing-edge substitute for a d8 lane)
70-
run: deno run -A tools/shell/deno-canary.ts --json deno-canary-results.json
53+
- run: just gha::canary
7154

7255
- name: upload results
7356
if: always()
@@ -114,31 +97,13 @@ jobs:
11497
- uses: Swatinem/rust-cache@v2
11598
- uses: taiki-e/install-action@v2
11699
with:
117-
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }}
100+
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }},just@${{ env.JUST_VERSION }}
118101
- uses: denoland/setup-deno@v2
119102
with:
120103
deno-version: ${{ env.DENO_VERSION }}
121104

122-
- name: build the translator shim (wasm32)
123-
run: cargo build -p translator-shim --target wasm32-unknown-unknown --release
124-
- name: generate the conformance corpus
125-
working-directory: harness
126-
run: deno task gen
127-
128-
# Deliberately NO actions/cache for .shell-cache: trunk/nightly
129-
# builds change daily by design (fetching fresh IS the lane's
130-
# purpose), and a prefix-restored cache from a failed earlier run
131-
# can resurrect a broken extraction that fetch.ts's existence
132-
# check would then trust (bitten once: the first-run jsc layout
133-
# bug would have been pinned in place by exactly that).
134-
135-
- name: fetch SpiderMonkey nightly
136-
run: deno run -A tools/shell/fetch.ts sm-nightly
137-
- name: SpiderMonkey nightly lane
138-
run: deno run -A tools/shell/run-lane.ts sm-nightly --json sm-results.json
139-
140-
- name: Deno canary probe
141-
run: deno run -A tools/shell/deno-canary.ts --json deno-canary-results.json
105+
# Deliberately NO actions/cache for .shell-cache: see the x64 job.
106+
- run: just gha::canary-arm
142107

143108
- name: upload results
144109
if: always()

‎.github/workflows/ci.yml‎

Lines changed: 14 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ concurrency:
1212
env:
1313
DENO_VERSION: "2.9.5"
1414
WASM_TOOLS_VERSION: "1.247.0"
15+
JUST_VERSION: "1.54.0"
1516

1617
jobs:
1718
core:
@@ -33,111 +34,17 @@ jobs:
3334
- uses: Swatinem/rust-cache@v2
3435
- uses: taiki-e/install-action@v2
3536
with:
36-
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }}
37+
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }},just@${{ env.JUST_VERSION }}
3738
- uses: denoland/setup-deno@v2
3839
with:
3940
deno-version: ${{ env.DENO_VERSION }}
4041

41-
# --- Rust suites -------------------------------------------------------
42-
- name: cargo build (workspace)
43-
run: cargo build --workspace
44-
- name: cargo test (translator-shim, bindgen)
45-
run: cargo test -p translator-shim -p bindgen
46-
- name: build the translator shim (wasm32)
47-
# Every Deno suite below loads this artifact; order matters.
48-
run: cargo build -p translator-shim --target wasm32-unknown-unknown --release
49-
50-
# --- Guest fixtures + corpus --------------------------------------------
51-
- name: build example guest components
52-
# examples/guests/build/ is gitignored; the runtime e2e suites and
53-
# ct-runner's fixture tests need it. wasmtime CLI is optional in
54-
# build.sh (smoke run only when present) and deliberately not
55-
# installed here.
56-
run: ./examples/build.sh
57-
- name: generate the conformance corpus
58-
# Rehearsal finding: 20 runtime e2e tests self-skip when
59-
# harness/generated is absent — generation must precede the runtime
60-
# suite (318/0/3 with it; 298/0/23 without).
61-
working-directory: harness
62-
run: deno task gen
63-
64-
# --- Pinned engine-shell lanes (required; issue #22 follow-up) ---------
65-
# Per-push/PR SpiderMonkey + JSC coverage at fixed, sha256-verified
66-
# pins (tools/shell/pins.json) — NOT the always-moving nightly/trunk
67-
# channels, which stay findings-only canaries in canary.yml. Both are
68-
# `required: true` overlays; a deviation here exits 1 and fails this
69-
# job (tools/shell/run-lane.ts's `exp.required ? 1 : 0` tail).
70-
- name: fetch SpiderMonkey pinned (Firefox 153.0 jsshell)
71-
run: deno run -A tools/shell/fetch.ts sm-pinned
72-
- name: SpiderMonkey pinned lane (required)
73-
run: deno run -A tools/shell/run-lane.ts sm-pinned
74-
- name: fetch JSC pinned (rev 318852@main, x64 only)
75-
# No arm64 channel for jsc-built-products (or its repo-owned mirror
76-
# of this exact rev) — fetch.ts refuses cleanly on other arches.
77-
if: runner.arch == 'X64'
78-
run: deno run -A tools/shell/fetch.ts jsc-pinned
79-
- name: JSC pinned lane (required, x64 only)
80-
if: runner.arch == 'X64'
81-
run: deno run -A tools/shell/run-lane.ts jsc-pinned
82-
83-
# --- Deno suites -------------------------------------------------------
84-
- name: runtime
85-
working-directory: runtime
86-
run: |
87-
deno task check
88-
deno task test
89-
- name: wasi-shims
90-
working-directory: wasi-shims
91-
run: deno task test
92-
- name: ct-runner
93-
working-directory: ct-runner
94-
run: deno task test
95-
- name: release bundle (embedder artifact gate)
96-
run: deno test -A tools/release-bundle/bundle_test.ts
97-
- name: conformance (official CM suite, Deno lane)
98-
working-directory: harness
99-
run: deno task conformance
100-
101-
# --- Seeded scheduler runs (spec-allowed nondeterminism) ---------------
102-
- name: runtime under DELTIC_SCHED_SEED=1
103-
working-directory: runtime
104-
run: deno task test
105-
env:
106-
DELTIC_SCHED_SEED: "1"
107-
- name: runtime under DELTIC_SCHED_SEED=4242
108-
working-directory: runtime
109-
run: deno task test
110-
env:
111-
DELTIC_SCHED_SEED: "4242"
112-
- name: conformance under DELTIC_SCHED_SEED=1
113-
working-directory: harness
114-
run: deno task conformance
115-
env:
116-
DELTIC_SCHED_SEED: "1"
117-
118-
# --- Ports (unit suites only; consumer conformance legs need the
119-
# --- polymorph checkouts and are follow-up scope, issue #6) ------------
120-
- name: ports/webcrypto
121-
working-directory: ports/webcrypto
122-
run: deno test --allow-read tests/
123-
- name: ports/websocket
124-
working-directory: ports/websocket
125-
run: deno task test
126-
- name: ports/webrtc
127-
working-directory: ports/webrtc
128-
# node-datachannel is a Node-API addon with linux prebuilds for both
129-
# x64 and arm64 (arm64 proven on the dev box; see tools/probes).
130-
# NON-BLOCKING for now: GH Actions runners give libdatachannel no
131-
# usable ICE path for same-host loopback pairing — all
132-
# connection-forming tests time out on BOTH arches while the addon
133-
# loads and non-connection tests pass (first run: 1 passed /
134-
# 8 timed-out). The dev-box lane remains the real gate; issue #21
135-
# tracks the runner-networking fix (loopback candidates /
136-
# bindAddress / werift).
137-
continue-on-error: true
138-
run: |
139-
deno install --allow-scripts=npm:node-datachannel
140-
deno test -A webrtc.test.ts
42+
# The job body lives in the `gha` just module (one workflow job = one
43+
# `gha::` recipe, so `just ci` is exactly CI); step-level rationale
44+
# lives on the root-justfile recipes it composes. Suite order,
45+
# arch-conditional lanes (jsc-pinned is x64-only) and the tolerated
46+
# webrtc suite (issue #21) are all encoded there.
47+
- run: just gha::core
14148

14249
browser:
14350
runs-on: ubuntu-24.04
@@ -164,44 +71,24 @@ jobs:
16471
- uses: Swatinem/rust-cache@v2
16572
- uses: taiki-e/install-action@v2
16673
with:
167-
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }}
74+
tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }},just@${{ env.JUST_VERSION }}
16875
- uses: denoland/setup-deno@v2
16976
with:
17077
deno-version: ${{ env.DENO_VERSION }}
17178

172-
- name: build the translator shim (wasm32)
173-
run: cargo build -p translator-shim --target wasm32-unknown-unknown --release
174-
- name: generate the conformance corpus
175-
working-directory: harness
176-
run: deno task gen
177-
17879
- name: cache playwright browsers
17980
uses: actions/cache@v4
18081
with:
18182
# run-lane.ts pins playwright@1.62.1 and a REPO-LOCAL browser cache
18283
# (PLAYWRIGHT_BROWSERS_PATH=$PWD/.browser-cache) — cache that path,
183-
# not ~/.cache/ms-playwright (rehearsal finding).
84+
# not ~/.cache/ms-playwright (rehearsal finding). The recipe's
85+
# install step below restores into it.
18486
path: .browser-cache
18587
key: playwright-1.62.1-${{ runner.os }}-${{ runner.arch }}
186-
- name: install browsers (chromium, firefox)
187-
run: PLAYWRIGHT_BROWSERS_PATH=$PWD/.browser-cache deno run -A npm:playwright@1.62.1 install --with-deps chromium firefox
188-
189-
- name: chromium lane (required — expects exact Deno-lane parity)
190-
run: deno run -A tools/browser/run-lane.ts chromium
191-
- name: firefox lane (required — JSPI pref set by the driver)
192-
run: deno run -A tools/browser/run-lane.ts firefox
19388

194-
# WebKit is best-effort per docs/architecture.md §3/§12 (issue #11): the
195-
# lane's expectation overlay
196-
# encodes JSC's missing multi-memory; GH's ubuntu-24.04 matches the ABI
197-
# playwright's WebKit wants, so no library staging should be needed —
198-
# but the lane stays non-blocking until it has a track record.
199-
- name: install webkit (best-effort)
200-
continue-on-error: true
201-
run: PLAYWRIGHT_BROWSERS_PATH=$PWD/.browser-cache deno run -A npm:playwright@1.62.1 install --with-deps webkit
202-
- name: webkit lane (best-effort)
203-
continue-on-error: true
204-
run: deno run -A tools/browser/run-lane.ts webkit
89+
# shim + corpus + browser install (--with-deps) + the chromium/firefox
90+
# required lanes + the best-effort webkit lane, per the recipes.
91+
- run: just gha::browser
20592

20693
# Every GREEN main ref update ships a prerelease (issue #16's interim
20794
# scheme): tag pre-<shorthash>, shim artifacts + SHA256SUMS. Gated on this

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
- uses: dtolnay/rust-toolchain@stable
3131
with:
3232
targets: wasm32-unknown-unknown
33+
- uses: taiki-e/install-action@v2
34+
with:
35+
tool: just@1.54.0
3336
- uses: denoland/setup-deno@v2
3437
with:
3538
deno-version: "2.9.5"
@@ -48,32 +51,12 @@ jobs:
4851
env:
4952
GH_TOKEN: ${{ github.token }}
5053

51-
- name: build translator shim (release)
52-
run: |
53-
cargo build -p translator-shim --target wasm32-unknown-unknown --release
54-
cp target/wasm32-unknown-unknown/release/translator_shim.wasm deltic-translator-shim.wasm
55-
56-
- name: build translator shim (size-tuned)
57-
# Flags exactly as documented in crates/translator-shim/README.md
58-
# (reproduces the published size figures without editing the
59-
# workspace manifest).
60-
run: |
61-
cargo build -p translator-shim --release --target wasm32-unknown-unknown \
62-
--config 'profile.release.opt-level="z"' \
63-
--config profile.release.lto=true \
64-
--config profile.release.codegen-units=1 \
65-
--config 'profile.release.panic="abort"' \
66-
--config 'profile.release.strip=true'
67-
cp target/wasm32-unknown-unknown/release/translator_shim.wasm deltic-translator-shim-min.wasm
68-
69-
- name: build embedder bundle
70-
# The consumer-facing platform-neutral ES module (browser pages/
71-
# workers + plain Node): tools/release-bundle/entry.ts, gated by
72-
# tools/release-bundle/bundle_test.ts in the core matrix.
73-
run: deno run -A tools/release-bundle/build.ts --out deltic-embedder.mjs
74-
75-
- name: checksums
76-
run: sha256sum deltic-translator-shim.wasm deltic-translator-shim-min.wasm deltic-embedder.mjs > SHA256SUMS
54+
- name: build the release artifacts
55+
# `just release-artifacts` (root justfile): the standard shim, the
56+
# size-tuned shim (flags per crates/translator-shim/README.md), the
57+
# embedder bundle (tools/release-bundle/entry.ts, gated by
58+
# bundle_test.ts in the core matrix), and SHA256SUMS.
59+
run: just release-artifacts
7760

7861
- name: create prerelease
7962
run: |

0 commit comments

Comments
 (0)