Skip to content

fix(release): publish ink-compat and shim packages #1186

fix(release): publish ink-compat and shim packages

fix(release): publish ink-compat and shim packages #1186

Workflow file for this run

name: ci
on:
pull_request:
push:
permissions:
contents: read
jobs:
guardrails:
name: guardrails
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Install tools
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Run guardrails
run: bash scripts/guardrails.sh
ci:
name: node ${{ matrix.node-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: ["18", "20", "22"]
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install (Linux)
if: runner.os == 'Linux'
run: npm ci
- name: Install (non-Linux)
if: runner.os != 'Linux'
run: npm install
- name: Install biome platform binary
if: runner.os != 'Linux'
run: npm install @biomejs/cli-${{ runner.os == 'macOS' && 'darwin' || 'win32' }}-${{ runner.arch == 'ARM64' && 'arm64' || 'x64' }}
- name: Drawlist codegen guardrail
run: npm run codegen:check
- name: Lint
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Build
run: npm run build
- name: Check core portability
run: npm run check:core-portability
- name: Check Unicode pins (submodule sync)
if: runner.os == 'Linux'
run: npm run check:unicode
- name: Tests
run: npm run test
- name: Repro replay fixtures (headless, explicit gate)
if: runner.os == 'Linux'
run: |
CONCURRENCY=$(node -p "parseInt(process.versions.node)>=19?'--test-concurrency=1':''")
node --test $CONCURRENCY packages/core/dist/repro/__tests__/replay.harness.test.js
- name: Setup Rust (stable)
uses: dtolnay/rust-toolchain@stable
- name: Build native addon
run: npm run build:native
- name: Terminal e2e (Linux full)
if: runner.os == 'Linux'
run: npm run test:e2e
- name: Terminal e2e (Linux reduced)
if: runner.os == 'Linux'
run: npm run test:e2e:reduced
- name: Terminal e2e equivalent (non-Linux reduced)
if: runner.os != 'Linux'
run: npm run test:e2e:reduced
- name: Native smoke + worker integration (Unix PTY)
if: runner.os != 'Windows'
run: |
python3 - <<'PY'
import os
import pty
import sys
status = pty.spawn(["bash", "-lc", "npm run test:native:smoke"])
if os.WIFEXITED(status):
sys.exit(os.WEXITSTATUS(status))
if os.WIFSIGNALED(status):
sys.exit(128 + os.WTERMSIG(status))
sys.exit(1)
PY
- name: Native smoke + worker integration (Windows)
if: runner.os == 'Windows'
run: npm run test:native:smoke
bun:
name: bun / ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.9"
- name: Install
run: bun install
- name: Drawlist codegen guardrail
run: bun run codegen:check
- name: Lint
run: bun run lint
- name: Typecheck
run: bun run typecheck
- name: Build
run: bun run build
- name: Check core portability
run: bun run check:core-portability
- name: Check Unicode pins (submodule sync)
run: bun run check:unicode
- name: Tests
run: bun run test
- name: Terminal e2e (reduced)
run: bun run test:e2e:reduced
perf-regression:
name: perf regression gate
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install
run: npm ci
- name: Build packages
run: npm run build
- name: Build benchmark package
run: npx tsc -p packages/bench/tsconfig.json
- id: perf_bench
name: Run reduced benchmark suite (non-blocking)
continue-on-error: true
run: npm run bench:ci -- --output-dir .artifacts/bench/ci
- id: perf_compare
name: Compare reduced benchmark results against baseline (non-blocking)
if: ${{ always() }}
continue-on-error: true
run: |
npm run bench:ci:compare -- \
--baseline benchmarks/ci-baseline/results.json \
--current .artifacts/bench/ci/results.json \
--config benchmarks/ci-baseline/config.json \
--report-json .artifacts/bench/ci/compare.json \
--report-md .artifacts/bench/ci/compare.md
- name: Perf regression summary (non-blocking)
if: ${{ always() }}
run: |
echo "bench outcome: ${{ steps.perf_bench.outcome }}"
echo "compare outcome: ${{ steps.perf_compare.outcome }}"
if [ "${{ steps.perf_bench.outcome }}" != "success" ] || [ "${{ steps.perf_compare.outcome }}" != "success" ]; then
echo "::warning::Perf regression gate is non-blocking for CI stability. Review perf-regression artifacts."
fi
- name: Upload perf regression artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: perf-regression-artifacts
if-no-files-found: warn
path: |
.artifacts/bench/ci/results.json
.artifacts/bench/ci/results.md
.artifacts/bench/ci/compare.json
.artifacts/bench/ci/compare.md
.artifacts/bench/ci/manifest.json
.artifacts/bench/ci/profile.json
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- name: Install
run: npm ci
- name: Build packages
run: npm run build
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Build docs site
run: npm run docs:build