blob: 670bbc0e163621d7f11d03b728b9dd857e49b6a9 [file] [log] [blame]
Bin Mengd2e680f2019-10-27 05:19:48 -07001variables:
Tom Rini38a98402021-10-31 13:24:42 -04002 windows_vm: windows-2019
Bin Mengbf275222019-10-28 07:25:03 -07003 ubuntu_vm: ubuntu-18.04
Tom Rini7b4116d2020-05-26 20:39:03 -04004 macos_vm: macOS-10.15
Tom Rini99cffa22021-11-13 18:37:00 -05005 ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20211006-14Nov2021
Bin Mengbf275222019-10-28 07:25:03 -07006 # Add '-u 0' options for Azure pipelines, otherwise we get "permission
7 # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
8 # since our $(ci_runner_image) user is not root.
9 container_option: -u 0
10 work_dir: /u
Bin Mengd2e680f2019-10-27 05:19:48 -070011
12jobs:
13 - job: tools_only_windows
14 displayName: 'Ensure host tools build for Windows'
15 pool:
16 vmImage: $(windows_vm)
Bin Mengd2e680f2019-10-27 05:19:48 -070017 steps:
Bin Meng437e70f2020-07-28 02:06:44 -070018 - powershell: |
Bin Meng1ce892c2021-06-22 07:33:21 +080019 (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2021-06-04/msys2-base-x86_64-20210604.sfx.exe", "sfx.exe")
Bin Mengd2e680f2019-10-27 05:19:48 -070020 displayName: 'Install MSYS2'
21 - script: |
Bin Meng437e70f2020-07-28 02:06:44 -070022 sfx.exe -y -o%CD:~0,2%\
Bin Mengf7faddf2020-07-28 02:06:42 -070023 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyuu"
Bin Mengd2e680f2019-10-27 05:19:48 -070024 displayName: 'Update MSYS2'
25 - script: |
Tom Rini94d66d82021-03-26 15:14:14 -040026 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel"
Bin Mengd2e680f2019-10-27 05:19:48 -070027 displayName: 'Install Toolchain'
28 - script: |
Bin Mengd2e680f2019-10-27 05:19:48 -070029 echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh
Bin Mengf7faddf2020-07-28 02:06:42 -070030 %CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh"
Bin Mengd2e680f2019-10-27 05:19:48 -070031 displayName: 'Build Host Tools'
32 env:
33 # Tell MSYS2 we need a POSIX emulation layer
34 MSYSTEM: MSYS
35 # Tell MSYS2 not to ‘cd’ our startup directory to HOME
36 CHERE_INVOKING: yes
Bin Mengbf275222019-10-28 07:25:03 -070037
Tom Rini7b4116d2020-05-26 20:39:03 -040038 - job: tools_only_macOS
39 displayName: 'Ensure host tools build for macOS X'
40 pool:
41 vmImage: $(macos_vm)
42 steps:
43 - script: brew install make
44 displayName: Brew install dependencies
45 - script: |
46 gmake tools-only_config tools-only NO_SDL=1 \
47 HOSTCFLAGS="-I/usr/local/opt/openssl@1.1/include" \
48 HOSTLDFLAGS="-L/usr/local/opt/openssl@1.1/lib" \
49 -j$(sysctl -n hw.logicalcpu)
50 displayName: 'Perform tools-only build'
51
Tom Rinic1a7de52021-12-14 13:36:41 -050052 - job: check_for_migrated_symbols_in_board_header
53 displayName: 'Check for migrated symbols in board header'
54 pool:
55 vmImage: $(ubuntu_vm)
56 container:
57 image: $(ci_runner_image)
58 options: $(container_option)
59 steps:
60 - script: |
61 KSYMLST=`mktemp`
62 KUSEDLST=`mktemp`
63 cat `find . -name "Kconfig*"` | \
64 sed -n -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
65 -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
66 | sort -u > $KSYMLST
67 for CFG in `find include/configs -name "*.h"`; do
68 grep '#define[[:blank:]]CONFIG_' $CFG | \
69 sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' | \
70 sort -u > ${KUSEDLST} || true
71 NUM=`comm -12 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} | \
72 cut -d , -f 3`
73 if [[ $NUM -ne 0 ]]; then
74 echo "Unmigrated symbols found in $CFG"
75 exit 1
76 fi
77 done
78
Bin Mengbf275222019-10-28 07:25:03 -070079 - job: cppcheck
80 displayName: 'Static code analysis with cppcheck'
81 pool:
82 vmImage: $(ubuntu_vm)
83 container:
84 image: $(ci_runner_image)
85 options: $(container_option)
86 steps:
Simon Glass4ee7f522020-04-05 14:35:43 -060087 - script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
Bin Mengbf275222019-10-28 07:25:03 -070088
Heinrich Schuchardt4eb0fc92020-02-21 18:24:02 +010089 - job: htmldocs
90 displayName: 'Build HTML documentation'
91 pool:
92 vmImage: $(ubuntu_vm)
93 container:
94 image: $(ci_runner_image)
95 options: $(container_option)
96 steps:
Heinrich Schuchardt836049d2021-01-25 22:06:25 +010097 - script: |
98 virtualenv -p /usr/bin/python3 /tmp/venvhtml
99 . /tmp/venvhtml/bin/activate
100 pip install -r doc/sphinx/requirements.txt
101 make htmldocs
Heinrich Schuchardt4eb0fc92020-02-21 18:24:02 +0100102
Bin Mengbf275222019-10-28 07:25:03 -0700103 - job: todo
104 displayName: 'Search for TODO within source tree'
105 pool:
106 vmImage: $(ubuntu_vm)
107 container:
108 image: $(ci_runner_image)
109 options: $(container_option)
110 steps:
111 - script: grep -r TODO .
112 - script: grep -r FIXME .
113 - script: grep -r HACK . | grep -v HACKKIT
114
115 - job: sloccount
116 displayName: 'Some statistics about the code base'
117 pool:
118 vmImage: $(ubuntu_vm)
119 container:
120 image: $(ci_runner_image)
121 options: $(container_option)
122 steps:
123 - script: sloccount .
124
125 - job: maintainers
126 displayName: 'Ensure all configs have MAINTAINERS entries'
127 pool:
128 vmImage: $(ubuntu_vm)
129 container:
130 image: $(ci_runner_image)
131 options: $(container_option)
132 steps:
133 - script: |
134 if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
135
136 - job: tools_only
137 displayName: 'Ensure host tools build'
138 pool:
139 vmImage: $(ubuntu_vm)
140 container:
141 image: $(ci_runner_image)
142 options: $(container_option)
143 steps:
144 - script: |
145 make tools-only_config tools-only -j$(nproc)
146
147 - job: envtools
148 displayName: 'Ensure env tools build'
149 pool:
150 vmImage: $(ubuntu_vm)
151 container:
152 image: $(ci_runner_image)
153 options: $(container_option)
154 steps:
155 - script: |
156 make tools-only_config envtools -j$(nproc)
157
158 - job: utils
Tom Rini72618332020-03-11 18:11:15 -0400159 displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites'
Bin Mengbf275222019-10-28 07:25:03 -0700160 pool:
161 vmImage: $(ubuntu_vm)
162 steps:
163 - script: |
164 cat << EOF > build.sh
165 set -ex
166 cd ${WORK_DIR}
167 EOF
168 cat << "EOF" >> build.sh
169 git config --global user.name "Azure Pipelines"
170 git config --global user.email bmeng.cn@gmail.com
171 export USER=azure
Tom Rini26a426a2020-02-11 12:41:14 -0500172 virtualenv -p /usr/bin/python3 /tmp/venv
Bin Mengbf275222019-10-28 07:25:03 -0700173 . /tmp/venv/bin/activate
Tom Rini38229b52021-02-26 07:52:29 -0500174 pip install -r test/py/requirements.txt
Simon Glassbf0a8132020-03-18 09:42:50 -0600175 export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
Bin Mengbf275222019-10-28 07:25:03 -0700176 export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
177 export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
Simon Glassa0ac1d92021-03-22 08:22:53 +1300178 ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
Bin Mengbf275222019-10-28 07:25:03 -0700179 ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
180 ./tools/buildman/buildman -t
181 ./tools/dtoc/dtoc -t
Simon Glass6bb74de2020-07-05 21:41:55 -0600182 ./tools/patman/patman test
Tom Rini72618332020-03-11 18:11:15 -0400183 make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
Bin Mengbf275222019-10-28 07:25:03 -0700184 EOF
185 cat build.sh
186 # We cannot use "container" like other jobs above, as buildman
187 # seems to hang forever with pre-configured "container" environment
188 docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
189
Pali Rohár6cfd09d2020-05-17 14:38:22 +0200190 - job: nokia_rx51_test
191 displayName: 'Run tests for Nokia RX-51 (aka N900)'
192 pool:
193 vmImage: $(ubuntu_vm)
194 container:
195 image: $(ci_runner_image)
196 options: $(container_option)
197 steps:
198 - script: |
Tom Rinie2d6a772021-10-14 22:21:29 -0400199 export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
Pali Rohár6cfd09d2020-05-17 14:38:22 +0200200 test/nokia_rx51_test.sh
201
Bin Mengbf275222019-10-28 07:25:03 -0700202 - job: test_py
203 displayName: 'test.py'
204 pool:
205 vmImage: $(ubuntu_vm)
206 strategy:
207 matrix:
208 sandbox:
209 TEST_PY_BD: "sandbox"
Tom Rini0219d012019-11-06 19:30:47 -0500210 sandbox_clang:
211 TEST_PY_BD: "sandbox"
Tom Rini927e0ee2021-10-05 13:51:38 -0400212 OVERRIDE: "-O clang-13"
Bin Mengbf275222019-10-28 07:25:03 -0700213 sandbox_spl:
214 TEST_PY_BD: "sandbox_spl"
Simon Glassafb26ba2020-10-25 20:38:36 -0600215 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
Simon Glass6c914e42021-03-15 17:25:34 +1300216 sandbox_noinst:
217 TEST_PY_BD: "sandbox_noinst"
218 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
Bin Mengbf275222019-10-28 07:25:03 -0700219 sandbox_flattree:
220 TEST_PY_BD: "sandbox_flattree"
Bin Mengbf275222019-10-28 07:25:03 -0700221 evb_ast2500:
222 TEST_PY_BD: "evb-ast2500"
223 TEST_PY_ID: "--id qemu"
Kristian Amlie15e30102021-09-07 08:37:51 +0200224 vexpress_ca9x4:
225 TEST_PY_BD: "vexpress_ca9x4"
226 TEST_PY_ID: "--id qemu"
Bin Mengbf275222019-10-28 07:25:03 -0700227 integratorcp_cm926ejs:
228 TEST_PY_BD: "integratorcp_cm926ejs"
229 TEST_PY_ID: "--id qemu"
230 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700231 qemu_arm:
232 TEST_PY_BD: "qemu_arm"
233 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700234 qemu_arm64:
235 TEST_PY_BD: "qemu_arm64"
236 TEST_PY_TEST_SPEC: "not sleep"
Daniel Schwierzecke35c2a82020-06-06 22:21:47 +0200237 qemu_malta:
238 TEST_PY_BD: "malta"
239 TEST_PY_ID: "--id qemu"
240 TEST_PY_TEST_SPEC: "not sleep and not efi"
241 qemu_maltael:
242 TEST_PY_BD: "maltael"
243 TEST_PY_ID: "--id qemu"
244 TEST_PY_TEST_SPEC: "not sleep and not efi"
245 qemu_malta64:
246 TEST_PY_BD: "malta64"
247 TEST_PY_ID: "--id qemu"
248 TEST_PY_TEST_SPEC: "not sleep and not efi"
249 qemu_malta64el:
250 TEST_PY_BD: "malta64el"
251 TEST_PY_ID: "--id qemu"
252 TEST_PY_TEST_SPEC: "not sleep and not efi"
Bin Mengbf275222019-10-28 07:25:03 -0700253 qemu_ppce500:
254 TEST_PY_BD: "qemu-ppce500"
255 TEST_PY_TEST_SPEC: "not sleep"
Bin Menga379d332020-03-28 07:25:27 -0700256 qemu_riscv32:
257 TEST_PY_BD: "qemu-riscv32"
258 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700259 qemu_riscv64:
260 TEST_PY_BD: "qemu-riscv64"
261 TEST_PY_TEST_SPEC: "not sleep"
Bin Meng49fb28a2020-03-28 07:25:29 -0700262 qemu_riscv32_spl:
263 TEST_PY_BD: "qemu-riscv32_spl"
264 TEST_PY_TEST_SPEC: "not sleep"
Bin Meng49fb28a2020-03-28 07:25:29 -0700265 qemu_riscv64_spl:
266 TEST_PY_BD: "qemu-riscv64_spl"
267 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700268 qemu_x86:
269 TEST_PY_BD: "qemu-x86"
270 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700271 qemu_x86_64:
272 TEST_PY_BD: "qemu-x86_64"
273 TEST_PY_TEST_SPEC: "not sleep"
Marek Vasut0e125752020-09-14 21:55:58 +0200274 r2dplus_i82557c:
275 TEST_PY_BD: "r2dplus"
276 TEST_PY_ID: "--id i82557c_qemu"
277 r2dplus_pcnet:
278 TEST_PY_BD: "r2dplus"
279 TEST_PY_ID: "--id pcnet_qemu"
280 r2dplus_rtl8139:
281 TEST_PY_BD: "r2dplus"
282 TEST_PY_ID: "--id rtl8139_qemu"
283 r2dplus_tulip:
284 TEST_PY_BD: "r2dplus"
285 TEST_PY_ID: "--id tulip_qemu"
Bin Meng0e60b3a2021-08-26 23:33:35 +0800286 sifive_unleashed_sdcard:
287 TEST_PY_BD: "sifive_unleashed"
288 TEST_PY_ID: "--id sdcard_qemu"
289 sifive_unleashed_spi-nor:
290 TEST_PY_BD: "sifive_unleashed"
291 TEST_PY_ID: "--id spi-nor_qemu"
Michal Simekf7c6ee72020-02-13 15:03:29 +0100292 xilinx_zynq_virt:
293 TEST_PY_BD: "xilinx_zynq_virt"
Bin Mengbf275222019-10-28 07:25:03 -0700294 TEST_PY_ID: "--id qemu"
295 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700296 xilinx_versal_virt:
297 TEST_PY_BD: "xilinx_versal_virt"
298 TEST_PY_ID: "--id qemu"
299 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700300 xtfpga:
301 TEST_PY_BD: "xtfpga"
302 TEST_PY_ID: "--id qemu"
303 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengbf275222019-10-28 07:25:03 -0700304 steps:
305 - script: |
306 cat << EOF > test.sh
307 set -ex
308 # make environment variables available as tests are running inside a container
309 export WORK_DIR="${WORK_DIR}"
310 export TEST_PY_BD="${TEST_PY_BD}"
311 export TEST_PY_ID="${TEST_PY_ID}"
312 export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}"
Tom Rini0219d012019-11-06 19:30:47 -0500313 export OVERRIDE="${OVERRIDE}"
Bin Mengbf275222019-10-28 07:25:03 -0700314 EOF
315 cat << "EOF" >> test.sh
316 # the below corresponds to .gitlab-ci.yml "before_script"
317 cd ${WORK_DIR}
Tom Rini85ae52b2021-02-24 17:05:04 -0500318 git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
Bin Mengbf275222019-10-28 07:25:03 -0700319 ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
320 ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
Bin Mengbf275222019-10-28 07:25:03 -0700321 grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
322 grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
Bin Meng49fb28a2020-03-28 07:25:29 -0700323 if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
Heinrich Schuchardtb6b35fd2021-04-02 11:42:01 +0200324 wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
325 export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
Bin Meng49fb28a2020-03-28 07:25:29 -0700326 fi
Bin Meng0e60b3a2021-08-26 23:33:35 +0800327 if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
Heinrich Schuchardtb6b35fd2021-04-02 11:42:01 +0200328 wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
329 export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
Bin Meng49fb28a2020-03-28 07:25:29 -0700330 fi
Bin Mengbf275222019-10-28 07:25:03 -0700331 # the below corresponds to .gitlab-ci.yml "script"
332 cd ${WORK_DIR}
Simon Glass4e32fed2020-03-18 09:42:55 -0600333 export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD};
Simon Glass7ec12552020-03-18 09:43:00 -0600334 tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE}
Heinrich Schuchardt9e0f5ea2020-07-14 00:40:19 +0200335 cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/
336 cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
337 cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi
Heinrich Schuchardt9e0f5ea2020-07-14 00:40:19 +0200338 cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi
339 cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi
Bin Meng0e60b3a2021-08-26 23:33:35 +0800340 # create sdcard / spi-nor images for sifive unleashed using genimage
341 if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
342 mkdir -p root;
343 cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
344 cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
345 rm -rf tmp;
346 genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
347 cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
348 rm -rf tmp;
349 genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
350 cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
351 fi
Tom Rini5d80a1a2019-10-31 10:45:03 -0400352 virtualenv -p /usr/bin/python3 /tmp/venv
353 . /tmp/venv/bin/activate
354 pip install -r test/py/requirements.txt
Tom Rini5d6f0532019-11-01 13:59:14 -0400355 export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
Bin Mengbf275222019-10-28 07:25:03 -0700356 export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
Simon Glass4080d092020-03-18 09:42:56 -0600357 # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
Heinrich Schuchardtf3092472020-07-10 22:04:40 +0200358 ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
Bin Mengbf275222019-10-28 07:25:03 -0700359 # the below corresponds to .gitlab-ci.yml "after_script"
Tom Rini6049d512020-02-07 11:45:55 -0500360 rm -rf /tmp/uboot-test-hooks /tmp/venv
Bin Mengbf275222019-10-28 07:25:03 -0700361 EOF
362 cat test.sh
363 # make current directory writeable to uboot user inside the container
364 # as sandbox testing need create files like spi flash images, etc.
365 # (TODO: clean up this in the future)
366 chmod 777 .
Alper Nebi Yasake22ec9c2021-06-21 21:51:56 +0300367 # Filesystem tests need extra docker args to run
368 set --
369 if [[ "${TEST_PY_BD}" == "sandbox" ]]; then
370 # mount -o loop needs the loop devices
371 if modprobe loop; then
372 for d in $(find /dev -maxdepth 1 -name 'loop*'); do
373 set -- "$@" --device $d:$d
374 done
375 fi
376 # Needed for mount syscall (for guestmount as well)
377 set -- "$@" --cap-add SYS_ADMIN
378 # Default apparmor profile denies mounts
379 set -- "$@" --security-opt apparmor=unconfined
380 fi
Alper Nebi Yasak1aaaf602021-06-21 21:51:55 +0300381 # Some tests using libguestfs-tools need the fuse device to run
Alper Nebi Yasake22ec9c2021-06-21 21:51:56 +0300382 docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
Bin Mengbf275222019-10-28 07:25:03 -0700383
384 - job: build_the_world
385 displayName: 'Build the World'
386 pool:
387 vmImage: $(ubuntu_vm)
388 strategy:
389 # Use almost the same target division in .travis.yml, only merged
390 # 4 small build jobs (arc/microblaze/nds32/xtensa) into one.
391 matrix:
392 arc_microblaze_nds32_xtensa:
393 BUILDMAN: "arc microblaze nds32 xtensa"
394 arm11_arm7_arm920t_arm946es:
395 BUILDMAN: "arm11 arm7 arm920t arm946es"
396 arm926ejs:
Tom Rini5bda1872021-07-08 07:50:08 -0400397 BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,omap"
Bin Mengbf275222019-10-28 07:25:03 -0700398 at91_non_armv7:
399 BUILDMAN: "at91 -x armv7"
400 at91_non_arm926ejs:
401 BUILDMAN: "at91 -x arm926ejs"
402 boundary_engicam_toradex:
403 BUILDMAN: "boundary engicam toradex"
404 arm_bcm:
405 BUILDMAN: "bcm -x mips"
406 nxp_arm32:
Heiko Schocheraf771622019-11-22 11:17:29 +0100407 BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216"
408 nxp_ls101x:
409 BUILDMAN: "freescale&ls101"
410 nxp_ls102x:
411 BUILDMAN: "freescale&ls102"
412 nxp_ls104x:
413 BUILDMAN: "freescale&ls104"
414 nxp_ls108x:
415 BUILDMAN: "freescale&ls108"
416 nxp_ls20xx:
417 BUILDMAN: "freescale&ls20"
418 nxp_lx216x:
419 BUILDMAN: "freescale&lx216"
Bin Mengbf275222019-10-28 07:25:03 -0700420 imx6:
421 BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
422 imx:
423 BUILDMAN: "mx -x mx6,freescale,technexion,toradex"
Tom Rini5ea605c2021-07-27 17:01:28 -0400424 imx8:
425 BUILDMAN: "imx8"
Bin Mengbf275222019-10-28 07:25:03 -0700426 keystone2_keystone3:
427 BUILDMAN: "k2 k3"
428 samsung_socfpga:
429 BUILDMAN: "samsung socfpga"
Bin Mengbf275222019-10-28 07:25:03 -0700430 sun4i:
431 BUILDMAN: "sun4i"
432 sun5i:
433 BUILDMAN: "sun5i"
434 sun6i:
435 BUILDMAN: "sun6i"
436 sun7i:
437 BUILDMAN: "sun7i"
438 sun8i_32bit:
439 BUILDMAN: "sun8i&armv7"
440 sun8i_64bit:
441 BUILDMAN: "sun8i&aarch64"
442 sun9i:
443 BUILDMAN: "sun9i"
444 sun50i:
445 BUILDMAN: "sun50i"
446 arm_catch_all:
Tom Rini31289c72021-02-15 10:52:19 -0500447 BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,renesas,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq"
Bin Mengbf275222019-10-28 07:25:03 -0700448 sandbox_x86:
449 BUILDMAN: "sandbox x86"
450 technexion:
451 BUILDMAN: "technexion"
452 kirkwood:
453 BUILDMAN: "kirkwood"
454 mvebu:
455 BUILDMAN: "mvebu"
456 m68k:
457 BUILDMAN: "m68k"
458 mips:
459 BUILDMAN: "mips"
460 non_fsl_ppc:
461 BUILDMAN: "powerpc -x freescale"
462 mpc85xx_freescale:
Simon Glass4a753fb2021-08-01 18:54:42 -0600463 BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*"
Bin Mengbf275222019-10-28 07:25:03 -0700464 t208xrdb_corenet_ds:
465 BUILDMAN: "t208xrdb corenet_ds"
466 fsl_ppc:
Simon Glass4a753fb2021-08-01 18:54:42 -0600467 BUILDMAN: "mpc83xx&freescale"
Bin Mengbf275222019-10-28 07:25:03 -0700468 t102x:
469 BUILDMAN: "t102*"
470 p1_p2_rdb_pc:
471 BUILDMAN: "p1_p2_rdb_pc"
472 p1010rdb_bsc91:
473 BUILDMAN: "p1010rdb bsc91"
474 siemens:
475 BUILDMAN: "siemens"
476 tegra:
477 BUILDMAN: "tegra -x toradex"
478 am33xx_no_siemens:
479 BUILDMAN: "am33xx -x siemens"
480 omap:
481 BUILDMAN: "omap"
482 uniphier:
483 BUILDMAN: "uniphier"
484 aarch64_catch_all:
Tom Rini5ea605c2021-07-27 17:01:28 -0400485 BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
Bin Mengbf275222019-10-28 07:25:03 -0700486 rockchip:
Tom Rini2d4cd122020-03-09 13:01:57 -0400487 BUILDMAN: "rk"
Tom Rini31289c72021-02-15 10:52:19 -0500488 renesas:
489 BUILDMAN: "renesas"
Bin Mengbf275222019-10-28 07:25:03 -0700490 zynq:
491 BUILDMAN: "zynq&armv7"
492 zynqmp_versal:
493 BUILDMAN: "versal|zynqmp&aarch64"
494 riscv:
495 BUILDMAN: "riscv"
496 steps:
497 - script: |
498 cat << EOF > build.sh
499 set -ex
500 cd ${WORK_DIR}
501 # make environment variables available as tests are running inside a container
502 export BUILDMAN="${BUILDMAN}"
503 EOF
504 cat << "EOF" >> build.sh
505 if [[ "${BUILDMAN}" != "" ]]; then
506 ret=0;
Bin Mengaa8544e2021-01-31 16:38:35 +0800507 tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
Simon Glassdd5c9542020-03-18 09:42:57 -0600508 if [[ $ret -ne 0 ]]; then
Simon Glassb52f5a12020-03-18 09:42:53 -0600509 tools/buildman/buildman -o /tmp -seP ${BUILDMAN};
Bin Mengbf275222019-10-28 07:25:03 -0700510 exit $ret;
511 fi;
512 fi
513 EOF
514 cat build.sh
515 docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh