-
Notifications
You must be signed in to change notification settings - Fork 27
/
.gitlab-ci.yml
108 lines (90 loc) · 2.59 KB
/
.gitlab-ci.yml
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
########################
# Global Config
########################
before_script:
- export
########################
# Job Templates
########################
# Global job template
# Used by all jobs
.global_job_template: &global_job_template
only:
- /.*-ci$/
- next
- master
- triggers
- tags
.build_job_template: &build_job_template
<<: *global_job_template
stage: build
script:
- make ARCH=${CONFIG_ARCH} CROSS_COMPILE=${CONFIG_CROSS_COMPILE} ${CONFIG_DEFCONFIG}_defconfig
- make ${CONFIG_MAKE_ARGS} ARCH=${CONFIG_ARCH} CROSS_COMPILE=${CONFIG_CROSS_COMPILE}
# Global setup/teardown template
# Used by all sysroot jobs
.setup_job_template: &setup_job_template
<<: *global_job_template
script:
- '
if [ "$CONFIG_SETUP_SCRIPT" != "" ]; then
$CONFIG_SETUP_SCRIPT;
fi;
'
variables:
GIT_STRATEGY: none
########################
# Pipeline Definition
########################
stages:
- setup
- build
- teardown
- buildroot_trigger
########################
# Jobs
########################
# Prep and teardown jobs
setup:
<<: *setup_job_template
stage: setup
teardown:
<<: *setup_job_template
stage: teardown
when: always
########################
# Build local tests
########################
zynq_build_job:
<<: *build_job_template
variables:
CONFIG_ARCH: arm
CONFIG_DEFCONFIG: mw_zynq
CONFIG_CROSS_COMPILE: /opt/Xilinx/SDK/2016.2/gnu/arm/lin/bin/arm-xilinx-linux-gnueabi-
zynqmp_build_job:
<<: *build_job_template
variables:
CONFIG_ARCH: arm64
CONFIG_DEFCONFIG: mw_zynqmp
CONFIG_CROSS_COMPILE: /opt/linaro/5.3-2016.02/aarch64-linux-gnu/bin/aarch64-linux-gnu-
########################
# Trigger buildroot
########################
buildroot_trigger_job:
<<: *global_job_template
script:
- '
if [ "$CONFIG_BR_BUILD_TOKEN" != "" ]; then
curl -X POST
-F token=${CONFIG_BR_BUILD_TOKEN}
-F ref=${CONFIG_BR_BUILD_REF}
-F variables[CONFIG_ZYNQ_LINUX_URL]=${CI_PROJECT_URL}.git
-F variables[CONFIG_ZYNQ_LINUX_VER]=${CI_BUILD_REF_NAME}
-F variables[CONFIG_ZYNQMP_LINUX_URL]=${CI_PROJECT_URL}.git
-F variables[CONFIG_ZYNQMP_LINUX_VER]=${CI_BUILD_REF_NAME}
-F variables[CONFIG_SOCFPGA_SKIP]=1
${CONFIG_BR_TRIGGER_URL};
fi;'
variables:
GIT_STRATEGY: none
stage: buildroot_trigger