From 0290098cc992df1562a46ca30847a0c86ef6b537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=93=F0=9D=90=9E=F0=9D=90=9A=F0=9D=90=A4?= =?UTF-8?q?=F0=9D=90=A8=F0=9D=90=B0=F0=9D=90=9A?= <27560638+Teakowa@users.noreply.github.com> Date: Mon, 17 Aug 2026 18:55:03 +0800 Subject: [PATCH 1/2] perf(ci): reuse conformance binaries across jobs --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f58dbe4..a3e9660 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,17 +22,37 @@ jobs: - name: Format run: cargo fmt --all --check - name: Clippy - run: cargo clippy --all-targets -- -D warnings + run: cargo clippy --locked --all-targets -- -D warnings - name: Tests - run: cargo test --workspace + run: cargo test --locked --workspace + - name: Build conformance binaries + run: cargo build --locked --bin lpp-mock-provider --bin lpp-conformance-runner + - name: Stage conformance binaries + run: | + mkdir -p target/conformance-artifact + cp target/debug/lpp-mock-provider target/conformance-artifact/ + cp target/debug/lpp-conformance-runner target/conformance-artifact/ + - name: Upload conformance binaries + uses: actions/upload-artifact@v7 + with: + name: lpp-conformance-binaries + path: target/conformance-artifact/ + if-no-files-found: error + retention-days: 1 conformance: + needs: rust runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Build runner and mock provider - run: cargo build --release --bin lpp-mock-provider --bin lpp-conformance-runner + - name: Download conformance binaries + uses: actions/download-artifact@v7 + with: + name: lpp-conformance-binaries + path: target/conformance-bin + - name: Prepare conformance binaries + run: chmod +x target/conformance-bin/lpp-mock-provider target/conformance-bin/lpp-conformance-runner - name: Validate fixture structure - run: ./target/release/lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1 + run: ./target/conformance-bin/lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1 - name: Run conformance against the mock provider - run: ./target/release/lpp-conformance-runner --provider ./target/release/lpp-mock-provider --fixtures conformance/fixtures/v1 + run: ./target/conformance-bin/lpp-conformance-runner --provider ./target/conformance-bin/lpp-mock-provider --fixtures conformance/fixtures/v1 From 3e749d59d22e19f4467e560c30dedd233826b945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=93=F0=9D=90=9E=F0=9D=90=9A=F0=9D=90=A4?= =?UTF-8?q?=F0=9D=90=A8=F0=9D=90=B0=F0=9D=90=9A?= <27560638+Teakowa@users.noreply.github.com> Date: Mon, 17 Aug 2026 18:58:49 +0800 Subject: [PATCH 2/2] perf(ci): share one bounded Rust cache --- .github/workflows/ci.yml | 43 +++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3e9660..404110f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,40 +19,37 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: 1.85.0 + components: clippy, rustfmt + rustflags: "" + cache-shared-key: linux-ci + cache-save-if: ${{ github.ref == 'refs/heads/main' }} + cache-on-failure: false - name: Format run: cargo fmt --all --check - name: Clippy run: cargo clippy --locked --all-targets -- -D warnings - name: Tests run: cargo test --locked --workspace - - name: Build conformance binaries - run: cargo build --locked --bin lpp-mock-provider --bin lpp-conformance-runner - - name: Stage conformance binaries - run: | - mkdir -p target/conformance-artifact - cp target/debug/lpp-mock-provider target/conformance-artifact/ - cp target/debug/lpp-conformance-runner target/conformance-artifact/ - - name: Upload conformance binaries - uses: actions/upload-artifact@v7 - with: - name: lpp-conformance-binaries - path: target/conformance-artifact/ - if-no-files-found: error - retention-days: 1 conformance: - needs: rust runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - - name: Download conformance binaries - uses: actions/download-artifact@v7 + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 with: - name: lpp-conformance-binaries - path: target/conformance-bin - - name: Prepare conformance binaries - run: chmod +x target/conformance-bin/lpp-mock-provider target/conformance-bin/lpp-conformance-runner + toolchain: 1.85.0 + rustflags: "" + cache-shared-key: linux-ci + cache-save-if: false + cache-on-failure: false + - name: Build runner and mock provider + run: cargo build --locked --bin lpp-mock-provider --bin lpp-conformance-runner - name: Validate fixture structure - run: ./target/conformance-bin/lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1 + run: ./target/debug/lpp-conformance-runner --validate-only --fixtures conformance/fixtures/v1 - name: Run conformance against the mock provider - run: ./target/conformance-bin/lpp-conformance-runner --provider ./target/conformance-bin/lpp-mock-provider --fixtures conformance/fixtures/v1 + run: ./target/debug/lpp-conformance-runner --provider ./target/debug/lpp-mock-provider --fixtures conformance/fixtures/v1