mirror of
https://github.com/containers/netavark.git
synced 2026-02-05 06:45:56 +01:00
They are not used anywhere so it is just a waste of time and given we no
longer use a different name we cannot store them.
Instead build the examples as part of the build task.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit f990a783a0)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
90 lines
2.1 KiB
Bash
Executable File
90 lines
2.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eo pipefail
|
|
|
|
# This script runs in the Cirrus CI environment, invoked from .cirrus.yml .
|
|
# It can also be invoked manually in a `hack/get_ci_cm.sh` environment,
|
|
# documentation of said usage is TBI.
|
|
#
|
|
# The principal deciding factor is the first argument. For any
|
|
# given value 'xyz' there must be a function '_run_xyz' to handle that
|
|
# argument.
|
|
|
|
source $(dirname ${BASH_SOURCE[0]})/lib.sh
|
|
|
|
_run_noarg() {
|
|
die "runner.sh must be called with a single argument"
|
|
}
|
|
|
|
_run_build() {
|
|
# Assume we're on a fast VM, compile everything needed by the
|
|
# rest of CI since subsequent tasks may have limited resources.
|
|
make build_unit # reuses some debug binaries
|
|
make all # optimized/non-debug binaries
|
|
make examples # build the examples binaries needed by the integration tests
|
|
# This will get scooped up and become part of the artifact archive.
|
|
# Identify where the binary came from to benefit downstream consumers.
|
|
cat | tee bin/netavark.info << EOF
|
|
repo: $CIRRUS_REPO_CLONE_URL
|
|
branch: $CIRRUS_BASE_BRANCH
|
|
title: $CIRRUS_CHANGE_TITLE
|
|
commit: $CIRRUS_CHANGE_IN_REPO
|
|
build: https://cirrus-ci.com/build/$CIRRUS_BUILD_ID
|
|
task: https://cirrus-ci.com/task/$CIRRUS_TASK_ID
|
|
EOF
|
|
}
|
|
|
|
_run_build_aarch64() {
|
|
_run_build
|
|
}
|
|
|
|
_run_validate() {
|
|
make validate
|
|
}
|
|
|
|
_run_validate_aarch64() {
|
|
_run_validate
|
|
}
|
|
|
|
_run_unit() {
|
|
make unit
|
|
}
|
|
|
|
_run_unit_aarch64() {
|
|
_run_unit
|
|
}
|
|
|
|
_run_integration() {
|
|
make integration
|
|
}
|
|
|
|
_run_integration_aarch64() {
|
|
_run_integration
|
|
}
|
|
|
|
show_env_vars
|
|
|
|
msg "************************************************************"
|
|
msg "Toolchain details"
|
|
msg "************************************************************"
|
|
|
|
rustc --version
|
|
cargo --version
|
|
|
|
msg "************************************************************"
|
|
msg "Runner executing '$1' on $OS_REL_VER"
|
|
msg "************************************************************"
|
|
|
|
((${SETUP_ENVIRONMENT:-0})) || \
|
|
die "Expecting setup.sh to have completed successfully"
|
|
|
|
cd "${CIRRUS_WORKING_DIR}/"
|
|
|
|
handler="_run_${1:-noarg}"
|
|
|
|
if [ "$(type -t $handler)" != "function" ]; then
|
|
die "Unknown/Unsupported runner.sh argument '$1'"
|
|
fi
|
|
|
|
$handler
|