From f20a17638fe544043e312734866f10510124ad44 Mon Sep 17 00:00:00 2001 From: Yadong Ding Date: Sat, 6 May 2023 10:58:42 +0800 Subject: [PATCH 1/2] action: reuse rust cache by shared-key Signed-off-by: Yadong Ding --- .github/workflows/benchmark.yml | 2 ++ .github/workflows/convert.yml | 1 + .github/workflows/smoke.yml | 3 +++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index f4311331d46..24af26014ef 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -7,6 +7,7 @@ on: workflow_dispatch: env: + CARGO_TERM_COLOR: always IMAGE: wordpress TAG: 6.1.1 @@ -48,6 +49,7 @@ jobs: uses: Swatinem/rust-cache@v2.2.0 with: cache-on-failure: true + shared-key: nydus-build - name: Build Nydus run: | rustup component add rustfmt clippy diff --git a/.github/workflows/convert.yml b/.github/workflows/convert.yml index 839675bfd08..d7d8036f4d0 100644 --- a/.github/workflows/convert.yml +++ b/.github/workflows/convert.yml @@ -51,6 +51,7 @@ jobs: uses: Swatinem/rust-cache@v2.2.0 with: cache-on-failure: true + shared-key: nydus-build - name: Build Nydus run: | rustup component add rustfmt clippy diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 3da28b3fdee..d9a20031e00 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -88,6 +88,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true + shared-key: nydus-build - name: Build Nydus run: | rustup component add rustfmt clippy @@ -112,6 +113,7 @@ jobs: uses: Swatinem/rust-cache@v2.2.0 with: cache-on-failure: true + shared-key: nydus-build - name: Build Nydus run: | rustup component add rustfmt clippy @@ -603,6 +605,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-on-failure: true + shared-key: nydus-build - name: Install cargo nextest uses: taiki-e/install-action@nextest - name: Unit Test From 900d705acaf9e44ab1bce64e67e820ee6ea7e718 Mon Sep 17 00:00:00 2001 From: Yadong Ding Date: Sat, 6 May 2023 10:59:50 +0800 Subject: [PATCH 2/2] action: use the same version rust-cache@v2.2.0 Signed-off-by: Yadong Ding --- .github/workflows/integration.yml | 2 +- .github/workflows/release.yml | 4 ++-- .github/workflows/smoke.yml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index ca74f3546e7..87d071f5a9d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -43,7 +43,7 @@ jobs: with: ref: ${{ matrix.branch }} - name: Cache cargo - uses: Swatinem/rust-cache@v1 + uses: Swatinem/rust-cache@v2.2.0 with: target-dir: | ./target diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 147441f4b30..60f5476e837 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Cache cargo - uses: Swatinem/rust-cache@v1 + uses: Swatinem/rust-cache@v2.2.0 with: target-dir: | ./target @@ -57,7 +57,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Cache cargo - uses: Swatinem/rust-cache@v1 + uses: Swatinem/rust-cache@v2.2.0 with: target-dir: | ./target diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index d9a20031e00..aa6362090e6 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -85,7 +85,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@v2.2.0 with: cache-on-failure: true shared-key: nydus-build @@ -602,7 +602,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@v2.2.0 with: cache-on-failure: true shared-key: nydus-build @@ -619,7 +619,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Rust Cache - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@v2.2.0 with: cache-on-failure: true - name: Install cargo-llvm-cov