forked from pulp-platform/pulp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathci.makefile
More file actions
158 lines (123 loc) · 4.74 KB
/
ci.makefile
File metadata and controls
158 lines (123 loc) · 4.74 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
SHELL = bash
THREADS ?= 1
MAX_TIMEOUT ?= 3600
TEST_THREADS ?= 16
override TEST_OPT += --stdout
ifdef USE_DB
override OPT += --db --db-info=$(CURDIR)/db_info.txt --debug
endif
override OPT += --debug
ifdef USE_TEST
ifndef CONFIG
CONFIG += pulpissimo-rtl@config_file=systems/pulpissimo.json:platform=rtl
CONFIG += wolfe-rtl@config_file=systems/wolfe.json:platform=rtl
CONFIG += quentin-rtl@config_file=systems/quentin.json:platform=rtl
CONFIG += vivosoc3-rtl@config_file=systems/vivosoc3.json:platform=rtl
CONFIG += gap-rtl@config_file=systems/gap.json:platform=rtl
endif
else
ifndef CONFIG
CONFIG += pulpissimo@config_file=chips/pulpissimo/pulpissimo.json
CONFIG += pulpissimo_v1@config_file=chips/pulpissimo_v1/pulpissimo_v1.json
CONFIG += pulpissimo-riscy@config_file=chips/pulpissimo-riscy/pulpissimo-riscy.json
CONFIG += pulpissimo-zeroriscy@config_file=chips/pulpissimo-zeroriscy/pulpissimo-zeroriscy.json
CONFIG += pulpissimo-microriscy@config_file=chips/pulpissimo-microriscy/pulpissimo-microriscy.json
CONFIG += wolfe@config_file=chips/wolfe/wolfe.json
CONFIG += usoc_v1@config_file=chips/usoc_v1/usoc_v1.json
CONFIG += pulp@config_file=chips/pulp/pulp.json
CONFIG += pulp_v1@config_file=chips/pulp_v1/pulp_v1.json
CONFIG += vega@config_file=chips/vega/vega.json
CONFIG += gap@config_file=chips/gap/gap.json
CONFIG += gap_rev1@config_file=chips/gap_rev1/gap_rev1.json
CONFIG += oprecompkw@config_file=chips/oprecompkw/oprecompkw.json
CONFIG += oprecompkw_sa@config_file=chips/oprecompkw_sa/oprecompkw_sa.json
CONFIG += vivosoc3@config_file=chips/vivosoc3/vivosoc3.json
CONFIG += vivosoc3_5@config_file=chips/vivosoc3_5/vivosoc3_5.json
CONFIG += arnold@config_file=chips/arnold/arnold.json
CONFIG += bigpulp-standalone@config_file=chips/bigpulp-standalone/bigpulp.json
CONFIG += multino@config_file=chips/multino/multino.json
endif
endif
DISTRIBS ?= CentOS_7 Ubuntu_16
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)
sdk_users:
if [ ! -e sdk_users ]; then \
git clone git@github.com:pulp-platform/pulp-sdk-release.git sdk_users; \
else \
cd sdk_users; \
git pull; \
fi
ifneq '$(profile)' ''
profileName=$(profile)-
else
profile=default
endif
tag_prepare: sdk_users
source init.sh && for distrib in $(DISTRIBS); do \
downloaders=`plpbuild --p sdk downloader --distrib=$$distrib --version=$(profileName)$(version)`; \
for downloader in $$downloaders; do \
mkdir -p sdk_users/artifacts/$(profile)/$$distrib; \
chmod guo+x $$downloader; \
mv $$downloader sdk_users/artifacts/$(profile)/$$distrib; \
done; \
done
tag_commit:
git tag $(profileName)$(version)
git push --tags
tag_user_commit:
cd sdk_users; \
git add -A; \
git commit -a -m "Added tag $(profileName)$(version)"; \
git push
tag: tag_prepare tag_user_commit tag_commit
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) $(TEST_OPT) --env=sdk_validation \
--commit=`git rev-parse HEAD` --max-timeout=$(MAX_TIMEOUT)
touch report.xlsx
#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 sdk_users