summaryrefslogtreecommitdiff
path: root/.github/workflows/sonar-cloud-static-analysis.yml
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2021-09-02 23:55:12 -0700
committerAndreas Kling <kling@serenityos.org>2021-09-03 11:46:15 +0200
commit2b13c9942d4cd1e1e2dc99b0d926566baeb6138d (patch)
tree5c1e598e65ad3e10a38b761325145e5cf17945f0 /.github/workflows/sonar-cloud-static-analysis.yml
parenta746d612acf4377d04c9b55af12dde6e07aedaeb (diff)
downloadserenity-2b13c9942d4cd1e1e2dc99b0d926566baeb6138d.zip
Meta: Fix toolchain caching for Sonar Cloud workflow
The matrix variables were left over from copy/pasting the contents of the normal CI workflow. We also should always skip saving the cache, as the normal CI pipeliens will refresh the toolchain and we should just be reading the cache.
Diffstat (limited to '.github/workflows/sonar-cloud-static-analysis.yml')
-rw-r--r--.github/workflows/sonar-cloud-static-analysis.yml7
1 files changed, 4 insertions, 3 deletions
diff --git a/.github/workflows/sonar-cloud-static-analysis.yml b/.github/workflows/sonar-cloud-static-analysis.yml
index 15c8f0505d..265563a0f4 100644
--- a/.github/workflows/sonar-cloud-static-analysis.yml
+++ b/.github/workflows/sonar-cloud-static-analysis.yml
@@ -12,6 +12,7 @@ jobs:
# Latest scanner version is tracked on: https://sonarcloud.io/documentation/analysis/scan/sonarscanner/
SONAR_SCANNER_VERSION: 4.6.1.2450
SONAR_SERVER_URL: "https://sonarcloud.io"
+ SONAR_ANALYSIS_ARCH: i686
steps:
- uses: actions/checkout@v2
with:
@@ -82,17 +83,17 @@ jobs:
uses: actions/cache@03e00da99d75a2204924908e1cca7902cafce66b
env:
# This job should always read the cache, never populate it.
- CACHE_SKIP_SAVE: false
+ CACHE_SKIP_SAVE: true
with:
path: ${{ github.workspace }}/Toolchain/Cache/
# This assumes that *ALL* LibC and LibPthread headers have an impact on the Toolchain.
# This is wrong, and causes more Toolchain rebuilds than necessary.
# However, we want to avoid false cache hits at all costs.
- key: ${{ runner.os }}-toolchain-i686-${{ steps.stamps.outputs.libc_headers }}
+ key: ${{ runner.os }}-toolchain-${{ env.SONAR_ANALYSIS_ARCH }}-${{ steps.stamps.outputs.libc_headers }}
- name: Restore or regenerate Toolchain
- run: TRY_USE_LOCAL_TOOLCHAIN=y ARCH="${{ matrix.arch }}" ${{ github.workspace }}/Toolchain/BuildIt.sh
+ run: TRY_USE_LOCAL_TOOLCHAIN=y ARCH="${{ env.SONAR_ANALYSIS_ARCH }}" ${{ github.workspace }}/Toolchain/BuildIt.sh
- name: Create build directory
run: |