Blame view

.azure-pipelines.yml 18.8 KB
d2e680fa5   Bin Meng   Add Microsoft Azu...
1
  variables:
38a9840d9   Tom Rini   Azure: Move to wi...
2
    windows_vm: windows-2019
bf275222a   Bin Meng   Bring all testing...
3
    ubuntu_vm: ubuntu-18.04
7b4116d44   Tom Rini   Azure: Add 'tools...
4
    macos_vm: macOS-10.15
9d358a8c2   Tom Rini   CI, Dockerfile: U...
5
    ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20220105-10Jan2022
bf275222a   Bin Meng   Bring all testing...
6
7
8
9
10
    # Add '-u 0' options for Azure pipelines, otherwise we get "permission
    # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer",
    # since our $(ci_runner_image) user is not root.
    container_option: -u 0
    work_dir: /u
d2e680fa5   Bin Meng   Add Microsoft Azu...
11

67d3e67dd   Tom Rini   ci: azure: Update...
12
13
14
  stages:
  - stage: testsuites
    jobs:
d2e680fa5   Bin Meng   Add Microsoft Azu...
15
16
17
18
    - job: tools_only_windows
      displayName: 'Ensure host tools build for Windows'
      pool:
        vmImage: $(windows_vm)
d2e680fa5   Bin Meng   Add Microsoft Azu...
19
      steps:
437e70f7c   Bin Meng   azure: Switch to ...
20
        - powershell: |
