Files
scst/.github/workflows/run_regression_tests.yaml
T
Gleb Chesnokov 726f91559c .github/workflows: Skip disabled regression analyzers
Do not install sparse or build smatch in jobs that disable both.

Check for each tool only when the corresponding analysis is enabled.
2026-08-25 14:24:22 +03:00

77 lines
2.0 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
- 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