Dev #210
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: CI — TypeScript | |
| on: | |
| push: | |
| branches: [main, classic-next, dev, classic-9.1] | |
| pull_request: | |
| branches: [main, classic-next, dev, classic-9.1] | |
| env: | |
| RUST_BACKTRACE: 1 | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| parity-gates: | |
| name: Node Parity Gates | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| env: | |
| RUST_BACKTRACE: full | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Cache cargo registry | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-index- | |
| - name: Cache cargo build | |
| uses: actions/cache@v5 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-node-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('foundation/**/*.rs', 'business-logic/**/*.rs', 'cpp-bindings/**/*.rs', 'node-bindings/**/*.rs', 'python-bindings/**/*.rs', 'ui-applications/**/*.rs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-node-${{ hashFiles('**/Cargo.lock') }}- | |
| ${{ runner.os }}-cargo-node- | |
| - name: Install npm dependencies | |
| working-directory: node-bindings/classic-node | |
| run: bun install | |
| - name: Build NAPI-RS binary | |
| working-directory: node-bindings/classic-node | |
| run: bun run build | |
| - name: Verify NAPI binary exists | |
| working-directory: node-bindings/classic-node | |
| shell: pwsh | |
| run: | | |
| $binary = Get-ChildItem -Filter "*.node" -Recurse | |
| if ($binary) { | |
| Write-Host "NAPI binary found: $($binary.FullName) ($([math]::Round($binary.Length / 1MB, 2)) MB)" | |
| } else { | |
| Write-Error "NAPI binary not found after build" | |
| exit 1 | |
| } | |
| - name: Run Node binding compliance profile | |
| run: python tools/binding_compliance/check_compliance.py --repo-root . --profile node-ci | |
| - name: Upload parity and runtime coverage diagnostics | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: node-parity-diagnostics | |
| path: | | |
| tools/binding_compliance/artifacts/ | |
| node-bindings/classic-node/parity-artifacts/ | |
| if-no-files-found: warn | |
| retention-days: 7 | |
| build-and-test: | |
| name: NAPI-RS Build + Runtime Tests (${{ matrix.runtime }}) | |
| needs: [parity-gates] | |
| runs-on: windows-latest | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runtime: [bun, node] | |
| env: | |
| RUST_BACKTRACE: full | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Install Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Cache cargo registry | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cargo/registry | |
| key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-registry- | |
| - name: Cache cargo index | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cargo/git | |
| key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-index- | |
| - name: Cache cargo build | |
| uses: actions/cache@v5 | |
| with: | |
| path: target | |
| key: ${{ runner.os }}-cargo-node-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('foundation/**/*.rs', 'business-logic/**/*.rs', 'cpp-bindings/**/*.rs', 'node-bindings/**/*.rs', 'python-bindings/**/*.rs', 'ui-applications/**/*.rs') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-node-${{ hashFiles('**/Cargo.lock') }}- | |
| ${{ runner.os }}-cargo-node- | |
| - name: Install npm dependencies | |
| working-directory: node-bindings/classic-node | |
| run: bun install | |
| - name: Build NAPI-RS binary | |
| working-directory: node-bindings/classic-node | |
| run: bun run build | |
| - name: Verify NAPI binary exists | |
| working-directory: node-bindings/classic-node | |
| shell: pwsh | |
| run: | | |
| $binary = Get-ChildItem -Filter "*.node" -Recurse | |
| if ($binary) { | |
| Write-Host "NAPI binary found: $($binary.FullName) ($([math]::Round($binary.Length / 1MB, 2)) MB)" | |
| } else { | |
| Write-Error "NAPI binary not found after build" | |
| exit 1 | |
| } | |
| - name: Run Bun tests | |
| if: matrix.runtime == 'bun' | |
| working-directory: node-bindings/classic-node | |
| run: bun run test:bun | |
| - name: Run Node runtime smoke tests | |
| if: matrix.runtime == 'node' | |
| working-directory: node-bindings/classic-node | |
| run: bun run test:node |