1ce892cb1   Bin Meng   azure: Use msys2 ...
21
            (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")
d2e680fa5   Bin Meng   Add Microsoft Azu...
22
23
          displayName: 'Install MSYS2'
        - script: |
437e70f7c   Bin Meng   azure: Switch to ...
24
            sfx.exe -y -o%CD:~0,2%\
f7faddf63   Bin Meng   azure: Drop 32-bi...
25
            %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyuu"
d2e680fa5   Bin Meng   Add Microsoft Azu...
26
27
          displayName: 'Update MSYS2'
        - script: |
94d66d8b2   Tom Rini   Azure: Use "pacma...
28
            %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel"
d2e680fa5   Bin Meng   Add Microsoft Azu...
29
30
          displayName: 'Install Toolchain'
        - script: |
d2e680fa5   Bin Meng   Add Microsoft Azu...
31
            echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh
f7faddf63   Bin Meng   azure: Drop 32-bi...
32
            %CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh"
d2e680fa5   Bin Meng   Add Microsoft Azu...
33
34
35
36
37
38
          displayName: 'Build Host Tools'
          env:
            # Tell MSYS2 we need a POSIX emulation layer
            MSYSTEM: MSYS
            # Tell MSYS2 not to ‘cd’ our startup directory to HOME
            CHERE_INVOKING: yes
bf275222a   Bin Meng   Bring all testing...
39

7b4116d44   Tom Rini   Azure: Add 'tools...
40
41
42
43
44
45
46
47
48
49
50
51
52
    - job: tools_only_macOS
      displayName: 'Ensure host tools build for macOS X'
      pool:
        vmImage: $(macos_vm)
      steps:
        - script: brew install make
          displayName: Brew install dependencies
        - script: |
            gmake tools-only_config tools-only NO_SDL=1 \
              HOSTCFLAGS="-I/usr/local/opt/openssl@1.1/include" \
              HOSTLDFLAGS="-L/usr/local/opt/openssl@1.1/lib" \
              -j$(sysctl -n hw.logicalcpu)
          displayName: 'Perform tools-only build'
c1a7de570   Tom Rini   CI: Test for unmi...
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
    - job: check_for_migrated_symbols_in_board_header
      displayName: 'Check for migrated symbols in board header'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: |
            KSYMLST=`mktemp`
            KUSEDLST=`mktemp`
            cat `find . -name "Kconfig*"` | \
               sed -n -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
               -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
               | sort -u > $KSYMLST
            for CFG in `find include/configs -name "*.h"`; do
               grep '#define[[:blank:]]CONFIG_' $CFG | \
                  sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' | \
                  sort -u > ${KUSEDLST} || true
               NUM=`comm -12 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} | \
                  cut -d , -f 3`
               if [[ $NUM -ne 0 ]]; then
                  echo "Unmigrated symbols found in $CFG"
                  exit 1
               fi
            done
bf275222a   Bin Meng   Bring all testing...
79
80
81
82
83
84
85
86
    - job: cppcheck
      displayName: 'Static code analysis with cppcheck'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
4ee7f5278   Simon Glass   travis/gitlab/azu...
87
        - script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
bf275222a   Bin Meng   Bring all testing...
88

4eb0fc996   Heinrich Schuchardt   azure: build HTML...
89
90
91
92
93
94
95
96
    - job: htmldocs
      displayName: 'Build HTML documentation'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
836049d63   Heinrich Schuchardt   .gitlab-ci: insta...
97
98
99
100
101
        - script: |
            virtualenv -p /usr/bin/python3 /tmp/venvhtml
            . /tmp/venvhtml/bin/activate
            pip install -r doc/sphinx/requirements.txt
            make htmldocs
4eb0fc996   Heinrich Schuchardt   azure: build HTML...
102

bf275222a   Bin Meng   Bring all testing...
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
    - job: todo
      displayName: 'Search for TODO within source tree'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: grep -r TODO .
        - script: grep -r FIXME .
        - script: grep -r HACK . | grep -v HACKKIT
  
    - job: sloccount
      displayName: 'Some statistics about the code base'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: sloccount .
  
    - job: maintainers
      displayName: 'Ensure all configs have MAINTAINERS entries'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: |
            if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
  
    - job: tools_only
      displayName: 'Ensure host tools build'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: |
            make tools-only_config tools-only -j$(nproc)
  
    - job: envtools
      displayName: 'Ensure env tools build'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: |
            make tools-only_config envtools -j$(nproc)
  
    - job: utils
7261833f3   Tom Rini   Azure / GitLab / ...
159
      displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites'
bf275222a   Bin Meng   Bring all testing...
160
161
162
163
164
165
166
167
168
169
170
171
      pool:
        vmImage: $(ubuntu_vm)
      steps:
        - script: |
            cat << EOF > build.sh
            set -ex
            cd ${WORK_DIR}
            EOF
            cat << "EOF" >> build.sh
            git config --global user.name "Azure Pipelines"
            git config --global user.email bmeng.cn@gmail.com
            export USER=azure
26a426a10   Tom Rini   travis/gitlab/azu...
172
            virtualenv -p /usr/bin/python3 /tmp/venv
bf275222a   Bin Meng   Bring all testing...
173
            . /tmp/venv/bin/activate
38229b55d   Tom Rini   Azure/GitLab: Ens...
174
            pip install -r test/py/requirements.txt
bf0a81330   Simon Glass   gitlab/azure: Use...
175
            export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
bf275222a   Bin Meng   Bring all testing...
176
177
            export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
            export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
a0ac1d903   Simon Glass   azure: Use --boar...
178
            ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
bf275222a   Bin Meng   Bring all testing...
179
180
181
            ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
            ./tools/buildman/buildman -t
            ./tools/dtoc/dtoc -t
6bb74de7e   Simon Glass   patman: Add a 'te...
182
            ./tools/patman/patman test
7261833f3   Tom Rini   Azure / GitLab / ...
183
            make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
bf275222a   Bin Meng   Bring all testing...
184
185
186
187
188
            EOF
            cat build.sh
            # We cannot use "container" like other jobs above, as buildman
            # seems to hang forever with pre-configured "container" environment
            docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
6cfd09d4e   Pali Rohár   Nokia RX-51: Add ...
189
190
191
192
193
194
195
196
197
    - job: nokia_rx51_test
      displayName: 'Run tests for Nokia RX-51 (aka N900)'
      pool:
        vmImage: $(ubuntu_vm)
      container:
        image: $(ci_runner_image)
        options: $(container_option)
      steps:
        - script: |
e2d6a77a8   Tom Rini   CI: Switch runnin...
198
            export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
6cfd09d4e   Pali Rohár   Nokia RX-51: Add ...
199
            test/nokia_rx51_test.sh
67d3e67dd   Tom Rini   ci: azure: Update...
200
201
  - stage: test_py
    jobs:
bf275222a   Bin Meng   Bring all testing...
202
203
204
205
206
207
208
209
    - job: test_py
      displayName: 'test.py'
      pool:
        vmImage: $(ubuntu_vm)
      strategy:
        matrix:
          sandbox:
            TEST_PY_BD: "sandbox"
0219d014a   Tom Rini   gitlab/azure: Ena...
210
211
          sandbox_clang:
            TEST_PY_BD: "sandbox"
927e0eedf   Tom Rini   CI: Update to LLV...
212
            OVERRIDE: "-O clang-13"
bf275222a   Bin Meng   Bring all testing...
213
214
          sandbox_spl:
            TEST_PY_BD: "sandbox_spl"
afb26ba9a   Simon Glass   Azure/GitLab/Trav...
215
            TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
6c914e423   Simon Glass   azure/gitlab: Add...
216
217
218
          sandbox_noinst:
            TEST_PY_BD: "sandbox_noinst"
            TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
bf275222a   Bin Meng   Bring all testing...
219
220
          sandbox_flattree:
            TEST_PY_BD: "sandbox_flattree"
bf275222a   Bin Meng   Bring all testing...
221
222
223
          evb_ast2500:
            TEST_PY_BD: "evb-ast2500"
            TEST_PY_ID: "--id qemu"
15e30106c   Kristian Amlie   ARM: vexpress_ca9...
224
225
226
          vexpress_ca9x4:
            TEST_PY_BD: "vexpress_ca9x4"
            TEST_PY_ID: "--id qemu"
bf275222a   Bin Meng   Bring all testing...
227
228
229
230
          integratorcp_cm926ejs:
            TEST_PY_BD: "integratorcp_cm926ejs"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
231
232
233
          qemu_arm:
            TEST_PY_BD: "qemu_arm"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
234
235
236
          qemu_arm64:
            TEST_PY_BD: "qemu_arm64"
            TEST_PY_TEST_SPEC: "not sleep"
e35c2a8fd   Daniel Schwierzeck   .azure-pipelines....
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
          qemu_malta:
            TEST_PY_BD: "malta"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep and not efi"
          qemu_maltael:
            TEST_PY_BD: "maltael"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep and not efi"
          qemu_malta64:
            TEST_PY_BD: "malta64"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep and not efi"
          qemu_malta64el:
            TEST_PY_BD: "malta64el"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep and not efi"
bf275222a   Bin Meng   Bring all testing...
253
254
255
          qemu_ppce500:
            TEST_PY_BD: "qemu-ppce500"
            TEST_PY_TEST_SPEC: "not sleep"
a379d330a   Bin Meng   azure/gitlab/trav...
256
257
258
          qemu_riscv32:
            TEST_PY_BD: "qemu-riscv32"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
259
260
261
          qemu_riscv64:
            TEST_PY_BD: "qemu-riscv64"
            TEST_PY_TEST_SPEC: "not sleep"
49fb28a4b   Bin Meng   azure/gitlab/trav...
262
263
264
          qemu_riscv32_spl:
            TEST_PY_BD: "qemu-riscv32_spl"
            TEST_PY_TEST_SPEC: "not sleep"
49fb28a4b   Bin Meng   azure/gitlab/trav...
265
266
267
          qemu_riscv64_spl:
            TEST_PY_BD: "qemu-riscv64_spl"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
268
269
270
          qemu_x86:
            TEST_PY_BD: "qemu-x86"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
271
272
273
          qemu_x86_64:
            TEST_PY_BD: "qemu-x86_64"
            TEST_PY_TEST_SPEC: "not sleep"
0e1257564   Marek Vasut   Azure/GitLab/Trav...
274
275
276
277
278
279
280
281
282
283
284
285
          r2dplus_i82557c:
            TEST_PY_BD: "r2dplus"
            TEST_PY_ID: "--id i82557c_qemu"
          r2dplus_pcnet:
            TEST_PY_BD: "r2dplus"
            TEST_PY_ID: "--id pcnet_qemu"
          r2dplus_rtl8139:
            TEST_PY_BD: "r2dplus"
            TEST_PY_ID: "--id rtl8139_qemu"
          r2dplus_tulip:
            TEST_PY_BD: "r2dplus"
            TEST_PY_ID: "--id tulip_qemu"
0e60b3a71   Bin Meng   azure/gitlab: Add...
286
287
288
289
290
291
          sifive_unleashed_sdcard:
            TEST_PY_BD: "sifive_unleashed"
            TEST_PY_ID: "--id sdcard_qemu"
          sifive_unleashed_spi-nor:
            TEST_PY_BD: "sifive_unleashed"
            TEST_PY_ID: "--id spi-nor_qemu"
f7c6ee7fe   Michal Simek   ARM: zynq: Switch...
292
293
          xilinx_zynq_virt:
            TEST_PY_BD: "xilinx_zynq_virt"
bf275222a   Bin Meng   Bring all testing...
294
295
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
296
297
298
299
          xilinx_versal_virt:
            TEST_PY_BD: "xilinx_versal_virt"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
300
301
302
303
          xtfpga:
            TEST_PY_BD: "xtfpga"
            TEST_PY_ID: "--id qemu"
            TEST_PY_TEST_SPEC: "not sleep"
bf275222a   Bin Meng   Bring all testing...
304
305
306
307
308
309
310
311
312
      steps:
        - script: |
            cat << EOF > test.sh
            set -ex
            # make environment variables available as tests are running inside a container
            export WORK_DIR="${WORK_DIR}"
            export TEST_PY_BD="${TEST_PY_BD}"
            export TEST_PY_ID="${TEST_PY_ID}"
            export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}"
0219d014a   Tom Rini   gitlab/azure: Ena...
313
            export OVERRIDE="${OVERRIDE}"
bf275222a   Bin Meng   Bring all testing...
314
315
316
317
            EOF
            cat << "EOF" >> test.sh
            # the below corresponds to .gitlab-ci.yml "before_script"
            cd ${WORK_DIR}
85ae52b95   Tom Rini   uboot-test-hooks:...
318
            git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
bf275222a   Bin Meng   Bring all testing...
319
320
            ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
            ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
bf275222a   Bin Meng   Bring all testing...
321
322
            grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal  echo lsefimmap lsefi lsefisystab efinet tftp minicmd
            grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal  echo lsefimmap lsefi lsefisystab efinet tftp minicmd
49fb28a4b   Bin Meng   azure/gitlab/trav...
323
            if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
b6b35fd2a   Heinrich Schuchardt   Azure/GitLab: bum...
324
325
                wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
                export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
49fb28a4b   Bin Meng   azure/gitlab/trav...
326
            fi
0e60b3a71   Bin Meng   azure/gitlab: Add...
327
            if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
b6b35fd2a   Heinrich Schuchardt   Azure/GitLab: bum...
328
329
                wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
                export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
49fb28a4b   Bin Meng   azure/gitlab/trav...
330
            fi
