From f372ba907fae2a5af2e5237078ef7c4d2dc4d3c6 Mon Sep 17 00:00:00 2001 From: ananas Date: Wed, 15 Oct 2025 17:21:26 +0100 Subject: [PATCH 1/2] chore: unify rust caches --- .github/actions/setup-and-build/action.yml | 5 +---- .github/workflows/cli-v1.yml | 1 - .github/workflows/cli-v2.yml | 1 - .github/workflows/forester-tests.yml | 1 - .github/workflows/js-v2.yml | 1 - .github/workflows/js.yml | 1 - .github/workflows/rust.yml | 1 - .github/workflows/sdk-tests.yml | 1 - 8 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/actions/setup-and-build/action.yml b/.github/actions/setup-and-build/action.yml index e90cac95d2..7ced0905c5 100644 --- a/.github/actions/setup-and-build/action.yml +++ b/.github/actions/setup-and-build/action.yml @@ -6,10 +6,6 @@ inputs: description: 'Comma-separated list of components to skip (e.g., "redis,go"). If not specified, all components are installed.' required: false default: "" - cache-suffix: - description: 'Optional suffix for cache keys to enable separate caches per workflow (e.g., "system-programs", "sdk-tests", "rust")' - required: false - default: "" runs: using: "composite" @@ -49,6 +45,7 @@ runs: with: toolchain: ${{ steps.versions.outputs.rust }} components: rustfmt, clippy + shared-key: shared cache-workspaces: | . -> target cli -> cli/target diff --git a/.github/workflows/cli-v1.yml b/.github/workflows/cli-v1.yml index 10c7806628..998851b5d2 100644 --- a/.github/workflows/cli-v1.yml +++ b/.github/workflows/cli-v1.yml @@ -47,7 +47,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis,disk-cleanup" - cache-suffix: "js" - name: Build CLI run: | diff --git a/.github/workflows/cli-v2.yml b/.github/workflows/cli-v2.yml index 41e1855688..d81884b42c 100644 --- a/.github/workflows/cli-v2.yml +++ b/.github/workflows/cli-v2.yml @@ -47,7 +47,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis,disk-cleanup" - cache-suffix: "js" - name: Build stateless.js with V2 run: | diff --git a/.github/workflows/forester-tests.yml b/.github/workflows/forester-tests.yml index f38c02b042..0a5bbe7a5f 100644 --- a/.github/workflows/forester-tests.yml +++ b/.github/workflows/forester-tests.yml @@ -66,7 +66,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis" - cache-suffix: "rust" - name: Check available disk space shell: bash diff --git a/.github/workflows/js-v2.yml b/.github/workflows/js-v2.yml index c89ffd79b2..8c228c6030 100644 --- a/.github/workflows/js-v2.yml +++ b/.github/workflows/js-v2.yml @@ -47,7 +47,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis,disk-cleanup" - cache-suffix: "js" - name: Build stateless.js with V2 run: | diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index a353b4e30e..b2a6eba830 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -47,7 +47,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis,disk-cleanup" - cache-suffix: "js" - name: Build stateless.js with V1 run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 146808afc8..88249a2cee 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -94,7 +94,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis,disk-cleanup" - cache-suffix: "rust" - name: Build CLI run: | diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 787953dc58..2f2ea1ec4b 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -73,7 +73,6 @@ jobs: uses: ./.github/actions/setup-and-build with: skip-components: "redis,disk-cleanup" - cache-suffix: "sdk-tests" - name: Build CLI run: | From e0e98f631d10b98ad7b17ea3e910e1dc0b04e4df Mon Sep 17 00:00:00 2001 From: ananas Date: Wed, 15 Oct 2025 17:48:54 +0100 Subject: [PATCH 2/2] fix go warning --- .github/actions/setup-and-build/action.yml | 11 +++++++---- .github/workflows/cli-v1.yml | 3 ++- .github/workflows/cli-v2.yml | 3 ++- .github/workflows/forester-tests.yml | 3 ++- .github/workflows/js-v2.yml | 3 ++- .github/workflows/js.yml | 3 ++- .github/workflows/lint.yml | 3 ++- .github/workflows/rust.yml | 3 ++- .github/workflows/sdk-tests.yml | 3 ++- 9 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/actions/setup-and-build/action.yml b/.github/actions/setup-and-build/action.yml index 7ced0905c5..15a62eef3e 100644 --- a/.github/actions/setup-and-build/action.yml +++ b/.github/actions/setup-and-build/action.yml @@ -6,6 +6,10 @@ inputs: description: 'Comma-separated list of components to skip (e.g., "redis,go"). If not specified, all components are installed.' required: false default: "" + cache-key: + description: 'Cache key to differentiate caches for different workflow types (e.g., "lint", "js", "rust")' + required: false + default: "shared" runs: using: "composite" @@ -45,12 +49,11 @@ runs: with: toolchain: ${{ steps.versions.outputs.rust }} components: rustfmt, clippy - shared-key: shared - cache-workspaces: | - . -> target - cli -> cli/target + cache-key: ${{ inputs.cache-key }} + cache-workspaces: . - name: Setup Go + if: "!contains(inputs.skip-components, 'go')" uses: actions/setup-go@v5 with: go-version: ${{ steps.versions.outputs.go }} diff --git a/.github/workflows/cli-v1.yml b/.github/workflows/cli-v1.yml index 998851b5d2..8290ee90f2 100644 --- a/.github/workflows/cli-v1.yml +++ b/.github/workflows/cli-v1.yml @@ -46,7 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" + skip-components: "redis,disk-cleanup,go" + cache-key: "js" - name: Build CLI run: | diff --git a/.github/workflows/cli-v2.yml b/.github/workflows/cli-v2.yml index d81884b42c..81dd22b13f 100644 --- a/.github/workflows/cli-v2.yml +++ b/.github/workflows/cli-v2.yml @@ -46,7 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" + skip-components: "redis,disk-cleanup,go" + cache-key: "js" - name: Build stateless.js with V2 run: | diff --git a/.github/workflows/forester-tests.yml b/.github/workflows/forester-tests.yml index 0a5bbe7a5f..334f4c33d5 100644 --- a/.github/workflows/forester-tests.yml +++ b/.github/workflows/forester-tests.yml @@ -65,7 +65,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis" + skip-components: "redis,go" + cache-key: "rust" - name: Check available disk space shell: bash diff --git a/.github/workflows/js-v2.yml b/.github/workflows/js-v2.yml index 8c228c6030..f10e2e55d2 100644 --- a/.github/workflows/js-v2.yml +++ b/.github/workflows/js-v2.yml @@ -46,7 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" + skip-components: "redis,disk-cleanup,go" + cache-key: "js" - name: Build stateless.js with V2 run: | diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index b2a6eba830..563d74b669 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -46,7 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" + skip-components: "redis,disk-cleanup,go" + cache-key: "js" - name: Build stateless.js with V1 run: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 88f3d325b1..7e7c1428c4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,7 +29,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "proving-keys,redis,disk-cleanup" + skip-components: "proving-keys,redis,disk-cleanup,go" + cache-key: "lint" - name: Run linters run: | diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 88249a2cee..34d871c25e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -93,7 +93,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" + skip-components: "redis,disk-cleanup,go" + cache-key: "rust" - name: Build CLI run: | diff --git a/.github/workflows/sdk-tests.yml b/.github/workflows/sdk-tests.yml index 2f2ea1ec4b..fe0ad66f6b 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -72,7 +72,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" + skip-components: "redis,disk-cleanup,go" + cache-key: "rust" - name: Build CLI run: |