-
Notifications
You must be signed in to change notification settings - Fork 281
/
Copy pathconfig.yml
228 lines (228 loc) · 8.13 KB
/
config.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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
version: 2.1
jobs:
lint:
docker:
- image: ubuntu:jammy
resource_class: small
steps:
- run:
name: Install Ubuntu dependencies.
command: |
apt-get update
apt-get install -y \
git \
python3-pip \
shellcheck \
cppcheck
- run:
name: Install 'black'.
command: |
python3 -m pip install "black==22.12.0"
- checkout
- run:
name: Run lint.
command: |
./tools/circle-ci/do-lint
setup:
docker:
- image: crops/poky:ubuntu-22.04
user: root
resource_class: small
working_directory: /tmp/job/project
steps:
- run:
name: Install ca-certificates pkg
command: |
apt-get update
apt-get install -y ca-certificates
- run:
name: Set up git config for testing user.
command: |
git config --global user.email "[email protected]"
git config --global user.name "CircleCI Testing"
- checkout
- run:
name: Sync Yocto repositories.
command: |
./sync_yocto.sh
- persist_to_workspace:
root: /tmp/job
paths:
- project
unit-test:
docker:
- image: crops/poky:ubuntu-22.04
environment:
MACHINE: qemux86
user: root
resource_class: 2xlarge
working_directory: /tmp/job/project
steps:
- attach_workspace:
at: /tmp/job
- run:
name: Build qemux86 and run package-test within
command: |
python3 tests2/ptest-runner -b build --tmpfs /mnt/ramdisk --verbose
qemu-cit:
parameters:
machine:
type: string
docker:
- image: ubuntu:jammy
environment:
QEMU_URI: https://github.com/facebook/openbmc/releases/download/qemux86-v2022.41.0/
user: root
resource_class: 2xlarge
working_directory: /tmp/job/project
steps:
- attach_workspace:
at: /tmp/job
- run:
name: Check if CIT required based on flash presence
command: |
if ! [[ -f /tmp/job/project/build/tmp/deploy/images/<< parameters.machine >>/flash-<< parameters.machine >> ]]; then
echo "flash-<< parameters.machine >> not found, skip CIT"
circleci-agent step halt
else
echo "BMC flash found, continue to CIT test"
fi
- run:
name: Install Ubuntu dependencies.
command: |
apt-get update
apt-get install -y \
git \
python3-pip \
shellcheck \
cppcheck \
net-tools \
libaio1 \
libpixman-1-dev \
wget \
vim
DEBIAN_FRONTEND="noninteractive" apt-get -y install libglib2.0-dev
- run:
name: Install python liberaries
command: |
pip3 install paramiko pexpect scp
- run:
name: Download QEMU
command: |
wget "${QEMU_URI}/qemu-system-aarch64"
chmod +x qemu-system-aarch64
- run:
name: execute CIT tests
no_output_timeout: 15m
command: |
python3 tools/circle-ci/cit_test_wrapper.py << parameters.machine >>
build:
parameters:
machine:
type: string
docker:
- image: crops/poky:ubuntu-22.04
environment:
MACHINE: << parameters.machine >>
CACHE_DIR: /tmp/job/sstate-cache
CACHE_URI: https://fb-openbmc-sstate.s3.us-east-2.amazonaws.com
resource_class: 2xlarge
working_directory: /tmp/job/project
steps:
- attach_workspace:
at: /tmp/job
- run:
name: Set up git config for testing user.
command: |
git config --global user.email "[email protected]"
git config --global user.name "CircleCI Testing"
- run:
name: Check build required.
command: |
if ! ./tools/circle-ci/check-build-required; then
circleci-agent step halt
fi
- run:
name: Download sstate cache.
command: |
./tools/circle-ci/download-sstate-cache
- run:
name: Do build.
command: |
./tools/circle-ci/do-build
- persist_to_workspace:
root: /tmp/job
paths:
- project/build/tmp/deploy/images/<< parameters.machine >>/flash-<< parameters.machine >>*
- project/build/tmp/deploy/images/<< parameters.machine >>/*.tar.bz2
workflows:
version: 2
everything:
jobs:
- lint
- setup
- build:
name: build-<< matrix.machine >>
requires:
- setup
matrix:
parameters:
machine: [
angelslanding,
# bletchley, FIXME OOM errors in build
clearcreek,
cloudripper,
cmm,
elbert,
emeraldpools,
# fbgp2, Rocko
# fbtp, Rocko
# fbttn, Rocko
# fby2, Rocko
fby3,
fby35,
fuji,
# galaxy100, Rocko
grandcanyon,
grandteton,
greatlakes,
javaisland,
inspirationpoint,
halfdome,
janga,
# lightning, Rocko
tahan,
meru,
minipack,
morgan800cc,
northdome,
qemux86,
# wedge, Rocko
wedge100,
wedge400,
# yamp, Rocko
# yosemite, Rocko
]
- unit-test:
requires:
- build-qemux86
- qemu-cit:
name: qemu-cit-<< matrix.machine >>
requires:
- build-<< matrix.machine >>
matrix:
parameters:
machine: [
cloudripper,
cmm,
elbert,
# fbtp, Rocko
# fbttn, Rocko
# fby2, Rocko
fby3,
# fby35, FIXME cannot reach console T155505379
fuji,
minipack,
wedge400,
# yamp, Rocko
]