perf: improve linking implementation (#324) #1234
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 | |
| permissions: {} | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: full | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: test ${{ matrix.rust }} ${{ matrix.flags }} (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| rust: ["stable", "1.88"] | |
| flags: ["", "--all-features"] | |
| exclude: | |
| # Skip because some features have higher MSRV. | |
| - rust: "1.88" # MSRV | |
| flags: "--all-features" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Install nextest | |
| uses: taiki-e/install-action@e5f8d33e7166e0491b2ab4ff0567cc6cd6772737 # v2 | |
| with: | |
| tool: nextest | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2 | |
| with: | |
| cache-on-failure: true | |
| - name: test | |
| shell: bash | |
| run: cargo nextest run ${{ matrix.flags }} --retries 2 | |
| doctest: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: stable | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2 | |
| with: | |
| cache-on-failure: true | |
| - run: cargo test --workspace --doc --all-features | |
| feature-checks: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: stable | |
| - uses: taiki-e/install-action@e5f8d33e7166e0491b2ab4ff0567cc6cd6772737 # master | |
| with: | |
| tool: cargo-hack | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2 | |
| with: | |
| cache-on-failure: true | |
| - name: cargo hack | |
| run: cargo hack check --feature-powerset --depth 2 | |
| clippy: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: nightly | |
| components: clippy | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2 | |
| with: | |
| cache-on-failure: true | |
| - run: cargo clippy --workspace --all-targets --all-features | |
| env: | |
| RUSTFLAGS: -Dwarnings | |
| docs: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: nightly | |
| - uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2 | |
| with: | |
| cache-on-failure: true | |
| - run: cargo doc --workspace --all-features --no-deps --document-private-items | |
| env: | |
| RUSTDOCFLAGS: "--cfg docsrs -D warnings" | |
| fmt: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master | |
| with: | |
| toolchain: nightly | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| deny: | |
| uses: ithacaxyz/ci/.github/workflows/deny.yml@9c8d0dc20e7ad02455d3fdab2378a05f29907630 # main | |
| permissions: | |
| contents: read | |
| ci-success: | |
| runs-on: ubuntu-latest | |
| if: always() | |
| permissions: {} | |
| needs: | |
| - test | |
| - doctest | |
| - feature-checks | |
| - clippy | |
| - docs | |
| - fmt | |
| - deny | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |