.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.
This commit is contained in:
Gleb Chesnokov
2026-08-25 14:24:22 +03:00
parent 06857c81cb
commit 726f91559c
2 changed files with 19 additions and 30 deletions
+1 -12
View File
@@ -42,18 +42,7 @@ jobs:
- 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
sudo apt-get install -y libelf-dev
- name: Run regression tests
run: |
+18 -18
View File
@@ -637,16 +637,6 @@ fi
# Regression tests #
####################
if [ "$(type -p sparse)" = "" ]; then
echo "Error: sparse has not yet been installed."
echo "See also http://www.kernel.org/pub/software/devel/sparse/."
fi
if [ "$(type -p smatch)" = "" ]; then
echo "Error: smatch has not yet been installed."
echo "See also http://smatch.sourceforge.net/."
fi
if ! mkdir -p "${outputdir}"; then
if [ -e "${outputdir}" ]; then
echo "Error: path ${outputdir} exists and is not a directory."
@@ -736,18 +726,28 @@ do
export KCFLAGS
subdirs=(drivers/scst drivers/scsi/qla2xxx)
if [ "${run_sparse}" = "true" ]; then
run_sparse "$k" "${subdirs[@]}"
mv "${outputdir}/sparse-$k-output.txt" \
"${outputdir}/sparse-$k-scst-output.txt"
if [ "${ibmvio}" = "true" ]; then
run_sparse "$k" drivers/scsi libsrp.ko scsi_sysfs.ko \
scsi_transport_fc.ko scsi_transport_srp.ko
if [ "$(type -p sparse)" = "" ]; then
echo "Error: sparse has not yet been installed."
echo "See also http://www.kernel.org/pub/software/devel/sparse/."
else
run_sparse "$k" "${subdirs[@]}"
mv "${outputdir}/sparse-$k-output.txt" \
"${outputdir}/sparse-$k-scsi-output.txt"
"${outputdir}/sparse-$k-scst-output.txt"
if [ "${ibmvio}" = "true" ]; then
run_sparse "$k" drivers/scsi libsrp.ko scsi_sysfs.ko \
scsi_transport_fc.ko scsi_transport_srp.ko
mv "${outputdir}/sparse-$k-output.txt" \
"${outputdir}/sparse-$k-scsi-output.txt"
fi
fi
fi
if [ "${run_smatch}" = "true" ]; then
run_smatch "$k" "${subdirs[@]}"
if [ "$(type -p smatch)" = "" ]; then
echo "Error: smatch has not yet been installed."
echo "See also http://smatch.sourceforge.net/."
else
run_smatch "$k" "${subdirs[@]}"
fi
fi
compile_kernel "$k" "${subdirs[@]}"
if [ "${full_check}" = "true" ]; then