test(test262): promote public class fields #90
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 | |
| 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 | |
| ./scripts/check-oracle-registry.sh | |
| ./scripts/check-test262-host-boundary.sh | |
| ./scripts/test-test262.sh --spec dev-support/test262/current.conf --check | |
| ./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_array_methods | |
| cargo test --locked --test oracle_string_methods | |
| cargo test --locked --test oracle_object_semantics | |
| cargo test --locked --test oracle_regexp | |
| cargo test --locked --test oracle_promise | |
| cargo test --locked --test oracle_collections | |
| cargo test --locked --test oracle_number_kernels | |
| cargo test --locked --test oracle_updates | |
| cargo test --locked --test oracle_function_declarations | |
| cargo test --locked --test oracle_error_semantics | |
| cargo test --locked --test oracle_parameters | |
| cargo test --locked --test oracle_exponentiation | |
| cargo test --locked --test oracle_async_methods | |
| cargo test --locked --test oracle_control_flow | |
| cargo test --locked --test oracle_typed_array_methods | |
| cargo test --locked --test oracle_program_declarations | |
| cargo test --locked --test oracle_json | |
| cargo test --locked --test oracle_argument_semantics | |
| cargo test --locked --test oracle_iterator_methods | |
| cargo test --locked --test oracle_unicode_lexical | |
| cargo test --locked --test oracle_binary_data | |
| cargo test --locked --test oracle_member_access | |
| cargo test --locked --test oracle_template_semantics | |
| cargo test --locked --test oracle_global_semantics | |
| cargo test --locked --test oracle_proxy_reflect | |
| cargo test --locked --test oracle_class_initialization | |
| cargo test --locked --test oracle_operator_semantics | |
| cargo test --locked --test oracle_function_semantics | |
| cargo test --locked --test oracle_primitive_intrinsics | |
| cargo test --locked --test oracle_number_semantics | |
| cargo test --locked --test oracle_eval_semantics | |
| cargo test --locked --test oracle_async_functions | |
| cargo test --locked --features test262-host \ | |
| --test unsupported_diagnostics \ | |
| --test oracle_create_realm --test oracle_host_gc --test oracle_is_html_dda | |
| - name: Lint production targets | |
| run: | | |
| cargo clippy --locked --workspace --lib --bins -- -D warnings | |
| cargo clippy --locked --test oracle_array_methods -- -D warnings | |
| cargo clippy --locked --test oracle_string_methods -- -D warnings | |
| cargo clippy --locked --test oracle_object_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_regexp -- -D warnings | |
| cargo clippy --locked --test oracle_promise -- -D warnings | |
| cargo clippy --locked --test oracle_collections -- -D warnings | |
| cargo clippy --locked --test oracle_number_kernels -- -D warnings | |
| cargo clippy --locked --test oracle_updates -- -D warnings | |
| cargo clippy --locked --test oracle_function_declarations -- -D warnings | |
| cargo clippy --locked --test oracle_error_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_parameters -- -D warnings | |
| cargo clippy --locked --test oracle_exponentiation -- -D warnings | |
| cargo clippy --locked --test oracle_async_methods -- -D warnings | |
| cargo clippy --locked --test oracle_control_flow -- -D warnings | |
| cargo clippy --locked --test oracle_typed_array_methods -- -D warnings | |
| cargo clippy --locked --test oracle_program_declarations -- -D warnings | |
| cargo clippy --locked --test oracle_json -- -D warnings | |
| cargo clippy --locked --test oracle_argument_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_iterator_methods -- -D warnings | |
| cargo clippy --locked --test oracle_unicode_lexical -- -D warnings | |
| cargo clippy --locked --test oracle_binary_data -- -D warnings | |
| cargo clippy --locked --test oracle_member_access -- -D warnings | |
| cargo clippy --locked --test oracle_template_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_global_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_proxy_reflect -- -D warnings | |
| cargo clippy --locked --test oracle_class_initialization -- -D warnings | |
| cargo clippy --locked --test oracle_operator_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_function_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_primitive_intrinsics -- -D warnings | |
| cargo clippy --locked --test oracle_number_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_eval_semantics -- -D warnings | |
| cargo clippy --locked --test oracle_async_functions -- -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_create_realm --test oracle_host_gc --test oracle_is_html_dda \ | |
| -- -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=$(./scripts/build-quickjs-oracle.sh) | |
| 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 |