bf275222a   Bin Meng   Bring all testing...
331
332
            # the below corresponds to .gitlab-ci.yml "script"
            cd ${WORK_DIR}
4e32fed4d   Simon Glass   gitlab/azure: Use...
333
            export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD};
7ec1255ce   Simon Glass   travis/gitlab/azu...
334
            tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE}
9e0f5eab4   Heinrich Schuchardt   Azure: copy GRUB ...
335
336
337
            cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/
            cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
            cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi
9e0f5eab4   Heinrich Schuchardt   Azure: copy GRUB ...
338
339
            cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi
            cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi
0e60b3a71   Bin Meng   azure/gitlab: Add...
340
341
342
343
344
345
346
347
348
349
350
351
            # create sdcard / spi-nor images for sifive unleashed using genimage
            if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
                mkdir -p root;
                cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
                cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
                rm -rf tmp;
                genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
                cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
                rm -rf tmp;
                genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
                cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
            fi
5d80a1a93   Tom Rini   azure: Update for...
352
353
354
            virtualenv -p /usr/bin/python3 /tmp/venv
            . /tmp/venv/bin/activate
            pip install -r test/py/requirements.txt
5d6f05352   Tom Rini   azure: Update the...
355
            export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
bf275222a   Bin Meng   Bring all testing...
356
            export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
