diff --git a/.github/actions/setup-and-build/action.yml b/.github/actions/setup-and-build/action.yml index e90cac95d2..15a62eef3e 100644 --- a/.github/actions/setup-and-build/action.yml +++ b/.github/actions/setup-and-build/action.yml @@ -6,10 +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-suffix: - description: 'Optional suffix for cache keys to enable separate caches per workflow (e.g., "system-programs", "sdk-tests", "rust")' + cache-key: + description: 'Cache key to differentiate caches for different workflow types (e.g., "lint", "js", "rust")' required: false - default: "" + default: "shared" runs: using: "composite" @@ -49,11 +49,11 @@ runs: with: toolchain: ${{ steps.versions.outputs.rust }} components: rustfmt, clippy - 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 10c7806628..8290ee90f2 100644 --- a/.github/workflows/cli-v1.yml +++ b/.github/workflows/cli-v1.yml @@ -46,8 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" - cache-suffix: "js" + 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 41e1855688..81dd22b13f 100644 --- a/.github/workflows/cli-v2.yml +++ b/.github/workflows/cli-v2.yml @@ -46,8 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" - cache-suffix: "js" + 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 f38c02b042..334f4c33d5 100644 --- a/.github/workflows/forester-tests.yml +++ b/.github/workflows/forester-tests.yml @@ -65,8 +65,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis" - cache-suffix: "rust" + 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 c89ffd79b2..f10e2e55d2 100644 --- a/.github/workflows/js-v2.yml +++ b/.github/workflows/js-v2.yml @@ -46,8 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" - cache-suffix: "js" + 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 a353b4e30e..563d74b669 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -46,8 +46,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" - cache-suffix: "js" + 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 146808afc8..34d871c25e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -93,8 +93,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" - cache-suffix: "rust" + 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 787953dc58..fe0ad66f6b 100644 --- a/.github/workflows/sdk-tests.yml +++ b/.github/workflows/sdk-tests.yml @@ -72,8 +72,8 @@ jobs: - name: Setup and build uses: ./.github/actions/setup-and-build with: - skip-components: "redis,disk-cleanup" - cache-suffix: "sdk-tests" + skip-components: "redis,disk-cleanup,go" + cache-key: "rust" - name: Build CLI run: |