Skip to content

Commit c920e36

Browse files
committed
Update SonarCloud job to use github action to install sonar-scanner and
build-wrapper. Signed-off-by: Christina Tempelaar-Lietz <[email protected]>
1 parent a00bac5 commit c920e36

File tree

2 files changed

+61
-522
lines changed

2 files changed

+61
-522
lines changed

.github/workflows/analysis_workflow.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
name: Analysis
88

99
on:
10-
schedule:
10+
# schedule:
1111
# Weekly Sunday build
12-
- cron: "0 0 * * 0"
13-
workflow_dispatch:
12+
# - cron: "0 0 * * 0"
13+
# workflow_dispatch:
14+
#
15+
pull_request:
16+
branches:
17+
- main
1418

1519
permissions:
1620
contents: read
@@ -41,7 +45,11 @@ jobs:
4145
- name: Checkout
4246
uses: actions/checkout@v3
4347
with:
44-
fetch-depth: 50
48+
# Disabling shallow clone is recommended for improving the
49+
# relevancy of reporting
50+
fetch-depth: 0
51+
- name: Install sonar-scanner and build-wrapper
52+
uses: sonarsource/sonarcloud-github-c-cpp@v1
4553
- name: Create build directories
4654
run: |
4755
mkdir _install
@@ -88,6 +96,7 @@ jobs:
8896
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8997
run: sonar-scanner -X -Dsonar.login=$SONAR_TOKEN
9098

99+
91100
# ------------------------------------------------------------------------------
92101
# Valgrind memcheck test
93102
# ------------------------------------------------------------------------------
@@ -119,7 +128,7 @@ jobs:
119128
shell: bash
120129
- name: Install Dependencies
121130
run: |
122-
share/ci/scripts/linux/install_valgrind.sh
131+
share/ci/scripts/linux/install_valgrind.sh
123132
shell: bash
124133
- name: Configure
125134
run: |
@@ -171,12 +180,12 @@ jobs:
171180
include:
172181
# Fuzz test
173182
- build: 1
174-
build-descrip:
175-
cflags:
176-
cxxflags:
183+
build-descrip:
184+
cflags:
185+
cxxflags:
177186
# Fuzz with sanitizer
178187
- build: 2
179-
build-descrip: With Sanitizer
188+
build-descrip: With Sanitizer
180189
cflags: -DCFLAGS='-fsanitize=address'
181190
cxxflags: -DCXXFLAGS='-fsanitize=address'
182191
env:
@@ -208,7 +217,7 @@ jobs:
208217
-DOPENEXR_RUN_FUZZ_TESTS='ON' \
209218
-DOPENEXR_ENABLE_THREADING='ON' \
210219
${{ matrix.cxxflags }} \
211-
${{ matrix.cflags }}
220+
${{ matrix.cflags }}
212221
working-directory: _build
213222
- name: Build
214223
run: |

0 commit comments

Comments
 (0)