mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
Pull requests that only change development guides or independent tooling still compile kernels and run the VM suites. Select Ginkgo, KUnit, Clang and kernel regression through one shared path policy before expensive work. Compare the whole PR against its merge base, retaining deleted paths and both sides of renames. Run checks for unclassified inputs. Keep path rules in .github/ci-checks.toml and validate their structure, check names, literal paths and conflicting entries before selection. Provide a validation-only command. Changes to the config or selector exercise every check. Select kernel regression once in the preparation job and gate the build job before expanding its matrix. Unrelated PRs do not allocate a runner for every kernel. Selection failures fail the workflow and successful skips include a reason in the job summary. Run the Packages workflow only after pushes to master, preserving its DEB/RPM builds and publication. Keep the separate Clang DEB build on PRs. Retain full master and manual checks and the existing Checkpatch runs. Cover path ownership, config validation and Git histories with tests, and shorten the CI guide around all workflows, selection and results. Quote the CC environment key so Checkpatch does not interpret unchanged YAML diff context as a Cc trailer.
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
name: CI
|
|
|
|
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
|
|
|
|
env:
|
|
WERROR: 'y'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
compiler: [clang]
|
|
arch: [x86_64]
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
persist-credentials: false
|
|
fetch-depth: 0
|
|
- name: Check CI selection
|
|
run: python3 -m unittest discover -s scripts/ci -p 'test_select_checks.py'
|
|
- name: Select Clang build
|
|
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 clang --event "$GITHUB_EVENT_NAME" \
|
|
--base "$BASE_SHA" --head "$HEAD_SHA"
|
|
- name: Install build-essential
|
|
if: steps.changes.outputs.run == 'true'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential debhelper devscripts dpkg-dev quilt
|
|
- name: Install multilib
|
|
run: |
|
|
sudo apt-get install -y gcc-multilib g++-multilib
|
|
if: steps.changes.outputs.run == 'true' && matrix.arch == 'x86'
|
|
- name: Build
|
|
if: steps.changes.outputs.run == 'true'
|
|
env:
|
|
'CC': ${{ matrix.compiler }}
|
|
CFLAGS: ${{ matrix.arch == 'x86' && '-m32' || '' }}
|
|
LDFLAGS: ${{ matrix.arch == 'x86' && '-m32' || '' }}
|
|
run: make CC=${{matrix.compiler}} dpkg
|