forked from kata-containers/packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (46 loc) · 1.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
#
MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
SED := sed
YQ := $(MK_DIR)/yq
SNAPCRAFT_FILE := snap/snapcraft.yaml
VERSIONS_YAML_FILE := versions.yaml
VERSIONS_YAML_FILE_URL := https://raw.githubusercontent.com/kata-containers/runtime/master/versions.yaml
VERSION_FILE := VERSION
VERSION_FILE_URL := https://raw.githubusercontent.com/kata-containers/runtime/master/VERSION
export MK_DIR
export YQ
export SNAPCRAFT_FILE
export VERSION_FILE
export VERSIONS_YAML_FILE
test:
@$(MK_DIR)/.ci/test.sh
test-release-tools:
@$(MK_DIR)/release/tag_repos_test.sh
@$(MK_DIR)/release/update-repository-version_test.sh
test-static-build:
@make -f $(MK_DIR)/static-build/qemu/Makefile
@make -f $(MK_DIR)/static-build/firecracker/Makefile
test-packaging-tools:
@$(MK_DIR)/obs-packaging/build_from_docker.sh
test-build-kernel:
@$(MK_DIR)/kernel/build-kernel_test.sh
$(YQ):
@bash -c "source .ci/lib.sh; install_yq $${MK_DIR}"
$(VERSION_FILE):
@curl -sO $(VERSION_FILE_URL)
$(VERSIONS_YAML_FILE):
@curl -sO $(VERSIONS_YAML_FILE_URL)
snap: $(YQ) $(VERSION_FILE)
@if [ "$$(cat $(VERSION_FILE))" != "$$($(YQ) r $(SNAPCRAFT_FILE) version)" ]; then \
>&2 echo "Warning: $(SNAPCRAFT_FILE) version is different to upstream $(VERSION_FILE) file"; \
fi
snapcraft -d
snap-xbuild:
cd $(MK_DIR)/snap-build; ./xbuild.sh -a all
.PHONY: test test-release-tools test-static-build test-packaging-tools snap snap-xbuild \
$(VERSION_FILE) $(VERSIONS_YAML_FILE)