Skip to content

Commit 66e5da5

Browse files
ci(perf): run three independent qualification jobs
Refs #686 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent ff7a700 commit 66e5da5

1 file changed

Lines changed: 83 additions & 0 deletions

File tree

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Glue marshalling qualification
2+
on:
3+
push:
4+
branches: [ci/glue-marshalling-perf]
5+
permissions:
6+
contents: read
7+
jobs:
8+
qualify:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 120
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
job: [1, 2, 3]
15+
env:
16+
CARGO_BUILD_JOBS: '2'
17+
RUSTUP_TOOLCHAIN: stable
18+
MATRIX_JOB: ${{ matrix.job }}
19+
PERF_ROOT: ${{ runner.temp }}/glue-performance
20+
steps:
21+
- uses: actions/checkout@v7
22+
with:
23+
fetch-depth: 0
24+
persist-credentials: false
25+
- uses: actions-rust-lang/setup-rust-toolchain@v2
26+
with:
27+
toolchain: stable
28+
target: wasm32-unknown-unknown
29+
cache: false
30+
- uses: actions/setup-node@v7
31+
with:
32+
node-version: latest
33+
- uses: oven-sh/setup-bun@v2
34+
with:
35+
bun-version: latest
36+
- uses: jetli/wasm-pack-action@v0.4.0
37+
with:
38+
version: latest
39+
- name: Stage exact sources and shared tools
40+
run: |
41+
set -euo pipefail
42+
mkdir -p "$PERF_ROOT/base" "$PERF_ROOT/candidate" "$PERF_ROOT/reports" "$PERF_ROOT/binaryen"
43+
git archive 2234c27a9d7fb9a6367ed4f91cdecd7fbd28f1c0 | tar -x -C "$PERF_ROOT/base"
44+
git archive "$GITHUB_SHA" | tar -x -C "$PERF_ROOT/candidate"
45+
git rev-parse '2234c27a^{tree}' "$GITHUB_SHA^{tree}" > "$PERF_ROOT/reports/trees.txt"
46+
cmp "$PERF_ROOT/base/Cargo.lock" "$PERF_ROOT/candidate/Cargo.lock"
47+
curl -L --proto '=https' --tlsv1.2 -sSf https://github.com/@raw/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
48+
binaryen_url="$(curl --fail -sSL https://github.com/@api/repos/WebAssembly/binaryen/releases/latest | node --input-type=module -e 'let s="";for await(const c of process.stdin)s+=c;console.log(JSON.parse(s).assets.find(a=>a.name.endsWith("-x86_64-linux.tar.gz")).browser_download_url)')"
49+
curl --fail -sSL "$binaryen_url" -o "$PERF_ROOT/binaryen.tar.gz"
50+
tar -xzf "$PERF_ROOT"/*.tar.gz --strip-components=1 -C "$PERF_ROOT/binaryen"
51+
echo "$PERF_ROOT/binaryen/bin" >> "$GITHUB_PATH"
52+
version="$(node resolve-wasm-bindgen.js "$PERF_ROOT/base/Cargo.lock")"
53+
cargo binstall wasm-bindgen-cli --version "=$version" --root "$PERF_ROOT/abi-tools" --no-confirm --force
54+
echo "$PERF_ROOT/abi-tools/bin" >> "$GITHUB_PATH"
55+
- name: Build both unchanged release profiles
56+
run: |
57+
set -euo pipefail
58+
for side in base candidate; do
59+
(
60+
cd "$PERF_ROOT/$side/bindings/devup-ui-wasm"
61+
export CARGO_TARGET_DIR="$PERF_ROOT/$side-target"
62+
cargo metadata --locked --format-version 1 > /dev/null
63+
wasm-pack build --mode no-install --release --target nodejs --out-dir ./pkg --out-name index --locked
64+
node script.js
65+
) 2>&1 | tee "$PERF_ROOT/reports/$side-build.log"
66+
done
67+
node .github/glue-performance/provenance.mjs "$PERF_ROOT" "$PERF_ROOT/reports"
68+
- name: Frozen Node and Bun ABBA
69+
run: node .github/glue-performance/controller.mjs "$PERF_ROOT" "$PERF_ROOT/reports"
70+
- name: Preserve all samples and failures
71+
if: always()
72+
uses: actions/upload-artifact@v7
73+
with:
74+
name: glue-qualification-${{ matrix.job }}-attempt-${{ github.run_attempt }}
75+
path: |
76+
${{ runner.temp }}/glue-performance/reports
77+
${{ runner.temp }}/glue-performance/base/bindings/devup-ui-wasm/pkg
78+
${{ runner.temp }}/glue-performance/candidate/bindings/devup-ui-wasm/pkg
79+
.github/glue-performance
80+
.github/workflows/glue-performance.yml
81+
include-hidden-files: true
82+
if-no-files-found: error
83+
retention-days: 30

0 commit comments

Comments
 (0)