action #124688
coordination #96596: [qe-core][CI] CI/CD and Coding style improvements
[qe-core] Reduce execution of compile tests
0%
Description
In our CI, we have a job that calls the compile
target which takes around 9 minutes
export PERL5LIB=../..:os-autoinst:lib:tests/installation:tests/x11:tests/qa_automation:tests/virt_autotest:tests/cpu_bugs:tests/sles4sap/saptune:$PERL5LIB: ; ( git ls-files "*.pm" || find . -name \*.pm|grep -v /os-autoinst/ ) | parallel perl -c 2>&1 | grep -v " OK$" && exit 2; true
And this is looking for all of the files per every PR; if we manage to find a way how to find the files that changed between a PR and what is on master, we can shave a lot of seconds there, and enable it fully after things are merged, as we don't really care about the time there
History
#2
Updated by rfan1 4 months ago
Seems we have the code there already:
.PHONY: test-compile
test-compile: check-links
export PERL5LIB=${PERL5LIB_}:$(shell ./tools/wheel --verify) ; ( git ls-files "*.pm" || find . -name \*.pm|grep -v /os-autoinst/ ) | parallel perl -c 2>&1 | grep -v " OK$$" && exit 2; true
.PHONY: test-compile-changed
test-compile-changed: os-autoinst/
export PERL5LIB=${PERL5LIB_}:$(shell ./tools/wheel --verify) ; for f in `git diff --name-only | grep '.pm'` ; do perl -c $$f 2>&1 | grep -v " OK$$" && exit 2; done ; true
#6
Updated by rfan1 3 months ago
Please refer to the attached file, that compile tests on pull request phase is required one so that I can not skip it.
https://docs.github.com/en/actions/using-workflows/required-workflows
We may need some github owners to change the default workflow.