-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path.cirrus.yml
More file actions
212 lines (165 loc) · 5.48 KB
/
.cirrus.yml
File metadata and controls
212 lines (165 loc) · 5.48 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
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
## FreeBSD Build Jobs
# https://cirrus-ci.org/guide/tips-and-tricks/#sharing-configuration-between-tasks
freebsd_versions: &FREEBSD_VERSIONS
env:
FREEBSD_LEGACY: freebsd-13-5
FREEBSD_PRODUCTION: freebsd-14-3
FREEBSD_CURRENT: freebsd-15-0-amd64-ufs
# Build jobs
freebsd_template: &FREEBSD_ENV
environment:
APPEND_LIB: /usr/local/lib
APPEND_INCLUDES: /usr/local/include
CIRRUS_CLONE_DEPTH: 1
CIRRUS_LOG_TIMESTAMP: true
freebsd_template_latest: &FREEBSD_ENV_PRODUCTION
<< : *FREEBSD_VERSIONS
freebsd_instance:
image_family: $FREEBSD_PRODUCTION
<< : *FREEBSD_ENV
freebsd_configure_artifacts: &FREEBSD_CONFIGURE_ARTIFACTS
always:
rename_script:
- cp xen/.config xen-config
config_artifacts:
path: xen-config
type: text/plain
task:
name: 'FreeBSD: full build'
# It's not possible to use the matrix keyword in YAML aliases, as they
# keyword usage is restricted to task, docker_builder or pipe. Attempting to
# use a YAML alias with the duplicated keys doesn't work either. Use an env
# variable so the version can also be appended to the task alias.
<< : *FREEBSD_VERSIONS
env:
matrix:
FREEBSD_VERSION: $FREEBSD_LEGACY
FREEBSD_VERSION: $FREEBSD_PRODUCTION
FREEBSD_VERSION: $FREEBSD_CURRENT
alias: freebsd_full_$FREEBSD_VERSION
freebsd_instance:
image_family: $FREEBSD_VERSION
<< : *FREEBSD_ENV
install_script: pkg install -y seabios gmake ninja bash
pkgconf bison perl5
json-c lzo2 pixman argp-standalone
libxml2 glib git python3 libinotify
configure_script:
- cc --version
- ./configure --with-system-seabios=/usr/local/share/seabios/bios.bin
--with-extra-qemuu-configure-args="--extra-ldflags=-L${APPEND_LIB} --extra-cflags=-I${APPEND_INCLUDES}"
- gmake -j`sysctl -n hw.ncpu` -C xen clang=y defconfig
<< : *FREEBSD_CONFIGURE_ARTIFACTS
build_script:
- gmake -j`sysctl -n hw.ncpu` clang=y
xen_artifacts:
path: xen/xen
type: application/octet-stream
debug_artifacts:
path: xen/xen-syms
type: application/octet-stream
task:
name: 'FreeBSD: randconfig build'
# It's not possible to use the matrix keyword in YAML aliases, as they
# keyword usage is restricted to task, docker_builder or pipe. Attempting to
# use a YAML alias with the duplicated `image_family` keys doesn't work
# either. Abstract the version numbers at least.
<< : *FREEBSD_VERSIONS
freebsd_instance:
matrix:
image_family: $FREEBSD_LEGACY
image_family: $FREEBSD_PRODUCTION
image_family: $FREEBSD_CURRENT
<< : *FREEBSD_ENV
install_script: pkg install -y gmake python3 bison
configure_script:
- cc --version
- gmake -j`sysctl -n hw.ncpu` -C xen clang=y \
KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
<< : *FREEBSD_CONFIGURE_ARTIFACTS
build_script:
- gmake -j`sysctl -n hw.ncpu` build-xen clang=y
task:
name: 'FreeBSD: XTF build'
alias: xtf
<< : *FREEBSD_ENV_PRODUCTION
clone_script:
- pkg install -y git
- git clone --depth 1 https://xenbits.xen.org/git-http/xtf.git
install_script: pkg install -y gmake
build_script:
- cd xtf
- cc --version
- git rev-parse HEAD
- gmake -j`sysctl -n hw.ncpu` LLVM=y
xtf_artifacts:
path: xtf/tests/selftest/test-*-selftest
type: application/octet-stream
## macOS Build Jobs
task:
name: 'macOS: hypervisor build'
env:
matrix:
ARCH: x86_64
ARCH: aarch64
alias: macos-$ARCH
macos_instance:
image: ghcr.io/cirruslabs/macos-runner:sonoma
environment:
CIRRUS_CLONE_DEPTH: 1
CIRRUS_LOG_TIMESTAMP: true
install_script:
- brew install $ARCH-elf-gcc $ARCH-elf-binutils
build_script:
- make -j`sysctl -n hw.ncpu`
XEN_TARGET_ARCH=`echo $ARCH | sed -e s/aarch64/arm64/`
CROSS_COMPILE=$ARCH-elf- HOSTCC=clang -C xen
xen_artifacts:
path: xen/xen
type: application/octet-stream
debug_artifacts:
path: xen/xen-syms
type: application/octet-stream
## Test Jobs
task:
name: 'XTF selftest'
<< : *FREEBSD_ENV_PRODUCTION
env:
matrix:
BUILD: freebsd_full_$FREEBSD_LEGACY
BUILD: freebsd_full_$FREEBSD_PRODUCTION
BUILD: freebsd_full_$FREEBSD_CURRENT
BUILD: macos-x86_64
depends_on:
- $BUILD
- xtf
install_script: pkg install -y qemu-nox11 expect
env:
matrix:
XTF_ARCH: hvm32
XTF_ARCH: hvm32pae
XTF_ARCH: hvm32pse
XTF_ARCH: hvm64
XTF_ARCH: pv64
fetch_script:
- fetch https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/xtf/xtf.zip
- fetch https://api.cirrus-ci.com/v1/artifact/build/$CIRRUS_BUILD_ID/$BUILD/xen.zip
- unzip xtf.zip
- unzip xen.zip
test_script: |
case "$XTF_ARCH" in \
*hvm*) \
XEN_EXTRA_CMD="dom0=pvh dom0-iommu=none" \
;; \
esac
export TEST_CMD="qemu-system-x86_64 -kernel xen/xen -initrd xtf/tests/selftest/test-${XTF_ARCH}-selftest \
-append \"loglvl=all console=com1 noreboot console_timestamps=boot dom0=verbose ${XEN_EXTRA_CMD}\" \
-m 512 -nographic -monitor none -serial stdio"
export TEST_LOG="serial-${FREEBSD_BUILD}-${XTF_ARCH}.txt"
export PASSED="Test result: SUCCESS"
export TEST_TIMEOUT=120
./automation/scripts/console.exp 2>&1 | sed 's/\r\+$//'
always:
serial_artifacts:
path: serial-*.txt
type: text/plain