Skip to content

Commit f3f6ffb

Browse files
committed
ci: move pvsStudio job to its own workflow & use new flag
The license will expire in approximately 1 month. I disabled the expiration check.
1 parent 941017d commit f3f6ffb

File tree

2 files changed

+73
-64
lines changed

2 files changed

+73
-64
lines changed

.github/workflows/on_PR_linux_special_builds.yml

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -202,67 +202,3 @@ jobs:
202202
run: |
203203
make doc
204204
205-
special_pvsStudio:
206-
name: 'Ubuntu 20.04 - GCC - Static Analyzer: PVS-Studio'
207-
runs-on: ubuntu-latest
208-
209-
steps:
210-
- uses: actions/checkout@v3
211-
with:
212-
fetch-depth: 2
213-
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
214-
215-
- name: install dependencies
216-
run: |
217-
pip3 install conan==1.45.0
218-
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
219-
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt |sudo apt-key add -
220-
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
221-
sudo apt-get update -qq
222-
sudo apt-get install -qq pvs-studio
223-
224-
- name: Conan common config
225-
run: |
226-
conan profile new --detect default
227-
conan profile update settings.compiler.libcxx=libstdc++11 default
228-
229-
- name: Run Conan
230-
run: |
231-
mkdir build && cd build
232-
conan profile list
233-
conan profile show default
234-
conan install .. -o webready=True --build missing
235-
236-
- name: Configure
237-
run: |
238-
cd build && \
239-
cmake -DCMAKE_BUILD_TYPE=Debug \
240-
-DBUILD_SHARED_LIBS=ON \
241-
-DEXIV2_ENABLE_PNG=ON \
242-
-DEXIV2_ENABLE_WEBREADY=ON \
243-
-DEXIV2_ENABLE_CURL=ON \
244-
-DEXIV2_BUILD_UNIT_TESTS=ON \
245-
-DEXIV2_ENABLE_BMFF=ON \
246-
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
247-
-DBUILD_WITH_COVERAGE=ON \
248-
-DCMAKE_INSTALL_PREFIX=install \
249-
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
250-
.. \
251-
252-
- name: Static Analysis
253-
env:
254-
PVS_USERNAME: ${{ secrets.PVS_USERNAME }}
255-
PVS_KEY: ${{ secrets.PVS_KEY }}
256-
run: |
257-
cd build
258-
pvs-studio-analyzer credentials $PVS_USERNAME $PVS_KEY -o PVS_license.lic
259-
pvs-studio-analyzer analyze -l PVS_license.lic -o pvsStudio.log -j4
260-
plog-converter -a GA:1,2 -d V1042 -t fullhtml pvsStudio.log -o pvsReportHtml
261-
262-
- uses: actions/upload-artifact@v3
263-
with:
264-
name: static_analysis
265-
path: build/pvsReportHtml
266-
retention-days: 7
267-
268-
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: On PRs - Linux - Static Analysis
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths-ignore:
7+
- "*.md"
8+
9+
jobs:
10+
special_pvsStudio:
11+
name: 'Ubuntu 20.04 - GCC - Static Analyzer: PVS-Studio'
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 2
18+
# Trying to deal with warning: -> Issue detecting commit SHA. Please run actions/checkout with fetch-depth > 1 or set to 0
19+
20+
- name: install dependencies
21+
run: |
22+
pip3 install conan==1.45.0
23+
sudo add-apt-repository ppa:ubuntu-lxc/daily -y
24+
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt |sudo apt-key add -
25+
sudo wget -O /etc/apt/sources.list.d/viva64.list https://files.pvs-studio.com/etc/viva64.list
26+
sudo apt-get update -qq
27+
sudo apt-get install -qq pvs-studio
28+
29+
- name: Conan common config
30+
run: |
31+
conan profile new --detect default
32+
conan profile update settings.compiler.libcxx=libstdc++11 default
33+
34+
- name: Run Conan
35+
run: |
36+
mkdir build && cd build
37+
conan profile list
38+
conan profile show default
39+
conan install .. -o webready=True --build missing
40+
41+
- name: Configure
42+
run: |
43+
cd build && \
44+
cmake -DCMAKE_BUILD_TYPE=Debug \
45+
-DBUILD_SHARED_LIBS=ON \
46+
-DEXIV2_ENABLE_PNG=ON \
47+
-DEXIV2_ENABLE_WEBREADY=ON \
48+
-DEXIV2_ENABLE_CURL=ON \
49+
-DEXIV2_BUILD_UNIT_TESTS=ON \
50+
-DEXIV2_ENABLE_BMFF=ON \
51+
-DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON \
52+
-DBUILD_WITH_COVERAGE=ON \
53+
-DCMAKE_INSTALL_PREFIX=install \
54+
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
55+
.. \
56+
57+
- name: Static Analysis
58+
env:
59+
PVS_USERNAME: ${{ secrets.PVS_USERNAME }}
60+
PVS_KEY: ${{ secrets.PVS_KEY }}
61+
run: |
62+
cd build
63+
pvs-studio-analyzer credentials $PVS_USERNAME $PVS_KEY -o PVS_license.lic
64+
pvs-studio-analyzer analyze -l PVS_license.lic -o pvsStudio.log -j4 --disableLicenseExpirationCheck
65+
plog-converter -a GA:1,2 -d V1042 -t fullhtml pvsStudio.log -o pvsReportHtml
66+
67+
- uses: actions/upload-artifact@v3
68+
with:
69+
name: static_analysis
70+
path: build/pvsReportHtml
71+
retention-days: 7
72+
73+

0 commit comments

Comments
 (0)