Run linting in parallel with building

Linting code changes with golangci-lint is a very slow and resource
intensive process.  However, it does not depend on compiling anything.
This means it may run in parallel with the build tasks for
a modest perceived runtime duration improvement.

Additionally, the former validation make targets that **do** require a
build execute faster than CI is able to provision a VM, simply tack them
onto the end of all build operations.

Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
Chris Evich
2024-06-24 13:58:45 -04:00
parent 7ff4bbae26
commit 6c75a10875
4 changed files with 82 additions and 107 deletions

View File

@ -21,8 +21,8 @@ source $(dirname $0)/lib.sh
showrun echo "starting"
function _run_validate() {
showrun make validate
function _run_validate-source() {
showrun make validate-source
# make sure PRs have tests
showrun make tests-included
@ -207,10 +207,18 @@ eof
}
function _run_build() {
local vb_target
# There's no reason to validate-binaries across multiple linux platforms
# shellcheck disable=SC2154
if [[ "$DISTRO_NV" =~ $FEDORA_NAME ]]; then
vb_target=validate-binaries
fi
# Ensure always start from clean-slate with all vendor modules downloaded
showrun make clean
showrun make vendor
showrun make podman-release # includes podman, podman-remote, and docs
showrun make podman-release $vb_target # includes podman, podman-remote, and docs
# Last-minute confirmation that we're testing the desired runtime.
# This Can't Possibly Fail™ in regular CI; only when updating VMs.

View File

@ -306,9 +306,8 @@ esac
# shellcheck disable=SC2154
showrun echo "about to set up for TEST_FLAVOR [=$TEST_FLAVOR]"
case "$TEST_FLAVOR" in
validate)
# For some reason, this is also needed for validation
showrun make .install.pre-commit .install.gitvalidation
validate-source)
# NOOP
;;
altbuild)
# Defined in .cirrus.yml