perf(tier-up): background-thread LLVM compile during BC interp warmup #72
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: Rust CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: fmt + clippy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy (default features, no LLVM) | |
| run: cargo clippy --workspace --all-targets | |
| native-platform-tests: | |
| name: native tests (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| - os: windows-2025 | |
| target: x86_64-pc-windows-msvc | |
| - os: macos-15-intel | |
| target: x86_64-apple-darwin | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: native-${{ matrix.target }} | |
| - name: Show Rust host and target | |
| run: rustc -vV | |
| - name: Run workspace tests | |
| env: | |
| RUST_MIN_STACK: 134217728 | |
| run: cargo test --workspace --lib --bins --tests --target ${{ matrix.target }} | |
| backend-feature-matrix: | |
| name: backend features (${{ matrix.lane }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - lane: default | |
| cargo_features: "" | |
| - lane: llvm-backend | |
| cargo_features: "--features llvm-backend" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install LLVM 21 (llvm-backend lane only) | |
| if: matrix.lane == 'llvm-backend' | |
| run: | | |
| wget -qO llvm.sh https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 21 all | |
| echo "LLVM_SYS_211_PREFIX=/usr/lib/llvm-21" >> "$GITHUB_ENV" | |
| - name: Build zynml for selected backend lane | |
| run: cargo check -p zynml ${{ matrix.cargo_features }} | |
| - name: Run runtime-profile smoke test for selected backend lane | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml ${{ matrix.cargo_features }} --test e2e_tests runtime::test_runtime_profile_tiered_development -- --nocapture | |
| parse-conformance: | |
| name: parse conformance | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run docs snippet parse conformance | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests docs_conformance:: -- --nocapture | |
| - name: Run examples parse regression suite | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests examples_regression:: -- --nocapture | |
| type-lowering-conformance: | |
| name: type + lowering conformance | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run Grammar2 typed parsing conformance | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests grammar2_parsing:: -- --nocapture | |
| - name: Run type-system conformance | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests type_system:: -- --nocapture | |
| - name: Run lowering/runtime cast conformance | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_implicit_numeric_casts_in_assignments -- --nocapture | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_implicit_numeric_casts_in_call_args -- --nocapture | |
| simd-contract: | |
| name: SIMD contract (Cranelift) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run Cranelift SIMD vector contract tests | |
| run: cargo test -p zyntax_compiler --test cranelift_backend_tests vector_ -- --nocapture | |
| runtime-smoke: | |
| name: runtime smoke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run runtime smoke tests | |
| run: | | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_simple_expression -- --nocapture | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests execution::test_execute_prelude_only_example -- --nocapture | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests runtime::test_runtime_profile_tiered_development -- --nocapture | |
| RUST_MIN_STACK=134217728 cargo test -p zynml --test e2e_tests runtime::test_runtime_event_capture_render_and_stream -- --nocapture | |
| wasm-headless-chrome: | |
| name: wasm headless-chrome smoke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: wasm-headless-chrome | |
| - name: Install wasm-pack | |
| uses: jetli/wasm-pack-action@v0.4.0 | |
| with: | |
| version: latest | |
| - name: Build zyntax_wasm (web target) | |
| working-directory: crates/zyntax_wasm | |
| run: ./build.sh web | |
| - name: Build zyntax_wasm (node target) | |
| working-directory: crates/zyntax_wasm | |
| run: ./build.sh node | |
| - name: Install Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Single-threaded fallback path — Node has no | |
| # crossOriginIsolated context, so this exercises the non-isolated | |
| # code path of zynml.mjs end-to-end. | |
| - name: Run Node smoke | |
| working-directory: crates/zyntax_wasm | |
| run: node test/node_smoke.mjs | |
| # Headless-Chrome run exercises the same surface under a real | |
| # browser. `tests/browser_smoke.rs` covers the wasm-bindgen | |
| # exports + Phase G/H/I.0 bridge plumbing under a real Chrome | |
| # engine via wasm-bindgen-test. | |
| - name: Run headless Chrome smoke | |
| working-directory: crates/zyntax_wasm | |
| run: wasm-pack test --headless --chrome |