forked from pulp-platform/pulp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.makefile
99 lines (73 loc) · 2.99 KB
/
ci.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
SHELL = bash
THREADS ?= 1
TEST_THREADS ?= 32
override OPT += --db --db-info=$(CURDIR)/db_info.txt --debug
ifdef USE_TEST
CONFIG ?= pulpissimo-rtl@system=pulpissimo:platform=rtl;wolfe-rtl@template=wolfe:platform=rtl;quentin-rtl@template=quentin:platform=rtl;vivosoc3-rtl@template=vivosoc3:platform=rtl;gap-rtl@template=gap:platform=rtl
else
ifndef CONFIG
CONFIG += pulpissimo@user_config_file=$(CURDIR)/configs/json/pulpissimo.json
CONFIG += pulpissimo-riscy@user_config_file=$(CURDIR)/configs/json/pulpissimo-riscy.json
CONFIG += pulpissimo-zeroriscy@user_config_file=$(CURDIR)/configs/json/pulpissimo-zeroriscy.json
CONFIG += pulpissimo-microriscy@user_config_file=$(CURDIR)/configs/json/pulpissimo-microriscy.json
CONFIG += devchip@system=devchip
CONFIG += wolfe@system=wolfe
CONFIG += pulpissimo@system=pulpissimo
CONFIG += quentin@system=quentin
CONFIG += gap@system=gap
CONFIG += oprecompkw@system=oprecompkw
CONFIG += vivosoc3@system=vivosoc3
CONFIG += honey@system=honey
CONFIG += bigpulp@system=bigpulp
endif
endif
export PULP_CONFIGS=$(CONFIG)
ifndef PULP_DB_MYSQL
#export PULP_DB_FILE=/home/jenkins/reports/pulpdb
endif
ifdef BRANCH
override OPT += --branch=$(BRANCH)
endif
SDK_TAG ?= dev
SDK_NAME ?= pulp-sdk
SDK_FULL_NAME = $(SDK_NAME)-$(SDK_TAG)
all: pulp-tools deps checkout build deploy
deploy:
source init.sh && plpbuild --p sdk deploy $(OPT)
rt:
source init.sh && plpbuild --g runtime build --threads $(THREADS) $(OPT)
build:
source init.sh && plpbuild --p sdk build --threads $(THREADS) $(OPT)
checkout:
source init.sh && plpbuild --p sdk checkout $(OPT)
deps:
source init.sh && plpbuild --p sdk deps $(OPT)
clean:
source init.sh && plpbuild --p sdk clean $(OPT)
tar:
mkdir -p artifacts
rm -f artifacts/$(SDK_FULL_NAME)
ln -s $(CURDIR)/pkg/sdk/dev artifacts/$(SDK_FULL_NAME)
cd artifacts && tar -jhcvf $(SDK_FULL_NAME).tar.bz2 $(SDK_FULL_NAME)
test-all: pulp-tools test-platform test-deps test-checkout test-run
test-run:
source init.sh && plpbuild --p tests env && source sourceme.sh && \
plpbuild --p tests test --threads $(TEST_THREADS) $(OPT) --env=sdk_validation \
--commit=`git rev-parse HEAD`
source init.sh && source sourceme.sh && \
plpdb tests --build=`cat $(CURDIR)/db_info.txt | grep tests.build.id= | sed s/tests.build.id=//` \
--mail="SDK regression report" --xls=report.xlsx --branch $(BRANCH) --config=$$CONFIG \
--url=$(BUILD_URL) --author-email=`git show -s --pretty=%ae` --env=sdk_validation && \
plpdb check_reg --build=`cat $(CURDIR)/db_info.txt | grep tests.build.id= | sed s/tests.build.id=//` \
--branch $(BRANCH) --config=$$CONFIG --env=sdk_validation
test-checkout:
source init.sh && plpbuild --p tests checkout $(OPT)
test-deps:
source init.sh && plpbuild --p tests deps $(OPT)
test-platform:
source init.sh && plpbuild --p tests env && source sourceme.sh && ./get-platform
pulp-tools:
git submodule update --init
report: pulp-tools
source init.sh && plpdb tests --xls=report.xls --mail
.PHONY: deps checkout build deploy all pulp-tools doc