cleanup(ci): move static analysis from circle CI to GHA

Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
This commit is contained in:
Andrea Terzolo 2022-12-16 18:44:23 +01:00 committed by poiana
parent b17d513251
commit 9b41b77d53
2 changed files with 31 additions and 30 deletions

View File

@ -195,35 +195,6 @@ jobs:
name: Execute driver-loader integration tests
command: /tmp/ws/source/falco/test/driver-loader/run_test.sh /tmp/ws/build/release/
# Code quality
"quality-static-analysis":
machine:
enabled: true
image: ubuntu-2204:2022.10.2
steps:
- run:
name: Install deps ⛓️
command: |
sudo apt update -y
sudo apt install build-essential git cppcheck cmake -y
- checkout:
path: /tmp/source/falco
# We can use `USE_BUNDLED_DEPS=On` since the build is very fast
- run:
name: Build and run cppcheck
command: |
mkdir -p /tmp/source/falco/build
cd /tmp/source/falco/build && cmake -DUSE_BUNDLED_DEPS=On -DBUILD_WARNINGS_AS_ERRORS=ON -DCREATE_TEST_TARGETS=Off -DCMAKE_BUILD_TYPE="release" -DBUILD_BPF=Off -DBUILD_DRIVER=Off ..
make -j4 cppcheck
make -j4 cppcheck_htmlreport
- store_artifacts:
path: /tmp/source/falco/build/static-analysis-reports
destination: /static-analysis-reports
# Sign rpm packages
"rpm-sign":
docker:
@ -758,7 +729,6 @@ workflows:
- "build-musl"
- "build-arm64"
- "build-centos7"
- "quality-static-analysis"
- "tests-integration":
requires:
- "build-centos7"

31
.github/workflows/staticanalysis.yaml vendored Normal file
View File

@ -0,0 +1,31 @@
name: StaticAnalysis
on:
pull_request:
jobs:
staticanalysis:
runs-on: ubuntu-22.04
steps:
- name: Checkout ⤵️
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Install build dependencies ⛓️
run: |
sudo apt update -y
sudo apt install build-essential git cppcheck cmake -y
- name: Build and run cppcheck 🏎️
run: |
mkdir build
cd build && cmake -DUSE_BUNDLED_DEPS=On -DBUILD_WARNINGS_AS_ERRORS=ON -DCREATE_TEST_TARGETS=Off -DCMAKE_BUILD_TYPE="release" -DBUILD_BPF=Off -DBUILD_DRIVER=Off ..
make -j4 cppcheck
make -j4 cppcheck_htmlreport
- name: Upload bpf_test ⬆️
uses: actions/upload-artifact@v3
with:
name: static-analysis-reports
path: ./build/static-analysis-reports