From bf1df1d2ba47e6d9fded902e6d0951e6ac775f40 Mon Sep 17 00:00:00 2001 From: IGN-Styly Date: Sun, 3 Aug 2025 17:32:24 +0100 Subject: [PATCH 1/5] cache build ci --- .github/workflows/rust.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 981efff..2d1713e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -30,9 +30,8 @@ jobs: env: repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: Swatinem/rust-cache@v2 - - - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - name: Cache Cargo dependencies + uses: actions/cache@v4 - name: Build run: cargo build --verbose From b4a16e1e1e60340f958586f7fc81b9ece5446041 Mon Sep 17 00:00:00 2001 From: IGN-Styly Date: Sun, 3 Aug 2025 17:36:25 +0100 Subject: [PATCH 2/5] cache build ci fix --- .github/workflows/rust.yml | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2d1713e..9b13104 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,35 +6,20 @@ on: pull_request: branches: ["main"] -permissions: - contents: read - -env: - CARGO_TERM_COLOR: always - jobs: - build: - runs-on: blacksmith-4vcpu-ubuntu-2404 + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest strategy: matrix: toolchain: - stable - beta - nightly - steps: - uses: actions/checkout@v4 - - - name: Install Protoc - uses: arduino/setup-protoc@v3 - env: - repo-token: ${{ secrets.GITHUB_TOKEN }} - + - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - name: Cache Cargo dependencies uses: actions/cache@v4 - - - name: Build - run: cargo build --verbose - - - name: Run tests - run: cargo test --verbose + - run: cargo build --verbose + - run: cargo test --verbose From 2dc33d0a952fb3dd420ee11fe4af6192a6e174b6 Mon Sep 17 00:00:00 2001 From: IGN-Styly Date: Sun, 3 Aug 2025 17:38:34 +0100 Subject: [PATCH 3/5] cache build ci fix --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9b13104..ed46391 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -21,5 +21,8 @@ jobs: - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - name: Cache Cargo dependencies uses: actions/cache@v4 + with: + path: ~/.cargo + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - run: cargo build --verbose - run: cargo test --verbose From d67da9c7d5b6726da277658f95d3979e6d3bb4b1 Mon Sep 17 00:00:00 2001 From: IGN-Styly Date: Sun, 3 Aug 2025 17:41:10 +0100 Subject: [PATCH 4/5] cache build ci fix --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ed46391..d86cd8b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -19,6 +19,8 @@ jobs: steps: - uses: actions/checkout@v4 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} + - name: Install Protoc + uses: arduino/setup-protoc@v3 - name: Cache Cargo dependencies uses: actions/cache@v4 with: From 731dc2b25bbda9a9699a304a13cd61d3e68e3726 Mon Sep 17 00:00:00 2001 From: IGN-Styly Date: Sun, 3 Aug 2025 17:51:39 +0100 Subject: [PATCH 5/5] cache build ci fix --- .github/workflows/rust.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d86cd8b..94368fe 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -24,7 +24,11 @@ jobs: - name: Cache Cargo dependencies uses: actions/cache@v4 with: - path: ~/.cargo - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + path: | + ~/.cargo + target + key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo-${{ matrix.toolchain }}- - run: cargo build --verbose - run: cargo test --verbose