4080d0970   Simon Glass   travis/gitlab/azu...
357
            # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
f30924739   Heinrich Schuchardt   CI: show skipped ...
358
            ./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";
bf275222a   Bin Meng   Bring all testing...
359
            # the below corresponds to .gitlab-ci.yml "after_script"
6049d5168   Tom Rini   azure: Use our ow...
360
            rm -rf /tmp/uboot-test-hooks /tmp/venv
bf275222a   Bin Meng   Bring all testing...
361
362
363
364
365
366
            EOF
            cat test.sh
            # make current directory writeable to uboot user inside the container
            # as sandbox testing need create files like spi flash images, etc.
            # (TODO: clean up this in the future)
            chmod 777 .
e22ec9c69   Alper Nebi Yasak   Azure: Add loop d...
367
368
369
370
371
372
373
374
375
376
377
378
379
380
            # Filesystem tests need extra docker args to run
            set --
            if [[ "${TEST_PY_BD}" == "sandbox" ]]; then
                # mount -o loop needs the loop devices
                if modprobe loop; then
                    for d in $(find /dev -maxdepth 1 -name 'loop*'); do
                        set -- "$@" --device $d:$d
                    done
                fi
                # Needed for mount syscall (for guestmount as well)
                set -- "$@" --cap-add SYS_ADMIN
                # Default apparmor profile denies mounts
                set -- "$@" --security-opt apparmor=unconfined
            fi
1aaaf60d2   Alper Nebi Yasak   Azure: Add fuse d...
381
            # Some tests using libguestfs-tools need the fuse device to run
e22ec9c69   Alper Nebi Yasak   Azure: Add loop d...
382
            docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
bf275222a   Bin Meng   Bring all testing...
383

67d3e67dd   Tom Rini   ci: azure: Update...
384
385
  - stage: world_build
    jobs:
bf275222a   Bin Meng   Bring all testing...
386
387
388
389
390
391
392
393
394
395
396
397
398
    - job: build_the_world
      displayName: 'Build the World'
      pool:
        vmImage: $(ubuntu_vm)
      strategy:
        # Use almost the same target division in .travis.yml, only merged
        # 4 small build jobs (arc/microblaze/nds32/xtensa) into one.
        matrix:
          arc_microblaze_nds32_xtensa:
            BUILDMAN: "arc microblaze nds32 xtensa"
          arm11_arm7_arm920t_arm946es:
            BUILDMAN: "arm11 arm7 arm920t arm946es"
          arm926ejs:
5bda1878b   Tom Rini   Azure: Remove "sp...
399
            BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,omap"
bf275222a   Bin Meng   Bring all testing...
400
401
402
403
404
405
406
407
408
          at91_non_armv7:
            BUILDMAN: "at91 -x armv7"
          at91_non_arm926ejs:
            BUILDMAN: "at91 -x arm926ejs"
          boundary_engicam_toradex:
            BUILDMAN: "boundary engicam toradex"
          arm_bcm:
            BUILDMAN: "bcm -x mips"
          nxp_arm32:
af7716250   Heiko Schocher   travis: rework NX...
409
410
411
412
413
414
415
416
417
418
419
420
421
            BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216"
          nxp_ls101x:
            BUILDMAN: "freescale&ls101"
          nxp_ls102x:
            BUILDMAN: "freescale&ls102"
          nxp_ls104x:
            BUILDMAN: "freescale&ls104"
          nxp_ls108x:
            BUILDMAN: "freescale&ls108"
          nxp_ls20xx:
            BUILDMAN: "freescale&ls20"
          nxp_lx216x:
            BUILDMAN: "freescale&lx216"
bf275222a   Bin Meng   Bring all testing...
422
423
424
425
          imx6:
            BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
          imx:
            BUILDMAN: "mx -x mx6,freescale,technexion,toradex"
