mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-19 01:39:48 +00:00
ci: Add test for static qemu
Build qemu if there is any change in static-build. Do the same with the rest of projects in this repositoy. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
This commit is contained in:
parent
f1bfbe62a3
commit
05fd9d2131
32
.ci/test.sh
Executable file
32
.ci/test.sh
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2018 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
CI=${CI:-}
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
readonly toplevel_mk="${script_dir}/../Makefile"
|
||||
source "${script_dir}/lib.sh"
|
||||
|
||||
make_target() {
|
||||
target=$1
|
||||
dir=$2
|
||||
|
||||
pushd "${script_dir}/.." >> /dev/null
|
||||
if [ -n "${CI}" ] && ! git whatchanged origin/master..HEAD "${dir}" | grep "${dir}" >> /dev/null; then
|
||||
echo "Not changes in ${dir}"
|
||||
return
|
||||
fi
|
||||
popd >> /dev/null
|
||||
echo "Changes found in $dir"
|
||||
make -f "${toplevel_mk}" ${target}
|
||||
}
|
||||
|
||||
make_target test-release-tools "release/"
|
||||
make_target test-packaging-tools "obs-packaging/"
|
||||
make_target test-static-build "static-build/"
|
11
Makefile
11
Makefile
@ -8,15 +8,14 @@
|
||||
MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
.PHONY: test test-release-tools
|
||||
|
||||
test: test-release-tools test-packaging-tools
|
||||
test:
|
||||
@$(MK_DIR)/.ci/test.sh
|
||||
|
||||
test-release-tools:
|
||||
@$(MK_DIR)/release/tag_repos_test.sh
|
||||
|
||||
test-static-build:
|
||||
@make -f $(MK_DIR)/static-build/qemu/Makefile
|
||||
|
||||
test-packaging-tools:
|
||||
ifndef CI
|
||||
@$(MK_DIR)/build_from_docker.sh
|
||||
else
|
||||
@echo "Skip test-packaging-tools"
|
||||
@echo "See: https://github.com/kata-containers/packaging/issues/68"
|
||||
endif
|
||||
|
@ -44,6 +44,6 @@ docker build \
|
||||
-t qemu-static
|
||||
|
||||
docker run \
|
||||
-ti \
|
||||
-i \
|
||||
-v "${PWD}":/share qemu-static \
|
||||
mv /tmp/qemu-static/kata-qemu-static.tar.gz /share/
|
||||
|
Loading…
Reference in New Issue
Block a user