7
7
name : Analysis
8
8
9
9
on :
10
- schedule :
10
+ # schedule:
11
11
# 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
14
18
15
19
permissions :
16
20
contents : read
33
37
env :
34
38
CXX : g++
35
39
CC : gcc
40
+ BW_OUTPUT : bw_output
36
41
steps :
37
42
# TODO: Remove this workaround following resolution of:
38
43
# https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43
41
46
- name : Checkout
42
47
uses : actions/checkout@v3
43
48
with :
44
- fetch-depth : 50
49
+ # Disabling shallow clone is recommended for improving the
50
+ # relevancy of reporting
51
+ fetch-depth : 0
52
+ - name : Install sonar-scanner and build-wrapper
53
+ uses : sonarsource/sonarcloud-github-c-cpp@v1
45
54
- name : Create build directories
46
55
run : |
47
56
mkdir _install
66
75
- name : Build OpenEXR with build-wrapper
67
76
shell : bash
68
77
run : |
69
- build-wrapper-linux-x86-64 --out-dir bw_output \
78
+ build-wrapper-linux-x86-64 --out-dir ${{ env.BW_OUTPUT }} \
70
79
cmake --build . \
71
80
--target install \
72
81
--config Release
@@ -86,139 +95,7 @@ jobs:
86
95
env :
87
96
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
88
97
SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
89
- run : sonar-scanner -X -Dsonar.login=$SONAR_TOKEN
90
-
91
- # ------------------------------------------------------------------------------
92
- # Valgrind memcheck test
93
- # ------------------------------------------------------------------------------
94
- linux_valgrind :
95
- name : ' Valgrind Linux CentOS 7 VFX CY2022 <GCC 9.3.1>'
96
- if : github.repository == 'AcademySoftwareFoundation/openexr'
97
- # GH-hosted VM. The build runs in CentOS 7 'container' defined below.
98
- runs-on : ubuntu-latest
99
- container :
100
- # DockerHub: https://hub.docker.com/u/aswf
101
- # Source: https://github.com/AcademySoftwareFoundation/aswf-docker
102
- image : aswf/ci-openexr:2022
103
- env :
104
- CXX : g++
105
- CC : gcc
106
- steps :
107
- # TODO: Remove this workaround following resolution of:
108
- # https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43
109
- - name : Setup container
110
- run : sudo rm -rf /usr/local/lib64/cmake/glew
111
- - name : Checkout
112
- uses : actions/checkout@v3
113
- with :
114
- fetch-depth : 50
115
- - name : Create build directories
116
- run : |
117
- mkdir _install
118
- mkdir _build
119
- shell : bash
120
- - name : Install Dependencies
121
- run : |
122
- share/ci/scripts/linux/install_valgrind.sh
123
- shell : bash
124
- - name : Configure
125
- run : |
126
- cmake .. \
127
- -DCMAKE_INSTALL_PREFIX=../_install \
128
- -DCMAKE_BUILD_TYPE=Release \
129
- -DCMAKE_CXX_STANDARD=14 \
130
- -DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
131
- -DBUILD_SHARED_LIBS='OFF' \
132
- -DOPENEXR_BUILD_TOOLS='ON' \
133
- -DOPENEXR_RUN_FUZZ_TESTS='OFF' \
134
- -DOPENEXR_ENABLE_THREADING='ON'
135
- working-directory : _build
136
- - name : Build
137
- run : |
138
- cmake --build . \
139
- --target install \
140
- --config Release
141
- working-directory : _build
142
- - name : Valgrind memcheck tests
143
- run : |
144
- ctest -C Release \
145
- --timeout 50000 \
146
- --force-new-ctest-process \
147
- --test-action memcheck \
148
- --output-on-failure \
149
- -VV
150
- working-directory : _build
151
- - name : Valgrind memcheck test results
152
- run : |
153
- share/ci/scripts/linux/log_valgrind.sh _build
154
- shell : bash
155
-
156
- # ------------------------------------------------------------------------------
157
- # Fuzz test
158
- # ------------------------------------------------------------------------------
159
- linux_fuzz :
160
- name : ' Fuzz Test ${{ matrix.build-descrip }} Linux CentOS 7 VFX CY2022 <GCC 9.3.1>'
161
- if : github.repository == 'AcademySoftwareFoundation/openexr'
162
- # GH-hosted VM. The build runs in CentOS 7 'container' defined below.
163
- runs-on : ubuntu-latest
164
- container :
165
- # DockerHub: https://hub.docker.com/u/aswf
166
- # Source: https://github.com/AcademySoftwareFoundation/aswf-docker
167
- image : aswf/ci-openexr:2022
168
- strategy :
169
- matrix :
170
- build : [1, 2]
171
- include :
172
- # Fuzz test
173
- - build : 1
174
- build-descrip :
175
- cflags :
176
- cxxflags :
177
- # Fuzz with sanitizer
178
- - build : 2
179
- build-descrip : With Sanitizer
180
- cflags : -DCFLAGS='-fsanitize=address'
181
- cxxflags : -DCXXFLAGS='-fsanitize=address'
182
- env :
183
- CXX : g++
184
- CC : gcc
185
- steps :
186
- # TODO: Remove this workaround following resolution of:
187
- # https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43
188
- - name : Setup container
189
- run : sudo rm -rf /usr/local/lib64/cmake/glew
190
- - name : Checkout
191
- uses : actions/checkout@v3
192
- with :
193
- fetch-depth : 50
194
- - name : Create build directories
195
- run : |
196
- mkdir _install
197
- mkdir _build
198
- shell : bash
199
- - name : Configure
200
- run : |
201
- cmake .. \
202
- -DCMAKE_INSTALL_PREFIX=../_install \
203
- -DCMAKE_BUILD_TYPE=Release \
204
- -DCMAKE_CXX_STANDARD=14 \
205
- -DCMAKE_VERBOSE_MAKEFILE:BOOL='OFF' \
206
- -DBUILD_SHARED_LIBS='OFF' \
207
- -DOPENEXR_BUILD_TOOLS='ON' \
208
- -DOPENEXR_RUN_FUZZ_TESTS='ON' \
209
- -DOPENEXR_ENABLE_THREADING='ON' \
210
- ${{ matrix.cxxflags }} \
211
- ${{ matrix.cflags }}
212
- working-directory : _build
213
- - name : Build
214
- run : |
215
- cmake --build . \
216
- --target install \
217
- --config Release
218
- working-directory : _build
219
- - name : Fuzz test
220
- run : |
221
- bin/OpenEXRFuzzTest
222
- working-directory : _build
98
+ run : sonar-scanner -X -Dsonar.login=$SONAR_TOKEN \
99
+ -Dsonar.cfamily.build-wrapper-output="${{ env.BW_OUTPUT }}"
223
100
224
101
0 commit comments