mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
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.
74 lines
2.5 KiB
YAML
74 lines
2.5 KiB
YAML
name: KUnit
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_id }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
kunit:
|
|
name: Build and run in VM
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
# Compare the whole PR against its merge base, including fork PRs.
|
|
fetch-depth: 0
|
|
- name: Check VM supervisor and CI selection
|
|
run: python3 -m unittest discover -s scripts/ci -p 'test_*.py'
|
|
- name: Select KUnit checks
|
|
id: changes
|
|
env:
|
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
run: |
|
|
python3 scripts/ci/select_checks.py --check kunit --event "$GITHUB_EVENT_NAME" \
|
|
--base "$BASE_SHA" --head "$HEAD_SHA"
|
|
- name: Install VM tools
|
|
if: steps.changes.outputs.run == 'true'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y qemu-system-x86 qemu-utils e2fsprogs fakeroot
|
|
- name: Build kernel-matched image and KUnit modules
|
|
if: steps.changes.outputs.run == 'true'
|
|
run: bash scripts/ci/build-image kunit "$RUNNER_TEMP/kunit-image"
|
|
- name: Exercise VM success, panic and timeout handling
|
|
if: steps.changes.outputs.run == 'true'
|
|
run: |
|
|
python3 scripts/ci/vm.py self-test "$RUNNER_TEMP/kunit-image" \
|
|
"$RUNNER_TEMP/kunit-supervisor" --timeout 180 --accel tcg
|
|
- name: Run KUnit
|
|
if: steps.changes.outputs.run == 'true'
|
|
run: |
|
|
python3 scripts/ci/vm.py kunit "$RUNNER_TEMP/kunit-image" \
|
|
"$RUNNER_TEMP/kunit-results" --timeout 1200
|
|
- name: Save build and runtime evidence
|
|
if: always() && steps.changes.outputs.run == 'true'
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: kunit-results
|
|
retention-days: 7
|
|
path: |
|
|
${{ runner.temp }}/kunit-image/*.log
|
|
${{ runner.temp }}/kunit-image/*.json
|
|
${{ runner.temp }}/kunit-image/*.txt
|
|
${{ runner.temp }}/kunit-image/kernel.config
|
|
${{ runner.temp }}/kunit-image/modules.tar.gz
|
|
${{ runner.temp }}/kunit-supervisor/
|
|
${{ runner.temp }}/kunit-results/
|