wip #98
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 | |
| on: | |
| - push | |
| - pull_request | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout bao-tree keyed fork (sibling for path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SurmountSystems/bao-tree | |
| ref: 76-keyed-bao | |
| path: ../bao-tree | |
| - uses: extractions/setup-just@v2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Format check | |
| run: just fmt | |
| - name: Lint (native, all targets/features) | |
| run: just lint | |
| lint-wasm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout bao-tree keyed fork (sibling for path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SurmountSystems/bao-tree | |
| ref: 76-keyed-bao | |
| path: ../bao-tree | |
| - uses: extractions/setup-just@v2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Lint (wasm32, no pqc) | |
| run: just lint-wasm | |
| desktop: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout bao-tree keyed fork (sibling for path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SurmountSystems/bao-tree | |
| ref: 76-keyed-bao | |
| path: ../bao-tree | |
| - uses: extractions/setup-just@v2 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Test (native) | |
| run: just test | |
| env: | |
| RUST_BACKTRACE: 1 | |
| - name: Test smoke (slices, streaming, sharding, bao contract) | |
| run: just test-smoke | |
| - name: Build carbonado (release) | |
| run: just build | |
| - name: CLI integration tests (release) | |
| run: just test-cli | |
| - name: Examples compile | |
| run: just examples | |
| # Full `cargo test` on musl, aarch64, and wasm32 is intentionally check-only | |
| # (expensive / limited runtime); native desktop job runs the full test suite. | |
| test-matrix: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| matrix: | |
| target: | |
| - x86_64-unknown-linux-musl | |
| - aarch64-unknown-linux-gnu | |
| - wasm32-unknown-unknown | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout bao-tree keyed fork (sibling for path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SurmountSystems/bao-tree | |
| ref: 76-keyed-bao | |
| path: ../bao-tree | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check ${{ matrix.target }} (with pqc) | |
| run: cargo check --target ${{ matrix.target }} --all-features | |
| - name: Check ${{ matrix.target }} (no pqc) | |
| run: cargo check --target ${{ matrix.target }} --no-default-features | |
| # WASM browser testing is limited because libbitcoinpqc uses C code + cmake. | |
| # Full wasm-pack test can be run locally with: | |
| # RUSTFLAGS="--cfg getrandom_backend=\"wasm_js\"" wasm-pack test --headless --chrome | |
| web-check: | |
| runs-on: ubuntu-latest | |
| needs: lint-wasm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout bao-tree keyed fork (sibling for path dep) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SurmountSystems/bao-tree | |
| ref: 76-keyed-bao | |
| path: ../bao-tree | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Check wasm32 (no pqc) | |
| run: cargo check --target wasm32-unknown-unknown --no-default-features |