5ea605ce4   Tom Rini   AzureCI: Move i.M...
426
427
          imx8:
            BUILDMAN: "imx8"
bf275222a   Bin Meng   Bring all testing...
428
429
430
431
          keystone2_keystone3:
            BUILDMAN: "k2 k3"
          samsung_socfpga:
            BUILDMAN: "samsung socfpga"
bf275222a   Bin Meng   Bring all testing...
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
          sun4i:
            BUILDMAN: "sun4i"
          sun5i:
            BUILDMAN: "sun5i"
          sun6i:
            BUILDMAN: "sun6i"
          sun7i:
            BUILDMAN: "sun7i"
          sun8i_32bit:
            BUILDMAN: "sun8i&armv7"
          sun8i_64bit:
            BUILDMAN: "sun8i&aarch64"
          sun9i:
            BUILDMAN: "sun9i"
          sun50i:
            BUILDMAN: "sun50i"
          arm_catch_all:
31289c7de   Tom Rini   Azure: Rework SH ...
449
            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"
bf275222a   Bin Meng   Bring all testing...
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
          sandbox_x86:
            BUILDMAN: "sandbox x86"
          technexion:
            BUILDMAN: "technexion"
          kirkwood:
            BUILDMAN: "kirkwood"
          mvebu:
            BUILDMAN: "mvebu"
          m68k:
            BUILDMAN: "m68k"
          mips:
            BUILDMAN: "mips"
          non_fsl_ppc:
            BUILDMAN: "powerpc -x freescale"
          mpc85xx_freescale:
4a753fbce   Simon Glass   ppc: Drop t4qds a...
465
            BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*"
bf275222a   Bin Meng   Bring all testing...
466
467
468
          t208xrdb_corenet_ds:
            BUILDMAN: "t208xrdb corenet_ds"
          fsl_ppc:
4a753fbce   Simon Glass   ppc: Drop t4qds a...
469
            BUILDMAN: "mpc83xx&freescale"
bf275222a   Bin Meng   Bring all testing...
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
          t102x:
            BUILDMAN: "t102*"
          p1_p2_rdb_pc:
            BUILDMAN: "p1_p2_rdb_pc"
          p1010rdb_bsc91:
            BUILDMAN: "p1010rdb bsc91"
          siemens:
            BUILDMAN: "siemens"
          tegra:
            BUILDMAN: "tegra -x toradex"
          am33xx_no_siemens:
            BUILDMAN: "am33xx -x siemens"
          omap:
            BUILDMAN: "omap"
          uniphier:
            BUILDMAN: "uniphier"
          aarch64_catch_all:
5ea605ce4   Tom Rini   AzureCI: Move i.M...
487
            BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
bf275222a   Bin Meng   Bring all testing...
488
          rockchip:
2d4cd12dc   Tom Rini   Azure/Travis: Re-...
489
            BUILDMAN: "rk"
31289c7de   Tom Rini   Azure: Rework SH ...
490
491
          renesas:
            BUILDMAN: "renesas"
bf275222a   Bin Meng   Bring all testing...
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
          zynq:
            BUILDMAN: "zynq&armv7"
          zynqmp_versal:
            BUILDMAN: "versal|zynqmp&aarch64"
          riscv:
            BUILDMAN: "riscv"
      steps:
        - script: |
            cat << EOF > build.sh
            set -ex
            cd ${WORK_DIR}
            # make environment variables available as tests are running inside a container
            export BUILDMAN="${BUILDMAN}"
            EOF
            cat << "EOF" >> build.sh
            if [[ "${BUILDMAN}" != "" ]]; then
                ret=0;
aa8544e0d   Bin Meng   azure: Add -E bac...
509
                tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
dd5c954e9   Simon Glass   travis/gitlab/azu...
510
                if [[ $ret -ne 0 ]]; then
b52f5a195   Simon Glass   travis/gitlab/azu...
511
                    tools/buildman/buildman -o /tmp -seP ${BUILDMAN};
bf275222a   Bin Meng   Bring all testing...
512
513
514
515
516
517
                    exit $ret;
                fi;
            fi
            EOF
            cat build.sh
            docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh