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
8 changes: 6 additions & 2 deletions .github/workflows/bash-oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ env:

jobs:
scoreboard:
name: Bash oracle scoreboard
name: Bash oracle scoreboard (${{ matrix.execution_plan && 'execution-plan' || 'interpreter' }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
execution_plan: [false, true]
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -43,7 +47,7 @@ jobs:
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2

- name: Build CLI
run: cargo build -p bashkit-cli
run: cargo build --features="${{ matrix.execution_plan && 'bashkit/experimental_execution_plan' || '' }}" -p bashkit-cli

- name: Run scoreboard
run: python3 scripts/bash-oracle/run.py
211 changes: 134 additions & 77 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ env:

jobs:
coverage:
name: Generate Rust Coverage
name: Rust coverage (plan=${{ matrix.execution_plan }})
# Pinned for the GNU coreutils oracle, like ci.yml's `test` job; see the
# note there.
runs-on: ubuntu-24.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
execution_plan: [false, true]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand Down Expand Up @@ -60,13 +64,13 @@ jobs:
# (past --timeout). Its tests still run in the main CI test job.
- name: Generate coverage report
run: |
cargo tarpaulin --features http_client \
cargo tarpaulin --features="http_client${{ matrix.execution_plan && ',bashkit/experimental_execution_plan' || '' }}" \
--workspace \
--exclude bashkit-python \
--exclude bashkit-eval \
--out xml \
--out html \
--output-dir coverage \
--output-dir coverage/${{ matrix.execution_plan }} \
--exclude-files "crates/bashkit-bench/*" \
--exclude-files "crates/bashkit-cli/*" \
--exclude-files "crates/bashkit-python/*" \
Expand All @@ -77,7 +81,7 @@ jobs:
- name: Upload coverage artifacts
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: rust-coverage-report
name: rust-${{ matrix.execution_plan }}-coverage-report
path: coverage/
retention-days: 30

Expand Down Expand Up @@ -218,7 +222,7 @@ jobs:
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/cobertura.xml,coverage/python-rust-coverage.json,coverage/node-rust-coverage.json
files: coverage/false/cobertura.xml,coverage/true/cobertura.xml,coverage/python-rust-coverage.json,coverage/node-rust-coverage.json
disable_search: true
flags: unittests
fail_ci_if_error: false
Expand Down
49 changes: 35 additions & 14 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@ env:
CARGO_TERM_COLOR: always

jobs:
targets:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.targets.outputs.matrix }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- id: targets
run: echo "matrix=$(python3 scripts/fuzz-smoke.py --matrix)" >> "$GITHUB_OUTPUT"

fuzz:
name: Fuzz Test
name: Fuzz (${{ matrix.target }}, plan=${{ matrix.execution_plan }})
needs: targets
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [parser_fuzz, lexer_fuzz, analyze_fuzz, arithmetic_fuzz, glob_fuzz, cpython_fuzz, cpython_http_fuzz, python_fuzz, python_diff_fuzz, ts_fuzz]
matrix: ${{ fromJSON(needs.targets.outputs.matrix) }}

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -48,20 +59,33 @@ jobs:
# On the nightly, not the pinned stable default: an unpinned source
# build on a pinned toolchain breaks when upstream raises its MSRV.
- name: Install cargo-fuzz
run: cargo +nightly-2026-10-30 install cargo-fuzz --locked
uses: taiki-e/cache-cargo-install-action@9ee83daaa7b96a6fab930949ecf1122bba04a389 # v3
env:
RUSTUP_TOOLCHAIN: nightly-2026-10-30
with:
tool: cargo-fuzz@0.13.2
locked: true

- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
workspaces: crates/bashkit/fuzz -> target
shared-key: fuzz-${{ matrix.features }}
cache-on-failure: true

- name: Cache fuzz corpus
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
with:
path: crates/bashkit/fuzz/corpus
key: fuzz-corpus-${{ matrix.target }}-${{ github.sha }}
key: fuzz-corpus-${{ matrix.target }}-${{ matrix.execution_plan }}-${{ github.sha }}
restore-keys: |
fuzz-corpus-${{ matrix.target }}-
fuzz-corpus-${{ matrix.target }}-${{ matrix.execution_plan }}-

- name: Run fuzzer - ${{ matrix.target }}
working-directory: crates/bashkit
env:
DURATION_INPUT: ${{ github.event.inputs.duration || '300' }}
FUZZ_FEATURES: ${{ matrix.features }}
FUZZ_TARGET: ${{ matrix.target }}
run: |
# Validate duration is a positive integer before use (prevents shell injection
# from workflow_dispatch inputs being interpolated directly into the shell).
Expand All @@ -72,21 +96,18 @@ jobs:
exit 1
fi
features=()
case "${{ matrix.target }}" in
python_diff_fuzz) features=(--features python,cpython) ;;
cpython_*) features=(--features cpython) ;;
python_*) features=(--features python) ;;
ts_fuzz) features=(--features typescript) ;;
esac
cargo +nightly-2026-10-30 fuzz run "${features[@]}" ${{ matrix.target }} -- \
if [[ -n "$FUZZ_FEATURES" ]]; then
features=(--features "$FUZZ_FEATURES")
fi
cargo +nightly-2026-10-30 fuzz run --codegen-units 16 "${features[@]}" "$FUZZ_TARGET" -- \
-max_total_time="$DURATION_INPUT" \
-print_final_stats=1

- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: fuzz-crashes-${{ matrix.target }}
name: fuzz-crashes-${{ matrix.target }}-${{ matrix.execution_plan }}
path: |
crates/bashkit/fuzz/artifacts/${{ matrix.target }}
retention-days: 30
144 changes: 98 additions & 46 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,39 +71,76 @@ jobs:
working-directory: crates/bashkit-js

build-and-test:
name: ${{ matrix.runtime }} ${{ matrix.version }}
name: ${{ matrix.runtime }} ${{ matrix.version }} (${{ matrix.execution_plan && 'execution-plan' || 'interpreter' }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# Node.js versions
- runtime: node
version: "20"
run: "node"
- runtime: node
version: "22.23.4"
run: "node"
- runtime: node
version: "24.22.1"
run: "node"
- runtime: node
version: "latest"
run: "node"
# Bun
- runtime: bun
version: "latest"
run: "bun"
- runtime: bun
version: "canary"
run: "bun"
# Deno
- runtime: deno
version: "2.x"
run: "deno run -A"
- runtime: deno
version: "canary"
run: "deno run -A"
- runtime: node
version: '20'
run: node
execution_plan: false
- runtime: node
version: '20'
run: node
execution_plan: true
- runtime: node
version: 22.23.4
run: node
execution_plan: false
- runtime: node
version: 22.23.4
run: node
execution_plan: true
- runtime: node
version: 24.22.1
run: node
execution_plan: false
- runtime: node
version: 24.22.1
run: node
execution_plan: true
- runtime: node
version: latest
run: node
execution_plan: false
- runtime: node
version: latest
run: node
execution_plan: true
- runtime: bun
version: latest
run: bun
execution_plan: false
- runtime: bun
version: latest
run: bun
execution_plan: true
- runtime: bun
version: canary
run: bun
execution_plan: false
- runtime: bun
version: canary
run: bun
execution_plan: true
- runtime: deno
version: 2.x
run: deno run -A
execution_plan: false
- runtime: deno
version: 2.x
run: deno run -A
execution_plan: true
- runtime: deno
version: canary
run: deno run -A
execution_plan: false
- runtime: deno
version: canary
run: deno run -A
execution_plan: true

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down Expand Up @@ -157,7 +194,10 @@ jobs:
working-directory: crates/bashkit-js

- name: Build native binding
run: pnpm run build
run: |
pnpm exec napi build --platform --release --features="${{ matrix.execution_plan && 'bashkit/experimental_execution_plan' || '' }}"
pnpm run build:cjs
pnpm run build:ts
working-directory: crates/bashkit-js

# ava >= 8 requires Node 22.20+, but the package still declares
Expand Down Expand Up @@ -252,26 +292,35 @@ jobs:
${{ matrix.run }} langchain_agent.mjs

callback-platforms:
name: Runtime callbacks (${{ matrix.name }})
name: Runtime callbacks (${{ matrix.name }}) (${{ matrix.execution_plan && 'execution-plan' || 'interpreter' }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: macos-latest
os: macos-latest
- name: windows-latest
os: windows-latest
# `macos-latest` is arm64, so the shipped x86_64-apple-darwin binding
# only ever runs translated under Rosetta 2, where embedded-runtime
# start-up costs several times native. publish-js.yml was the only
# place that lane ran, so a timing regression on it first surfaced at
# release: v0.20.1 went red here while every native lane was green,
# and `release-js` is gated on these jobs, so npm was never reached.
- name: macos-latest x86_64 (Rosetta)
os: macos-latest
target: x86_64-apple-darwin
architecture: x64
- name: macos-latest
os: macos-latest
execution_plan: false
- name: macos-latest
os: macos-latest
execution_plan: true
- name: windows-latest
os: windows-latest
execution_plan: false
- name: windows-latest
os: windows-latest
execution_plan: true
- name: macos-latest x86_64 (Rosetta)
os: macos-latest
target: x86_64-apple-darwin
architecture: x64
execution_plan: false
- name: macos-latest x86_64 (Rosetta)
os: macos-latest
target: x86_64-apple-darwin
architecture: x64
execution_plan: true

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -297,7 +346,10 @@ jobs:
- run: pnpm install --frozen-lockfile
working-directory: crates/bashkit-js
- if: ${{ !matrix.target }}
run: pnpm run build
run: |
pnpm exec napi build --platform --release --features="${{ matrix.execution_plan && 'bashkit/experimental_execution_plan' || '' }}"
pnpm run build:cjs
pnpm run build:ts
working-directory: crates/bashkit-js
- if: ${{ matrix.target }}
name: Build ${{ matrix.target }}
Expand All @@ -318,7 +370,7 @@ jobs:
# resumes rather than rebuilds. Only the toolchain crash is retried:
# a genuine compile error fails again and still fails the job.
for attempt in 1 2 3; do
if pnpm exec napi build --platform --release --target ${{ matrix.target }}; then
if pnpm exec napi build --platform --release --features="${{ matrix.execution_plan && 'bashkit/experimental_execution_plan' || '' }}" --target ${{ matrix.target }}; then
break
fi
if [ "$attempt" = 3 ]; then
Expand Down
Loading
Loading