Engine CI #203
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Engine CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| schedule: | |
| - cron: "23 9 * * *" | |
| - cron: "47 18 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| tier: | |
| description: Validation tier to run | |
| required: true | |
| default: fast | |
| type: choice | |
| options: | |
| - fast | |
| - quickjs-differential | |
| - test262-full | |
| - test262-candidate | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: "1" | |
| RUST_VERSION: "1.88.0" | |
| jobs: | |
| fast: | |
| if: >- | |
| github.event_name == 'pull_request' || | |
| github.event_name == 'push' || | |
| (github.event_name == 'workflow_dispatch' && inputs.tier == 'fast') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install pinned Rust toolchain | |
| run: | | |
| rustup toolchain install "${RUST_VERSION}" --profile minimal --component rustfmt,clippy | |
| rustup default "${RUST_VERSION}" | |
| - name: Install gate dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes ripgrep | |
| - name: Cache Cargo inputs | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-${{ env.RUST_VERSION }}-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-${{ env.RUST_VERSION }}- | |
| - name: Check formatting and architecture gates | |
| run: | | |
| cargo fmt --all -- --check | |
| ./scripts/check-no-test262-special-casing.sh | |
| node scripts/check-test262-artifact-inventory.mjs | |
| node --check scripts/test-negative-diagnostic-generator.mjs | |
| node --check scripts/generate-test262-dynamic-import-a.mjs | |
| node --check scripts/generate-test262-tla-core-a.mjs | |
| node --check scripts/generate-test262-module-var-lexical-shadow-a.mjs | |
| node --check scripts/generate-test262-module-import-attributes-a.mjs | |
| node --check scripts/test-generate-test262-module-import-attributes-a.mjs | |
| node --check scripts/generate-test262-module-json-a.mjs | |
| node --check scripts/test-generate-test262-module-json-a.mjs | |
| ./scripts/check-oracle-registry.sh | |
| ./scripts/test-quickjs-fixtures.sh --validate | |
| ./scripts/test-module-c-oracles.sh --validate | |
| ./scripts/test-quickjs-dynamic-import-trace.sh --validate | |
| ./scripts/check-test262-host-boundary.sh | |
| ./scripts/test-test262.sh --spec dev-support/test262/current.conf --check | |
| ./scripts/test-test262.sh --spec dev-support/test262/current.conf --runner-provenance | |
| node scripts/current-test262-metrics.mjs --check-docs | |
| ./scripts/check-rust-only.sh | |
| - name: Run fast engine tests | |
| run: | | |
| cargo test --locked --workspace --lib --bins | |
| cargo test --locked -p quickjs-oxide --features test262-host --lib --bins | |
| cargo test --locked --test cli | |
| cargo test --locked --test oracle | |
| cargo test --locked --features test262-host \ | |
| --test unsupported_diagnostics | |
| cargo test --locked --features test262-host \ | |
| --test oracle test262_ | |
| ./scripts/check-oracle-registry.sh --compiled | |
| - name: Lint production targets | |
| run: | | |
| cargo clippy --locked --workspace --lib --bins -- -D warnings | |
| cargo clippy --locked --test oracle -- -D warnings | |
| cargo clippy --locked -p quickjs-oxide --features test262-host \ | |
| --lib --bins -- -D warnings | |
| cargo clippy --locked -p quickjs-oxide --features test262-host \ | |
| --test unsupported_diagnostics --test oracle \ | |
| -- -D warnings | |
| quickjs-differential: | |
| if: >- | |
| (github.event_name == 'schedule' && github.event.schedule == '23 9 * * *') || | |
| (github.event_name == 'workflow_dispatch' && inputs.tier == 'quickjs-differential') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 180 | |
| env: | |
| QJS_ORACLE_CACHE: ${{ github.workspace }}-oracle-cache | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install pinned Rust toolchain | |
| run: | | |
| rustup toolchain install "${RUST_VERSION}" --profile minimal | |
| rustup default "${RUST_VERSION}" | |
| - name: Install oracle dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes build-essential curl git ripgrep xz-utils | |
| - name: Restore authenticated input caches | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ github.workspace }}-oracle-cache | |
| key: >- | |
| ${{ runner.os }}-differential-${{ env.RUST_VERSION }}-${{ | |
| hashFiles('Cargo.lock', 'compat/upstream.toml', | |
| 'scripts/build-quickjs-oracle.sh', 'scripts/prepare-test262.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-differential-${{ env.RUST_VERSION }}- | |
| - name: Run the pinned QuickJS differential corpus | |
| run: | | |
| oracle_source=$(./scripts/build-quickjs-oracle.sh --test262-oracles) | |
| oracle="$oracle_source/qjs" | |
| QJS_ORACLE_ARCHIVE_FIXTURE="$QJS_ORACLE_CACHE/quickjs-2026-06-04.tar.xz" \ | |
| ./scripts/test-build-quickjs-oracle-cache.sh | |
| QJS_ORACLE_ARCHIVE="$QJS_ORACLE_CACHE/quickjs-2026-06-04.tar.xz" \ | |
| ./scripts/test-quickjs-dynamic-import-trace.sh | |
| suite=$(./scripts/prepare-test262.sh) | |
| node scripts/generate-test262-dynamic-import-a.mjs \ | |
| --suite "$suite" --check-current | |
| node scripts/generate-test262-tla-core-a.mjs \ | |
| --suite "$suite" --check-current | |
| node scripts/generate-test262-module-var-lexical-shadow-a.mjs \ | |
| --suite "$suite" \ | |
| --quickjs-runner "$oracle_source/run-test262" \ | |
| --quickjs-config "$oracle_source/test262.conf" \ | |
| --check-current | |
| node scripts/audit-negative-diagnostics.mjs \ | |
| --contracts dev-support/test262/negative-diagnostics.tsv \ | |
| --rules dev-support/test262/negative-diagnostic-rules.tsv \ | |
| --suite "$suite" --qjs "$oracle" | |
| node scripts/test-generate-test262-module-import-attributes-a.mjs \ | |
| --suite "$suite" \ | |
| --quickjs-runner "$oracle_source/run-test262" \ | |
| --quickjs-config "$oracle_source/test262.conf" | |
| node scripts/generate-test262-module-import-attributes-a.mjs \ | |
| --suite "$suite" \ | |
| --quickjs-runner "$oracle_source/run-test262" \ | |
| --quickjs-config "$oracle_source/test262.conf" \ | |
| --check-current | |
| node scripts/test-generate-test262-module-json-a.mjs \ | |
| --suite "$suite" \ | |
| --quickjs-runner "$oracle_source/run-test262" \ | |
| --quickjs-config "$oracle_source/test262.conf" | |
| node scripts/generate-test262-module-json-a.mjs \ | |
| --suite "$suite" \ | |
| --quickjs-runner "$oracle_source/run-test262" \ | |
| --quickjs-config "$oracle_source/test262.conf" \ | |
| --check-current | |
| cargo build --locked --bin qjs | |
| node scripts/test-negative-diagnostic-generator.mjs \ | |
| --suite "$suite" --qjs "$oracle" --oxide ./target/debug/qjs | |
| ./scripts/test-quickjs-fixtures.sh --all --oxide ./target/debug/qjs | |
| ./scripts/test-module-c-oracles.sh --check | |
| QJS_ORACLE="$oracle" cargo test --locked --workspace --all-targets \ | |
| --features test262-host | |
| test262-full: | |
| if: >- | |
| (github.event_name == 'schedule' && github.event.schedule == '47 18 * * *') || | |
| (github.event_name == 'workflow_dispatch' && inputs.tier == 'test262-full') | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 350 | |
| env: | |
| QJS_ORACLE_CACHE: ${{ github.workspace }}-oracle-cache | |
| TEST262_WORKERS: "2" | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install pinned Rust toolchain | |
| run: | | |
| rustup toolchain install "${RUST_VERSION}" --profile minimal | |
| rustup default "${RUST_VERSION}" | |
| - name: Install Test262 dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes build-essential curl git ripgrep xz-utils | |
| - name: Restore authenticated input caches | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| ${{ github.workspace }}-oracle-cache | |
| key: >- | |
| ${{ runner.os }}-test262-${{ env.RUST_VERSION }}-${{ | |
| hashFiles('Cargo.lock', 'compat/upstream.toml', | |
| 'scripts/build-quickjs-oracle.sh', 'scripts/prepare-test262.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-test262-${{ env.RUST_VERSION }}- | |
| - name: Run the complete frozen Test262 vector | |
| run: | | |
| set -o pipefail | |
| mkdir -p target | |
| ./scripts/test-test262.sh --spec dev-support/test262/current.conf --full \ | |
| 2>&1 | tee target/test262-full.log | |
| - name: Upload complete Test262 receipts | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test262-full-${{ github.sha }} | |
| path: | | |
| target/test262-full.tsv | |
| target/test262-full.jsonl | |
| target/test262-full.log | |
| dev-support/test262/current.conf | |
| dev-support/test262/negative-diagnostics.tsv | |
| compat/upstream.toml | |
| if-no-files-found: warn | |
| retention-days: 30 | |
| test262-candidate: | |
| if: >- | |
| github.event_name == 'workflow_dispatch' && | |
| inputs.tier == 'test262-candidate' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 350 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install pinned Rust toolchain | |
| run: | | |
| rustup toolchain install "${RUST_VERSION}" --profile minimal \ | |
| --component rustfmt,clippy | |
| rustup default "${RUST_VERSION}" | |
| - name: Install Test262 dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --yes build-essential curl git ripgrep xz-utils | |
| - name: Cache Cargo inputs | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-candidate-${{ env.RUST_VERSION }}-${{ hashFiles('Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-candidate-${{ env.RUST_VERSION }}- | |
| - name: Validate current-source candidate implementation | |
| run: | | |
| set -euo pipefail | |
| cargo fmt --all -- --check | |
| git diff --check | |
| node --check scripts/generate-test262-dynamic-import-a.mjs | |
| node --check scripts/verify-test262-report-pair.mjs | |
| ./scripts/check-no-test262-special-casing.sh | |
| ./scripts/check-test262-host-boundary.sh | |
| ./scripts/check-rust-only.sh | |
| cargo test --locked -p quickjs-oxide --features test262-host \ | |
| --lib --bin run-test262 | |
| cargo test --locked --test oracle | |
| cargo clippy --locked -p quickjs-oxide --features test262-host \ | |
| --lib --bins -- -D warnings | |
| - name: Generate current-source Test262 candidate receipts | |
| run: | | |
| set -euo pipefail | |
| output=target/test262-candidate | |
| mkdir -p "$output/runner" | |
| rustc -vV > "$output/rustc-version.txt" | |
| cargo -V > "$output/cargo-version.txt" | |
| sha256_file() { | |
| sha256sum "$1" | awk '{ print $1 }' | |
| } | |
| engine_files=Cargo.lock,Cargo.toml,compat/test262-oxide.conf,compat/upstream.toml,scripts/prepare-test262.sh,scripts/test-test262.sh | |
| workspace_engine_fingerprint() { | |
| node scripts/test262-engine-fingerprint.mjs \ | |
| --root . --worktree --files "$engine_files" --trees src | |
| } | |
| engine_fingerprint=$(workspace_engine_fingerprint) | |
| printf '%s\n' "$engine_fingerprint" > "$output/engine-fingerprint.txt" | |
| git rev-parse HEAD > "$output/source-commit.txt" | |
| candidate_inputs=( | |
| .github/workflows/ci.yml | |
| compat/test262-oxide.conf | |
| compat/upstream.toml | |
| dev-support/test262/current.conf | |
| dev-support/test262/admissions.tsv | |
| dev-support/test262/negative-diagnostic-exemptions.tsv | |
| dev-support/test262/negative-diagnostic-rules.tsv | |
| dev-support/test262/negative-diagnostics.tsv | |
| scripts/audit-negative-diagnostics.mjs | |
| scripts/build-quickjs-oracle.sh | |
| scripts/generate-test262-dynamic-import-a.mjs | |
| scripts/prepare-test262.sh | |
| scripts/test-test262.sh | |
| scripts/test262-engine-fingerprint.mjs | |
| scripts/verify-test262-report-pair.mjs | |
| tests/test262-class-private-callables-b-global-candidate.tsv | |
| tests/test262-class-private-callables-b.txt | |
| ) | |
| sha256sum "${candidate_inputs[@]}" > "$output/inputs.sha256" | |
| inputs_manifest_sha256=$(sha256_file "$output/inputs.sha256") | |
| assert_inputs_unchanged() { | |
| local phase=$1 actual | |
| if ! git diff --quiet || ! git diff --cached --quiet; then | |
| echo "tracked worktree changed during $phase" >&2 | |
| exit 1 | |
| fi | |
| actual=$(workspace_engine_fingerprint) | |
| if [[ "$actual" != "$engine_fingerprint" ]]; then | |
| echo "engine semantics changed during $phase: before=$engine_fingerprint after=$actual" >&2 | |
| exit 1 | |
| fi | |
| if [[ "$(sha256_file "$output/inputs.sha256")" != \ | |
| "$inputs_manifest_sha256" ]]; then | |
| echo "candidate input manifest changed during $phase" >&2 | |
| exit 1 | |
| fi | |
| sha256sum --check --strict --quiet "$output/inputs.sha256" || { | |
| echo "candidate inputs changed during $phase" >&2 | |
| exit 1 | |
| } | |
| } | |
| build_host=$(rustc -vV | awk '$1=="host:" { print $2 }') | |
| QUICKJS_OXIDE_TEST262_ENGINE_SEMANTICS_SHA256="$engine_fingerprint" \ | |
| cargo build --locked --release --target "$build_host" \ | |
| --features test262-host --bin run-test262 | |
| assert_inputs_unchanged "runner build" | |
| built_runner="target/$build_host/release/run-test262" | |
| runner="$output/runner/run-test262" | |
| [[ -f "$built_runner" && -x "$built_runner" && ! -L "$built_runner" ]] | |
| cp -p -- "$built_runner" "$runner" | |
| [[ -f "$runner" && -x "$runner" && ! -L "$runner" ]] | |
| [[ "$(sha256_file "$built_runner")" == "$(sha256_file "$runner")" ]] | |
| runner_sha256=$(sha256_file "$runner") | |
| printf '%s run-test262\n' "$runner_sha256" \ | |
| > "$output/runner/run-test262.sha256" | |
| assert_runner_unchanged() { | |
| local phase=$1 | |
| if [[ ! -f "$runner" || ! -x "$runner" || -L "$runner" || \ | |
| "$(sha256_file "$runner")" != "$runner_sha256" ]]; then | |
| echo "private Test262 runner changed during $phase" >&2 | |
| exit 1 | |
| fi | |
| } | |
| assert_runner_unchanged "positive provenance check" | |
| provenance_output=$("$runner" \ | |
| --verify-runner-provenance "$engine_fingerprint") | |
| expected_provenance="run-test262 provenance: engine_semantics_sha256=$engine_fingerprint" | |
| [[ "$provenance_output" == "$expected_provenance" ]] | |
| printf '%s\n' "$provenance_output" > "$output/runner-provenance.log" | |
| stale_fingerprint=0000000000000000000000000000000000000000000000000000000000000000 | |
| if [[ "$stale_fingerprint" == "$engine_fingerprint" ]]; then | |
| stale_fingerprint=ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff | |
| fi | |
| set +e | |
| stale_output=$("$runner" \ | |
| --verify-runner-provenance "$stale_fingerprint" 2>&1) | |
| stale_status=$? | |
| set -e | |
| expected_stale="run-test262 provenance: runner engine semantics fingerprint mismatch: compiled=$engine_fingerprint expected=$stale_fingerprint" | |
| [[ "$stale_status" == 2 && "$stale_output" == "$expected_stale" ]] | |
| printf '%s\n' "$stale_output" > "$output/runner-provenance-stale.log" | |
| assert_runner_unchanged "runner authentication" | |
| assert_inputs_unchanged "runner authentication" | |
| suite=$(./scripts/prepare-test262.sh) | |
| source_dir=$(dirname "$suite") | |
| [[ -n "$suite" && "$suite" == /* && -d "$suite/test" && -d "$suite/harness" && ! -L "$suite" ]] | |
| mkdir -p "$output/upstream" | |
| cp -p -- "$source_dir/test262.conf" "$output/upstream/test262.conf" | |
| cp -p -- "$source_dir/tests/test262.patch" "$output/upstream/test262.patch" | |
| expected_test262_commit=$(awk -F '[ ="]+' \ | |
| '$1=="commit" { print $2 }' compat/upstream.toml) | |
| expected_patch_sha256=$(awk -F '[ ="]+' \ | |
| '$1=="patch_sha256" { print $2 }' compat/upstream.toml) | |
| expected_config_sha256=$(awk -F '[ ="]+' \ | |
| '$1=="config_sha256" { print $2 }' compat/upstream.toml) | |
| [[ "$(git -C "$suite" rev-parse HEAD)" == "$expected_test262_commit" ]] | |
| [[ "$(sha256_file "$output/upstream/test262.patch")" == \ | |
| "$expected_patch_sha256" ]] | |
| [[ "$(sha256_file "$output/upstream/test262.conf")" == \ | |
| "$expected_config_sha256" ]] | |
| printf '%s\n' "$expected_test262_commit" > "$output/test262-commit.txt" | |
| ( | |
| cd "$output" | |
| sha256sum upstream/test262.conf upstream/test262.patch \ | |
| > upstream-inputs.sha256 | |
| ) | |
| upstream_manifest_sha256=$(sha256_file \ | |
| "$output/upstream-inputs.sha256") | |
| assert_upstream_inputs_unchanged() { | |
| local phase=$1 | |
| if [[ "$(git -C "$suite" rev-parse HEAD)" != \ | |
| "$expected_test262_commit" || \ | |
| "$(sha256_file "$source_dir/test262.conf")" != \ | |
| "$expected_config_sha256" || \ | |
| "$(sha256_file "$source_dir/tests/test262.patch")" != \ | |
| "$expected_patch_sha256" || \ | |
| "$(sha256_file "$output/upstream-inputs.sha256")" != \ | |
| "$upstream_manifest_sha256" ]] || ! ( | |
| cd "$output" | |
| sha256sum --check --strict --quiet upstream-inputs.sha256 | |
| ); then | |
| echo "authenticated upstream inputs changed during $phase" >&2 | |
| exit 1 | |
| fi | |
| } | |
| assert_upstream_inputs_unchanged "suite preparation" | |
| authenticate_suite_again() { | |
| local phase=$1 authenticated_suite | |
| authenticated_suite=$(./scripts/prepare-test262.sh) | |
| if [[ "$authenticated_suite" != "$suite" ]]; then | |
| echo "authenticated Test262 suite path changed during $phase" >&2 | |
| exit 1 | |
| fi | |
| } | |
| node scripts/audit-negative-diagnostics.mjs --check \ | |
| --contracts dev-support/test262/negative-diagnostics.tsv \ | |
| --rules dev-support/test262/negative-diagnostic-rules.tsv | |
| node scripts/generate-test262-dynamic-import-a.mjs \ | |
| --suite "$suite" --check-current | |
| node scripts/generate-test262-dynamic-import-a.mjs \ | |
| --suite "$suite" --diagnostic-candidates \ | |
| > "$output/new-focused-candidates.tsv" | |
| assert_runner_unchanged "metadata audit preflight" | |
| assert_upstream_inputs_unchanged "metadata audit preflight" | |
| "$runner" --suite "$suite" \ | |
| --validate-metadata "$output/test262-metadata.bin" \ | |
| > "$output/test262-metadata.log" | |
| expected_metadata_count=$(awk -F '[ ="]+' \ | |
| '$1=="test_count" { print $2 }' compat/upstream.toml) | |
| expected_metadata_sha256=$(awk -F '[ ="]+' \ | |
| '$1=="metadata_records_sha256" { print $2 }' compat/upstream.toml) | |
| grep -Fqx "Test262 metadata: files=$expected_metadata_count" \ | |
| "$output/test262-metadata.log" | |
| [[ "$(sha256_file "$output/test262-metadata.bin")" == \ | |
| "$expected_metadata_sha256" ]] | |
| assert_runner_unchanged "metadata audit" | |
| assert_upstream_inputs_unchanged "metadata audit" | |
| assert_inputs_unchanged "suite authentication" | |
| common=( | |
| --suite "$suite" | |
| --config "$source_dir/test262.conf" | |
| --admissions dev-support/test262/admissions.tsv | |
| --admissions-sha256 "$(sha256sum dev-support/test262/admissions.tsv | awk '{print $1}')" | |
| --oxide-profile compat/test262-oxide.conf | |
| --negative-diagnostics dev-support/test262/negative-diagnostics.tsv | |
| --negative-diagnostics-sha256 "$(sha256sum dev-support/test262/negative-diagnostics.tsv | awk '{print $1}')" | |
| --negative-diagnostic-exemptions dev-support/test262/negative-diagnostic-exemptions.tsv | |
| --negative-diagnostic-exemptions-sha256 "$(sha256sum dev-support/test262/negative-diagnostic-exemptions.tsv | awk '{print $1}')" | |
| --engine-semantics-sha256 "$engine_fingerprint" | |
| --mode both | |
| --timeout-ms 30000 | |
| ) | |
| assert_runner_unchanged "focused execution preflight" | |
| assert_upstream_inputs_unchanged "focused execution preflight" | |
| authenticate_suite_again "focused execution preflight" | |
| "$runner" "${common[@]}" \ | |
| --workers 2 \ | |
| --manifest tests/test262-class-private-callables-b.txt \ | |
| --report "$output/focused.tsv" \ | |
| 2>&1 | tee "$output/focused.log" | |
| awk -F '\t' ' | |
| $1 == "path" { | |
| for (column = 1; column <= NF; column++) { | |
| if ($column == "outcome") outcome = column | |
| } | |
| header++ | |
| next | |
| } | |
| header == 1 && substr($1, 1, 1) != "#" { | |
| rows++ | |
| if ($outcome != "pass") bad++ | |
| } | |
| END { if (header != 1 || !outcome || !rows || bad) exit 1 } | |
| ' "$output/focused.tsv" | |
| awk -F '\t' ' | |
| $1 == "path" { header = 1; next } | |
| header && substr($1, 1, 1) != "#" { print $1 } | |
| ' "$output/focused.tsv" | sort -u > "$output/focused-paths.txt" | |
| cmp -s tests/test262-class-private-callables-b.txt \ | |
| "$output/focused-paths.txt" | |
| old_focused=tests/test262-class-private-callables-b-global-candidate.tsv | |
| expected_old_focused_sha256=$(awk -F = \ | |
| '$1=="focused_tsv_sha256" { print $2 }' \ | |
| dev-support/test262/current.conf) | |
| [[ "$(sha256_file "$old_focused")" == \ | |
| "$expected_old_focused_sha256" ]] | |
| awk -F '\t' ' | |
| $1 == "path" && $2 == "variant" { header++; next } | |
| header == 1 && substr($1, 1, 1) != "#" { print $1 "\t" $2 } | |
| END { if (header != 1) exit 1 } | |
| ' "$old_focused" > "$output/expected-focused-keys.unsorted.tsv" | |
| awk -F '\t' ' | |
| NR == 1 { | |
| if ($1 != "path" || $2 != "variant" || $3 != "rule") exit 1 | |
| next | |
| } | |
| NF == 3 { print $1 "\t" $2; rows++ } | |
| END { if (!rows) exit 1 } | |
| ' "$output/new-focused-candidates.tsv" \ | |
| >> "$output/expected-focused-keys.unsorted.tsv" | |
| sort "$output/expected-focused-keys.unsorted.tsv" \ | |
| > "$output/expected-focused-keys.tsv" | |
| [[ -z $(uniq -d "$output/expected-focused-keys.tsv") ]] | |
| awk -F '\t' ' | |
| $1 == "path" && $2 == "variant" { header++; next } | |
| header == 1 && substr($1, 1, 1) != "#" { print $1 "\t" $2 } | |
| END { if (header != 1) exit 1 } | |
| ' "$output/focused.tsv" > "$output/actual-focused-keys.tsv" | |
| cmp -s "$output/expected-focused-keys.tsv" \ | |
| "$output/actual-focused-keys.tsv" | |
| node scripts/verify-test262-report-pair.mjs \ | |
| "$output/focused.tsv" "$output/focused.jsonl" | |
| assert_runner_unchanged "focused execution" | |
| assert_upstream_inputs_unchanged "focused execution" | |
| authenticate_suite_again "focused execution" | |
| assert_inputs_unchanged "focused execution" | |
| assert_no_infrastructure_failures() { | |
| local report=$1 | |
| awk -F '\t' ' | |
| $1 == "path" { | |
| for (column = 1; column <= NF; column++) { | |
| if ($column == "outcome") outcome = column | |
| if ($column == "actual_type") actual_type = column | |
| } | |
| header++ | |
| next | |
| } | |
| header == 1 && substr($1, 1, 1) != "#" { | |
| rows++ | |
| if ($outcome ~ /^(runner-error|timeout|crash|engine-fault|harness-error|harness-engine-fault|async-host-error)$/ || | |
| $outcome ~ /-invariant$/ || $actual_type == "Invariant") bad++ | |
| } | |
| END { | |
| if (header != 1 || !outcome || !actual_type || !rows || bad) exit 1 | |
| } | |
| ' "$report" | |
| } | |
| run_full() { | |
| local workers=$1 report="$output/full-w${1}.tsv" | |
| assert_runner_unchanged "full execution preflight with $workers workers" | |
| assert_upstream_inputs_unchanged \ | |
| "full execution preflight with $workers workers" | |
| authenticate_suite_again \ | |
| "full execution preflight with $workers workers" | |
| "$runner" "${common[@]}" --workers "$workers" --all \ | |
| --allow-failures --report "$report" \ | |
| 2>&1 | tee "$output/full-w${workers}.log" | |
| assert_no_infrastructure_failures "$report" | |
| node scripts/verify-test262-report-pair.mjs \ | |
| "$report" "${report%.tsv}.jsonl" | |
| assert_runner_unchanged "full execution with $workers workers" | |
| assert_upstream_inputs_unchanged \ | |
| "full execution with $workers workers" | |
| authenticate_suite_again "full execution with $workers workers" | |
| assert_inputs_unchanged "full execution with $workers workers" | |
| } | |
| run_full 2 | |
| run_full 4 | |
| cmp -s "$output/full-w2.tsv" "$output/full-w4.tsv" | |
| cmp -s "$output/full-w2.jsonl" "$output/full-w4.jsonl" | |
| cp -- "$output/full-w2.tsv" "$output/full.tsv" | |
| cp -- "$output/full-w2.jsonl" "$output/full.jsonl" | |
| node scripts/verify-test262-report-pair.mjs \ | |
| "$output/full.tsv" "$output/full.jsonl" | |
| assert_inputs_unchanged "candidate publication" | |
| assert_upstream_inputs_unchanged "candidate publication" | |
| assert_runner_unchanged "candidate publication" | |
| - name: Upload current-source Test262 candidate receipts | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: test262-candidate-${{ github.sha }} | |
| path: | | |
| target/test262-candidate/focused.tsv | |
| target/test262-candidate/focused.jsonl | |
| target/test262-candidate/focused.log | |
| target/test262-candidate/focused-paths.txt | |
| target/test262-candidate/new-focused-candidates.tsv | |
| target/test262-candidate/expected-focused-keys.tsv | |
| target/test262-candidate/actual-focused-keys.tsv | |
| target/test262-candidate/full.tsv | |
| target/test262-candidate/full.jsonl | |
| target/test262-candidate/full-w2.tsv | |
| target/test262-candidate/full-w2.jsonl | |
| target/test262-candidate/full-w2.log | |
| target/test262-candidate/full-w4.tsv | |
| target/test262-candidate/full-w4.jsonl | |
| target/test262-candidate/full-w4.log | |
| target/test262-candidate/engine-fingerprint.txt | |
| target/test262-candidate/source-commit.txt | |
| target/test262-candidate/rustc-version.txt | |
| target/test262-candidate/cargo-version.txt | |
| target/test262-candidate/inputs.sha256 | |
| target/test262-candidate/runner-provenance.log | |
| target/test262-candidate/runner-provenance-stale.log | |
| target/test262-candidate/runner/run-test262 | |
| target/test262-candidate/runner/run-test262.sha256 | |
| target/test262-candidate/test262-commit.txt | |
| target/test262-candidate/test262-metadata.bin | |
| target/test262-candidate/test262-metadata.log | |
| target/test262-candidate/upstream/test262.conf | |
| target/test262-candidate/upstream/test262.patch | |
| target/test262-candidate/upstream-inputs.sha256 | |
| tests/test262-class-private-callables-b.txt | |
| tests/test262-class-private-callables-b-global-candidate.tsv | |
| dev-support/test262/current.conf | |
| dev-support/test262/admissions.tsv | |
| dev-support/test262/negative-diagnostic-exemptions.tsv | |
| dev-support/test262/negative-diagnostic-rules.tsv | |
| dev-support/test262/negative-diagnostics.tsv | |
| scripts/audit-negative-diagnostics.mjs | |
| scripts/build-quickjs-oracle.sh | |
| scripts/generate-test262-dynamic-import-a.mjs | |
| scripts/prepare-test262.sh | |
| scripts/test-test262.sh | |
| scripts/test262-engine-fingerprint.mjs | |
| scripts/verify-test262-report-pair.mjs | |
| compat/test262-oxide.conf | |
| compat/upstream.toml | |
| .github/workflows/ci.yml | |
| if-no-files-found: warn | |
| include-hidden-files: true | |
| retention-days: 30 |