mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-29 04:07:35 +00:00
Do not install sparse or build smatch in jobs that disable both. Check for each tool only when the corresponding analysis is enabled.
77 lines
2.0 KiB
YAML
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
|