Skip to content

Commit

Permalink
Update sonarcloud.yml (#865)
Browse files Browse the repository at this point in the history
* Update sonarcloud.yml

* Update sonarcloud.yml

* Fix path.
  • Loading branch information
jhale authored Oct 11, 2024
1 parent 388f55c commit 9dfac51
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ jobs:
if: (github.event.pull_request.head.repo.full_name == github.repository) || github.ref_name == 'main'
env:
SONAR_SCANNER_VERSION:
5.0.1.3006 # Find the latest version at:
6.1.0.4477 # Find the latest version at:
# https://github.com/SonarSource/sonar-scanner-cli/tags
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
PETSC_ARCH: linux-gnu-real-32

steps:
- uses: actions/checkout@v4
Expand All @@ -31,21 +30,21 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 21
java-version: 17
- name: Cache SonarCloud packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Download and set up sonar-scanner
env:
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux.zip
SONAR_SCANNER_DOWNLOAD_URL: https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${{ env.SONAR_SCANNER_VERSION }}-linux-x64.zip
run: |
mkdir -p $HOME/.sonar
wget -O $HOME/.sonar/sonar-scanner.zip ${{ env.SONAR_SCANNER_DOWNLOAD_URL }}
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux/bin" >> $GITHUB_PATH
echo "$HOME/.sonar/sonar-scanner-${{ env.SONAR_SCANNER_VERSION }}-linux-x64/bin" >> $GITHUB_PATH
- name: Download and set up build-wrapper
env:
BUILD_WRAPPER_DOWNLOAD_URL: ${{ env.SONAR_SERVER_URL }}/static/cpp/build-wrapper-linux-x86.zip
Expand Down

0 comments on commit 9dfac51

Please sign in to comment.