forked from travelping/upg-vpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (51 loc) · 1.68 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
60
61
62
63
64
65
.PHONY: install-hooks checkstyle ci-build image install retest test e2e retest-e2e buildenv \
version
SHELL = /bin/bash
BUILD_TYPE ?= debug
IMAGE_BASE ?= upg
TEST_VERBOSITY ?= 2
VERSION = $(shell . hack/version.sh && echo "$${UPG_GIT_VERSION}")
include vpp.spec
install-hooks:
hack/install-hooks.sh
# avoid rebuilding part of the source each time
version:
ver_tmp=`mktemp version-XXXXXXXX`; \
echo "#ifndef UPG_VERSION" >"$${ver_tmp}"; \
echo "#define UPG_VERSION \"$(VERSION)\"" >>"$${ver_tmp}"; \
echo "#endif" >>"$${ver_tmp}"; \
if ! cmp upf/version.h "$${ver_tmp}"; then \
mv "$${ver_tmp}" upf/version.h; \
else \
rm -f "$${ver_tmp}"; \
fi
# TODO: checktyle shouldn't require VPP checkout but presently it's
# needed for getting the build image tag
checkstyle:
SKIP_VPP_SOURCE_CHECK=1 hack/buildenv.sh hack/checkstyle.sh
ci-build: version
hack/ci-build.sh
image: version
DOCKER_BUILDKIT=1 \
docker build -t $(IMAGE_BASE):${BUILD_TYPE} \
--build-arg BUILD_TYPE=${BUILD_TYPE} \
--build-arg BASE=$(VPP_IMAGE_BASE)_${BUILD_TYPE} \
--build-arg DEVBASE=$(VPP_IMAGE_BASE)_dev_$(BUILD_TYPE) .
install: version
hack/buildenv.sh hack/build-internal.sh install
retest:
hack/buildenv.sh hack/run-integration-tests-internal.sh
test: version
hack/buildenv.sh /bin/bash -c \
'make install && hack/run-integration-tests-internal.sh'
e2e: version
UPG_BUILDENV_PRIVILEGED=1 hack/buildenv.sh /bin/bash -c \
'make install && hack/e2e.sh'
retest-e2e:
UPG_BUILDENV_PRIVILEGED=1 hack/buildenv.sh hack/e2e.sh
buildenv: version
UPG_BUILDENV_PRIVILEGED=1 hack/buildenv.sh
clean-buildenv:
hack/buildenv.sh clean
genbinapi:
hack/buildenv.sh /bin/bash -c 'make install && hack/genbinapi.sh'