mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-29 12:17:15 +00:00
Enable WERROR=y for CI and package builds so warnings in SCST code are fatal. Keep WERROR=n for regression and Coverity because these workflows must tolerate failures outside strict SCST package gates.
88 lines
2.3 KiB
YAML
88 lines
2.3 KiB
YAML
name: Run regression tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
WERROR: 'n'
|
|
|
|
jobs:
|
|
prepare_matrix:
|
|
name: Prepare kernel matrix
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
regression: ${{ steps.matrix.outputs.regression }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@main
|
|
|
|
- name: Resolve kernel matrix
|
|
id: matrix
|
|
shell: bash
|
|
run: |
|
|
matrix="$(bash scripts/kernel-matrix regression)"
|
|
printf 'regression=%s\n' "${matrix}" >>"${GITHUB_OUTPUT}"
|
|
|
|
regression_tests:
|
|
name: ${{matrix.version}}
|
|
needs: prepare_matrix
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{ fromJSON(needs.prepare_matrix.outputs.regression) }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@main
|
|
|
|
- name: Install libelf-dev
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libelf-dev libsqlite3-dev
|
|
|
|
- name: Install sparse
|
|
run: |
|
|
sudo apt-get install sparse
|
|
|
|
- name: Install smatch
|
|
run: |
|
|
git clone https://github.com/error27/smatch.git
|
|
cd smatch
|
|
make -j
|
|
sudo BINDIR=/bin SHAREDIR=/home/runner/share make install
|
|
|
|
- name: Run regression tests
|
|
run: |
|
|
err=0
|
|
version="${{matrix.version}}"
|
|
workdir="/tmp/scst-${version}"
|
|
out="output.txt"
|
|
|
|
./scripts/run-regression-tests -l -q -d "${workdir}" "${version}-nc-ns-nm" | tee "${out}"
|
|
|
|
if ! grep -q "Compiling the patched kernel" "${out}"; then
|
|
echo "::error title=Regression tests::run-regression-tests failed"
|
|
err=1
|
|
else
|
|
if grep -A1 "Compiling the patched kernel" "${out}" | grep -E -q "FAILED|[1-9][0-9]* errors"; then
|
|
echo "::error title=Regression tests::Regression test failed"
|
|
err=1
|
|
else
|
|
echo "::notice title=Regression tests::Succeeded"
|
|
fi
|
|
|
|
f=( "${workdir}"/compilation-*-output.txt )
|
|
echo
|
|
echo "===== $(basename "${f[0]}") ====="
|
|
cat "${f[0]}"
|
|
fi
|
|
|
|
rm -rf "${workdir}"
|
|
rm -f "${out}"
|
|
|
|
exit $err
|