diff --git a/.github/workflows/java_integration_tests.yml b/.github/workflows/java_integration_tests.yml index aa8a93c9e4..363c424768 100644 --- a/.github/workflows/java_integration_tests.yml +++ b/.github/workflows/java_integration_tests.yml @@ -43,7 +43,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: 'temurin' - cache: 'maven' + cache: ${{ runner.environment == 'github-hosted' && 'maven' || '' }} - name: Build SeaweedFS run: | diff --git a/.github/workflows/java_release.yml b/.github/workflows/java_release.yml index 282c56245b..3cde5af868 100644 --- a/.github/workflows/java_release.yml +++ b/.github/workflows/java_release.yml @@ -77,7 +77,7 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: 'maven' + cache: ${{ runner.environment == 'github-hosted' && 'maven' || '' }} server-id: central server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_PASSWORD diff --git a/.github/workflows/java_unit_tests.yml b/.github/workflows/java_unit_tests.yml index c34f49b687..ed29f8dab3 100644 --- a/.github/workflows/java_unit_tests.yml +++ b/.github/workflows/java_unit_tests.yml @@ -34,7 +34,7 @@ jobs: with: java-version: ${{ matrix.java }} distribution: 'temurin' - cache: 'maven' + cache: ${{ runner.environment == 'github-hosted' && 'maven' || '' }} - name: Build and Install SeaweedFS Client working-directory: other/java/client diff --git a/.github/workflows/kafka-quicktest.yml b/.github/workflows/kafka-quicktest.yml index 165028635a..f48c5487df 100644 --- a/.github/workflows/kafka-quicktest.yml +++ b/.github/workflows/kafka-quicktest.yml @@ -43,7 +43,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum id: go diff --git a/.github/workflows/kafka-tests.yml b/.github/workflows/kafka-tests.yml index 8fb5cb5a36..4a59cb6724 100644 --- a/.github/workflows/kafka-tests.yml +++ b/.github/workflows/kafka-tests.yml @@ -151,7 +151,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum id: go @@ -330,7 +330,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum id: go @@ -492,7 +492,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum id: go @@ -650,7 +650,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | **/go.sum id: go diff --git a/.github/workflows/posix-compliance.yml b/.github/workflows/posix-compliance.yml index 973fc564bb..25fbfe5096 100644 --- a/.github/workflows/posix-compliance.yml +++ b/.github/workflows/posix-compliance.yml @@ -62,7 +62,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ${{ env.GO_VERSION }} - cache: true + cache: ${{ runner.environment == 'github-hosted' }} cache-dependency-path: | go.sum test/fuse_integration/go.sum @@ -568,7 +568,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ${{ env.GO_VERSION }} - cache: true + cache: ${{ runner.environment == 'github-hosted' }} - name: Install macFUSE run: | @@ -621,6 +621,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ${{ env.GO_VERSION }} + cache: ${{ runner.environment == 'github-hosted' }} - name: Install security analysis tools run: | @@ -677,6 +678,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ${{ env.GO_VERSION }} + cache: ${{ runner.environment == 'github-hosted' }} - name: Install dependencies run: | @@ -729,6 +731,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ${{ env.GO_VERSION }} + cache: ${{ runner.environment == 'github-hosted' }} - name: Install dependencies run: | diff --git a/.github/workflows/rust-volume-server-tests.yml b/.github/workflows/rust-volume-server-tests.yml index 84b80de66d..e6223aef29 100644 --- a/.github/workflows/rust-volume-server-tests.yml +++ b/.github/workflows/rust-volume-server-tests.yml @@ -65,6 +65,7 @@ jobs: uses: actions/setup-go@v7 with: go-version-file: 'go.mod' + cache: ${{ runner.environment == 'github-hosted' }} - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/s3-parquet-tests.yml b/.github/workflows/s3-parquet-tests.yml index 20403a533d..d0a99b04be 100644 --- a/.github/workflows/s3-parquet-tests.yml +++ b/.github/workflows/s3-parquet-tests.yml @@ -46,13 +46,13 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v7 with: python-version: ${{ matrix.python-version }} - cache: 'pip' + cache: ${{ runner.environment == 'github-hosted' && 'pip' || '' }} cache-dependency-path: 'test/s3/parquet/requirements.txt' - name: Install system dependencies @@ -154,7 +154,7 @@ jobs: uses: actions/setup-go@v7 with: go-version: ^1.26 - cache: true + cache: ${{ runner.environment == 'github-hosted' }} - name: Run Go unit tests run: | diff --git a/.github/workflows/s3-snowflake-tests.yml b/.github/workflows/s3-snowflake-tests.yml index 3993a112a0..94163e36cd 100644 --- a/.github/workflows/s3-snowflake-tests.yml +++ b/.github/workflows/s3-snowflake-tests.yml @@ -68,7 +68,7 @@ jobs: with: java-version: '17' distribution: 'temurin' - cache: 'maven' + cache: ${{ runner.environment == 'github-hosted' && 'maven' || '' }} - name: Install SeaweedFS run: | diff --git a/.github/workflows/spark-integration-tests.yml b/.github/workflows/spark-integration-tests.yml index ee211a1fb4..8aec50f8bd 100644 --- a/.github/workflows/spark-integration-tests.yml +++ b/.github/workflows/spark-integration-tests.yml @@ -42,7 +42,7 @@ jobs: with: java-version: '11' distribution: 'temurin' - cache: maven + cache: ${{ runner.environment == 'github-hosted' && 'maven' || '' }} - name: Set up Go uses: actions/setup-go@v7 diff --git a/.github/workflows/star_history.yml b/.github/workflows/star_history.yml index 2c87130703..016dd86c63 100644 --- a/.github/workflows/star_history.yml +++ b/.github/workflows/star_history.yml @@ -32,7 +32,7 @@ jobs: uses: actions/setup-python@v7 with: python-version: "3.x" - cache: pip + cache: ${{ runner.environment == 'github-hosted' && 'pip' || '' }} cache-dependency-path: .github/scripts/star_history.py - name: Install matplotlib diff --git a/.github/workflows/volume-server-integration-tests.yml b/.github/workflows/volume-server-integration-tests.yml index fcaf1ce976..b1a4569111 100644 --- a/.github/workflows/volume-server-integration-tests.yml +++ b/.github/workflows/volume-server-integration-tests.yml @@ -85,6 +85,7 @@ jobs: uses: actions/setup-go@v7 with: go-version-file: 'go.mod' + cache: ${{ runner.environment == 'github-hosted' }} - name: Download binary uses: actions/download-artifact@v7