|
| 1 | +name: Canary |
| 2 | + |
| 3 | +# Weekly + on-demand only: SpiderMonkey nightly, JSC trunk, and a Deno-canary |
| 4 | +# probe run trunk-fresh engine builds against the conformance corpus (issue |
| 5 | +# #22). These are FINDINGS lanes, never gates — every driver here exits 0 |
| 6 | +# even with recorded deviations, per each lane's `required: false` overlay |
| 7 | +# and the drivers' own exit policy (`tools/shell/run-lane.ts`, |
| 8 | +# `tools/shell/deno-canary.ts`: exit 2 is reserved for infrastructure |
| 9 | +# failure, e.g. a missing shell binary or a channel unreachable). Nothing |
| 10 | +# here feeds `ci.yml`'s release gate. |
| 11 | + |
| 12 | +on: |
| 13 | + schedule: |
| 14 | + - cron: "0 6 * * 1" # Monday 06:00 UTC |
| 15 | + workflow_dispatch: |
| 16 | + |
| 17 | +env: |
| 18 | + DENO_VERSION: "2.9.5" |
| 19 | + WASM_TOOLS_VERSION: "1.247.0" |
| 20 | + |
| 21 | +jobs: |
| 22 | + shell-canaries: |
| 23 | + runs-on: ubuntu-24.04 |
| 24 | + timeout-minutes: 45 |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + submodules: true # third_party/component-model: testgen + conformance corpus |
| 29 | + - uses: dtolnay/rust-toolchain@stable |
| 30 | + with: |
| 31 | + targets: wasm32-unknown-unknown |
| 32 | + - uses: Swatinem/rust-cache@v2 |
| 33 | + - uses: taiki-e/install-action@v2 |
| 34 | + with: |
| 35 | + tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }} |
| 36 | + - uses: denoland/setup-deno@v2 |
| 37 | + with: |
| 38 | + deno-version: ${{ env.DENO_VERSION }} |
| 39 | + |
| 40 | + - name: build the translator shim (wasm32) |
| 41 | + run: cargo build -p translator-shim --target wasm32-unknown-unknown --release |
| 42 | + - name: generate the conformance corpus |
| 43 | + working-directory: harness |
| 44 | + run: deno task gen |
| 45 | + |
| 46 | + - name: cache shell downloads |
| 47 | + uses: actions/cache@v4 |
| 48 | + with: |
| 49 | + path: .shell-cache |
| 50 | + # No version pin in the key: nightly/trunk builds change daily by |
| 51 | + # design, so this cache is a same-day rerun optimization only — |
| 52 | + # fetch.ts/deno-canary.ts each check for an existing binary but a |
| 53 | + # stale one just gets reused, matching a findings lane's tolerance |
| 54 | + # for slight staleness between the cron tick and the job running. |
| 55 | + key: shell-cache-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }} |
| 56 | + restore-keys: | |
| 57 | + shell-cache-${{ runner.os }}-${{ runner.arch }}- |
| 58 | +
|
| 59 | + - name: fetch SpiderMonkey nightly |
| 60 | + run: deno run -A tools/shell/fetch.ts spidermonkey |
| 61 | + - name: SpiderMonkey nightly lane |
| 62 | + run: deno run -A tools/shell/run-lane.ts spidermonkey --json sm-results.json |
| 63 | + |
| 64 | + - name: fetch JSC trunk (x86_64) |
| 65 | + run: deno run -A tools/shell/fetch.ts jsc |
| 66 | + - name: JSC trunk lane |
| 67 | + run: deno run -A tools/shell/run-lane.ts jsc --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 |
| 71 | + |
| 72 | + - name: upload results |
| 73 | + if: always() |
| 74 | + uses: actions/upload-artifact@v4 |
| 75 | + with: |
| 76 | + name: shell-canaries-x64 |
| 77 | + path: | |
| 78 | + sm-results.json |
| 79 | + jsc-results.json |
| 80 | + deno-canary-results.json |
| 81 | + if-no-files-found: warn |
| 82 | + |
| 83 | + - name: append summary |
| 84 | + if: always() |
| 85 | + run: | |
| 86 | + { |
| 87 | + echo "## Engine-shell canaries (x64)" |
| 88 | + echo |
| 89 | + echo "SpiderMonkey nightly, JSC trunk, Deno canary — findings lanes, non-gating." |
| 90 | + for f in sm-results.json jsc-results.json deno-canary-results.json; do |
| 91 | + if [ -f "$f" ]; then |
| 92 | + echo |
| 93 | + echo "### $f" |
| 94 | + echo '```json' |
| 95 | + python3 -c "import json,sys; d=json.load(open('$f')); print(json.dumps(d.get('header', d), indent=2)[:4000])" || cat "$f" |
| 96 | + echo '```' |
| 97 | + fi |
| 98 | + done |
| 99 | + } >> "$GITHUB_STEP_SUMMARY" |
| 100 | +
|
| 101 | + # JSC has no arm64 build channel (jsc-built-products is x86_64-only) — this |
| 102 | + # leg runs the two lanes that DO have arm64 coverage (issue #22: "SM |
| 103 | + # nightlies publish aarch64 shells; JSC trunk and d8 do not"). |
| 104 | + shell-canaries-arm: |
| 105 | + runs-on: ubuntu-24.04-arm |
| 106 | + timeout-minutes: 45 |
| 107 | + steps: |
| 108 | + - uses: actions/checkout@v4 |
| 109 | + with: |
| 110 | + submodules: true |
| 111 | + - uses: dtolnay/rust-toolchain@stable |
| 112 | + with: |
| 113 | + targets: wasm32-unknown-unknown |
| 114 | + - uses: Swatinem/rust-cache@v2 |
| 115 | + - uses: taiki-e/install-action@v2 |
| 116 | + with: |
| 117 | + tool: wasm-tools@${{ env.WASM_TOOLS_VERSION }} |
| 118 | + - uses: denoland/setup-deno@v2 |
| 119 | + with: |
| 120 | + deno-version: ${{ env.DENO_VERSION }} |
| 121 | + |
| 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 | + - name: cache shell downloads |
| 129 | + uses: actions/cache@v4 |
| 130 | + with: |
| 131 | + path: .shell-cache |
| 132 | + key: shell-cache-${{ runner.os }}-${{ runner.arch }}-${{ github.run_id }} |
| 133 | + restore-keys: | |
| 134 | + shell-cache-${{ runner.os }}-${{ runner.arch }}- |
| 135 | +
|
| 136 | + - name: fetch SpiderMonkey nightly |
| 137 | + run: deno run -A tools/shell/fetch.ts spidermonkey |
| 138 | + - name: SpiderMonkey nightly lane |
| 139 | + run: deno run -A tools/shell/run-lane.ts spidermonkey --json sm-results.json |
| 140 | + |
| 141 | + - name: Deno canary probe |
| 142 | + run: deno run -A tools/shell/deno-canary.ts --json deno-canary-results.json |
| 143 | + |
| 144 | + - name: upload results |
| 145 | + if: always() |
| 146 | + uses: actions/upload-artifact@v4 |
| 147 | + with: |
| 148 | + name: shell-canaries-arm |
| 149 | + path: | |
| 150 | + sm-results.json |
| 151 | + deno-canary-results.json |
| 152 | + if-no-files-found: warn |
| 153 | + |
| 154 | + - name: append summary |
| 155 | + if: always() |
| 156 | + run: | |
| 157 | + { |
| 158 | + echo "## Engine-shell canaries (arm64)" |
| 159 | + echo |
| 160 | + echo "SpiderMonkey nightly + Deno canary (JSC trunk has no arm64 channel — skipped)." |
| 161 | + for f in sm-results.json deno-canary-results.json; do |
| 162 | + if [ -f "$f" ]; then |
| 163 | + echo |
| 164 | + echo "### $f" |
| 165 | + echo '```json' |
| 166 | + python3 -c "import json,sys; d=json.load(open('$f')); print(json.dumps(d.get('header', d), indent=2)[:4000])" || cat "$f" |
| 167 | + echo '```' |
| 168 | + fi |
| 169 | + done |
| 170 | + } >> "$GITHUB_STEP_SUMMARY" |
0 commit comments