Files
Gleb Chesnokov 82b024984c .github/workflows: Update analyzer and VM test CI
Enable Cppcheck alongside the other analyzers on master pushes and
manual dispatch, using the existing container and KUnit-enabled runner.
Keep failures for source findings and incomplete analysis, and list the
enabled job in the tooling guide. Use only analyzer names for job titles;
KUnit source coverage remains mandatory.

The Ginkgo VM job reports this runner warning:

  Node.js 20 is deprecated. The following actions target Node.js 20
  but are being forced to run on Node.js 24: actions/checkout@v4,
  actions/upload-artifact@v4.

KUnit uses the same action versions. Update checkout and upload-artifact
to v7 in both VM workflows so they explicitly select Node.js 24, matching
the analyzer workflow. Retain checkout and artifact collection settings.
2026-10-21 13:20:12 +03:00

95 lines
2.6 KiB
YAML

name: Static analyzers
on:
push:
branches: [master]
workflow_dispatch:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
script-tests:
name: Analyzer script tests
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Run analyzer script tests
run: make lint-test
scs-lint:
name: SCST code style
needs: script-tests
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
with:
version: "0.13.1"
python-version: "3.12"
enable-cache: false
- name: Test SCST style rules
run: make scs-lint-test
- name: Run make scs_lint
run: make scs_lint
native:
name: ${{ matrix.analyzer }}
needs: script-tests
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
analyzer:
- sparse
- smatch
- checkpatch
- coccicheck
- cppcheck
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Build pinned analyzer environment
run: |
docker build -f scripts/ci/analyzers.Dockerfile -t scst-analyzers:local . \
2>&1 | tee "$RUNNER_TEMP/analyzer-image.log"
- name: Run make ${{ matrix.analyzer }}
env:
ANALYZER: ${{ matrix.analyzer }}
run: |
source scripts/ci/kernel.env
docker run --rm --init --network=none --cap-drop=ALL \
--security-opt=no-new-privileges --user "$(id -u):$(id -g)" \
--env HOME=/tmp --env GITHUB_STEP_SUMMARY=/scst/.cache/analyzer-summary \
--env "KDIR=/usr/src/kernels/$KERNEL_BUILD.x86_64" \
--mount "type=bind,src=$PWD,dst=/scst" scst-analyzers:local \
python3 -B scripts/ci/run-analyzer.py "$ANALYZER"
- name: Publish summary
if: always()
run: |
if [[ -f .cache/analyzer-summary ]]; then
cat .cache/analyzer-summary >> "$GITHUB_STEP_SUMMARY"
fi
- name: Save complete analyzer evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.analyzer }}-evidence
retention-days: 7
path: |
${{ runner.temp }}/analyzer-image.log
.cache/lint/
.cache/analyzer-summary