From df1219b41a7217f8274bf2be5c4705614da1145d Mon Sep 17 00:00:00 2001 From: Guillermo Perez Date: Mon, 9 Dec 2024 11:42:38 +0100 Subject: [PATCH] Fix disabling cache when in forks or dependatbot (#1996) * Check if sccache is setup by Prep build * different debugging message * bad conditional statement --- .github/actions/sccache-gcloud/action.yml | 1 - .github/workflows/sanity-checks.yml | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/actions/sccache-gcloud/action.yml b/.github/actions/sccache-gcloud/action.yml index ee611db560..2677767f74 100644 --- a/.github/actions/sccache-gcloud/action.yml +++ b/.github/actions/sccache-gcloud/action.yml @@ -31,7 +31,6 @@ runs: # echo "SCCACHE_GCS_KEY_PATH=${{ steps.gauth.credentials_file_path }}" >> $GITHUB_ENV - name: setup Rust sccache wrapper - if: ${{ inputs.cache == 'enabled' }} shell: bash run: | echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV diff --git a/.github/workflows/sanity-checks.yml b/.github/workflows/sanity-checks.yml index d102ab1f31..5c76cc3f1d 100644 --- a/.github/workflows/sanity-checks.yml +++ b/.github/workflows/sanity-checks.yml @@ -35,12 +35,19 @@ jobs: # Required for integration tests evm interaction - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 + + - name: Debug GitHub Environment Variables + shell: bash + run: | + echo "SCCACHE_GCS_BUCKET=${SCCACHE_GCS_BUCKET}" + echo "SCCACHE_GCS_RW_MODE=${SCCACHE_GCS_RW_MODE}" + echo "RUSTC_WRAPPER=${RUSTC_WRAPPER}" + echo "CARGO_INCREMENTAL=${CARGO_INCREMENTAL}" - name: Runing cargo ${{ matrix.target }} run: ./ci/run-check.sh env: TARGET: ${{ matrix.target }} - RUSTC_WRAPPER: "sccache" benchmark-check: if: ${{ !github.event.pull_request.draft }} @@ -63,10 +70,16 @@ jobs: GWIP: ${{ secrets.GWIP_SCCACHE }} GSA: ${{ secrets.GSA_SCCACHE }} + - name: Debug GitHub Environment Variables + shell: bash + run: | + echo "SCCACHE_GCS_BUCKET=${SCCACHE_GCS_BUCKET}" + echo "SCCACHE_GCS_RW_MODE=${SCCACHE_GCS_RW_MODE}" + echo "RUSTC_WRAPPER=${RUSTC_WRAPPER}" + echo "CARGO_INCREMENTAL=${CARGO_INCREMENTAL}" - name: Runing cargo ${{ matrix.target }} run: ./ci/run-check.sh env: TARGET: benchmark-check RUNTIME: ${{ matrix.runtime }} - RUSTC_WRAPPER: "sccache"