2023-11-06 15:31:47 +01:00
|
|
|
|
|
|
|
name: cppcheck-premium
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'releases/**'
|
|
|
|
tags:
|
|
|
|
- '2.*'
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-22.04 # run on the latest image only
|
|
|
|
|
|
|
|
env:
|
2023-12-30 20:47:30 +01:00
|
|
|
PREMIUM_VERSION: 23.12.0
|
2023-11-06 15:31:47 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Download cppcheckpremium
|
|
|
|
run: |
|
2023-12-30 20:47:30 +01:00
|
|
|
wget https://files.cppchecksolutions.com/${{ env.PREMIUM_VERSION }}/ubuntu-22.04/cppcheckpremium-${{ env.PREMIUM_VERSION }}-amd64.tar.gz
|
|
|
|
#wget https://files.cppchecksolutions.com/cppcheckpremium-${{ env.PREMIUM_VERSION }}-amd64.tar.gz
|
2023-11-06 15:31:47 +01:00
|
|
|
tar xzf cppcheckpremium-${{ env.PREMIUM_VERSION }}-amd64.tar.gz
|
|
|
|
|
|
|
|
- name: Generate a license file
|
|
|
|
run: |
|
|
|
|
echo cppcheck > cppcheck.lic
|
2023-12-30 20:47:30 +01:00
|
|
|
echo 241231 >> cppcheck.lic
|
2023-11-06 15:31:47 +01:00
|
|
|
echo 80000 >> cppcheck.lic
|
2023-12-30 20:47:30 +01:00
|
|
|
echo 53b72a908d7aeeee >> cppcheck.lic
|
2023-11-06 15:31:47 +01:00
|
|
|
echo path:lib >> cppcheck.lic
|
|
|
|
|
|
|
|
- name: Check
|
|
|
|
run: |
|
|
|
|
cppcheckpremium-${{ env.PREMIUM_VERSION }}/premiumaddon --check-loc-license cppcheck.lic > cppcheck-premium-loc
|
2023-12-01 16:34:14 +01:00
|
|
|
cppcheckpremium-${{ env.PREMIUM_VERSION }}/cppcheck -j$(nproc) -D__GNUC__ -D__CPPCHECK__ --suppressions-list=cppcheckpremium-suppressions --platform=unix64 --enable=style --premium=misra-c++-2008 --premium=cert-c++-2016 --inline-suppr --error-exitcode=1 lib
|