fix(codegen): prefer light token exports (#312) #554
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: -Dwarnings | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| preflight: | |
| name: Preflight (fmt, clippy, check, agents-md) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: check-agents-md | |
| run: bash scripts/check-agents-md.sh | |
| - name: Validate Chrome sandbox CI wiring | |
| run: bash tests/ci-chrome-sandbox-validate.sh | |
| - name: Validate canonical docs URL wiring | |
| run: bash tests/ci-canonical-docs-url-validate.sh | |
| - name: Validate release-readiness local kits wiring | |
| run: bash tests/release-readiness-local-kits-validate.sh | |
| - name: Validate release-readiness matrix wiring | |
| run: bash tests/release-readiness-matrix-validate.sh | |
| - name: Validate install-smoke gate contract | |
| run: bash tests/install-smoke-validate.sh | |
| - name: Validate release security contract | |
| run: bash tests/release-security-validate.sh | |
| - name: cargo fmt --check | |
| run: cargo fmt --all -- --check | |
| - name: cargo clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: cargo check | |
| run: cargo check --workspace --all-targets --all-features | |
| - name: cargo xtask pre-release | |
| run: cargo xtask pre-release | |
| test: | |
| name: Test (${{ matrix.os }}) | |
| needs: preflight | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@nextest | |
| - name: cargo nextest | |
| run: cargo nextest run --workspace --profile ci | |
| - name: Upload junit | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: junit-${{ matrix.os }} | |
| path: target/nextest/ci/junit.xml | |
| if-no-files-found: ignore | |
| msrv: | |
| name: MSRV (1.95) | |
| needs: preflight | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| # Read MSRV from rust-toolchain.toml so dependabot cannot bump the | |
| # pinned Rust version by treating `@X.Y.Z` as an action tag. | |
| - uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: "1.95.0" | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: cargo check | |
| run: cargo check --workspace --all-features | |
| determinism: | |
| name: Determinism | |
| needs: preflight | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: extractions/setup-just@v4 | |
| - name: just determinism-check | |
| run: just determinism-check | |
| coverage: | |
| name: Coverage | |
| needs: test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: llvm-tools-preview | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: cargo llvm-cov | |
| run: cargo llvm-cov --workspace --all-features --lcov --output-path coverage.lcov | |
| - uses: codecov/codecov-action@v6 | |
| with: | |
| files: coverage.lcov | |
| fail_ci_if_error: false | |
| size-guard: | |
| name: Size guard (<25 MiB) | |
| needs: preflight | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Build release binary | |
| run: cargo build --release -p plumb-cli | |
| - name: Strip and measure | |
| run: | | |
| strip target/release/plumb || true | |
| bytes=$(wc -c < target/release/plumb | tr -d ' ') | |
| limit=26214400 | |
| echo "Binary size: $bytes bytes (limit $limit)." | |
| if [ "$bytes" -ge "$limit" ]; then | |
| echo "::error::Binary size $bytes exceeds 25 MiB ($limit)." | |
| exit 1 | |
| fi | |
| deny: | |
| name: cargo-deny | |
| needs: preflight | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: EmbarkStudios/cargo-deny-action@v2 | |
| docs: | |
| name: Docs (build, no deploy) | |
| needs: preflight | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: peaceiris/actions-mdbook@v2 | |
| with: | |
| mdbook-version: "latest" | |
| - name: mdbook build | |
| run: mdbook build | |
| - name: cargo doc | |
| run: cargo doc --workspace --no-deps | |
| env: | |
| RUSTDOCFLAGS: -Dwarnings | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: book | |
| path: book/ | |
| if-no-files-found: ignore |