Skip to content

Commit 1293e9d

Browse files
authored
Update sonarscanner (#3019)
* Update sonarscanner Update. Fix deprecation warning. * ..
1 parent 479c92e commit 1293e9d

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/actions/setup-sonar-tools/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ description: Download and install sonar-scanner and build-wrapper
33
runs:
44
using: "composite"
55
steps:
6-
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
6+
- run: echo "SONAR_SCANNER_VERSION=7.3.0.5189" >> $GITHUB_ENV
77
shell: bash
8-
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
8+
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux-x64" >> $GITHUB_ENV
99
shell: bash
1010
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
1111
shell: bash
@@ -19,7 +19,7 @@ runs:
1919
sudo apt-get update \
2020
&& sudo apt-get install nodejs curl unzip \
2121
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
22-
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
22+
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux-x64.zip \
2323
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \
2424
&& curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \
2525
https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip \

.github/workflows/test_python_cplusplus.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ jobs:
5151
run: scripts/run-cpp-tests.sh
5252

5353
- name: Install python package
54+
env:
55+
CMAKE_EXPORT_COMPILE_COMMANDS: "ON"
5456
run: scripts/installAmiciSource.sh
5557

5658
- name: Check OpenMP support
@@ -117,7 +119,7 @@ jobs:
117119
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
118120
run: |
119121
sonar-scanner \
120-
-Dsonar.cfamily.build-wrapper-output=bw-output \
122+
-Dsonar.cfamily.compile-commands=bw-output/compile_commands.json \
121123
-Dsonar.projectVersion="$(git describe --abbrev=4 --dirty=-dirty --always --tags | tr -d '\n')"
122124
123125
ubuntu-python-tests:
@@ -150,6 +152,8 @@ jobs:
150152
uses: ./.github/actions/setup-amici-cpp
151153

152154
- name: Install python package
155+
env:
156+
CMAKE_EXPORT_COMPILE_COMMANDS: "ON"
153157
run: scripts/installAmiciSource.sh
154158

155159
- name: Python tests
@@ -199,7 +203,7 @@ jobs:
199203
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
200204
run: |
201205
sonar-scanner \
202-
-Dsonar.cfamily.build-wrapper-output=bw-output \
206+
-Dsonar.cfamily.compile-commands=bw-output/compile_commands.json \
203207
-Dsonar.projectVersion="$(git describe --abbrev=4 --dirty=-dirty --always --tags | tr -d '\n')"
204208
205209

0 commit comments

Comments
 (0)