[CI] Run cppcheck as a separate job in parallel

This commit is contained in:
Mat Sutcliffe
2020-06-17 01:45:21 +01:00
parent 93181869ef
commit a5d07de50a

View File

@@ -23,19 +23,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Get version number
id: version
run: |
pip3 install tee
echo "::set-output name=value::$(python3 -u scripts/build.py --version)"
- name: Run cppcheck
run: |
sudo apt install cppcheck
cppcheck --template=gcc --inline-suppr --std=c++14 --enable=style,unusedFunction -i externals \
--suppressions-list=cppcheck.supp --library=qt.cfg --library=posix.cfg . | tee error.log
ls -l error.log
- name: Remove artifacts
uses: swift-project/delete-artifact@swift
with:
@@ -43,6 +36,22 @@ jobs:
failOnError: false
warnIfNotFound: false
checks:
runs-on: ubuntu-20.04
needs: preBuild
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
- name: Run cppcheck
run: |
sudo apt install cppcheck
cppcheck --template=gcc --inline-suppr --std=c++14 --enable=style,unusedFunction -i externals \
--suppressions-list=cppcheck.supp --library=qt.cfg --library=posix.cfg . | tee error.log
ls -l error.log
buildLinux:
runs-on: ubuntu-16.04
needs: preBuild
@@ -302,7 +311,7 @@ jobs:
postBuild:
runs-on: ubuntu-20.04
needs: [preBuild, buildLinux, buildWin64, buildWin32, buildMacOS]
needs: [preBuild, checks, buildLinux, buildWin64, buildWin32, buildMacOS]
steps:
- name: Download xswiftbus-thin
@@ -328,7 +337,7 @@ jobs:
notify:
runs-on: ubuntu-20.04
needs: [preBuild, buildLinux, buildWin64, buildWin32, buildMacOS, postBuild]
needs: [preBuild, checks, buildLinux, buildWin64, buildWin32, buildMacOS, postBuild]
if: always()
steps: