Bin Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 1 | variables: |
Tom Rini | d7c8e59 | 2020-01-27 16:23:29 -0500 | [diff] [blame] | 2 | windows_vm: vs2017-win2016 |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 3 | ubuntu_vm: ubuntu-18.04 |
Tom Rini | ab1e85b | 2020-05-26 20:39:03 -0400 | [diff] [blame] | 4 | macos_vm: macOS-10.15 |
Tom Rini | f78e12a | 2020-09-02 09:22:29 -0400 | [diff] [blame] | 5 | ci_runner_image: trini/u-boot-gitlab-ci-runner:bionic-20200807-02Sep2020 |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 6 | # 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 Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 11 | |
| 12 | jobs: |
| 13 | - job: tools_only_windows |
| 14 | displayName: 'Ensure host tools build for Windows' |
| 15 | pool: |
| 16 | vmImage: $(windows_vm) |
Bin Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 17 | steps: |
Bin Meng | 31c3bce | 2020-07-28 02:06:44 -0700 | [diff] [blame] | 18 | - powershell: | |
Bin Meng | bd97b0d | 2021-06-22 07:33:21 +0800 | [diff] [blame] | 19 | (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 Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 20 | displayName: 'Install MSYS2' |
| 21 | - script: | |
Bin Meng | 31c3bce | 2020-07-28 02:06:44 -0700 | [diff] [blame] | 22 | sfx.exe -y -o%CD:~0,2%\ |
Bin Meng | 8c65515 | 2020-07-28 02:06:42 -0700 | [diff] [blame] | 23 | %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyuu" |
Bin Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 24 | displayName: 'Update MSYS2' |
| 25 | - script: | |
Tom Rini | a66021b | 2021-03-26 15:14:14 -0400 | [diff] [blame] | 26 | %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel" |
Bin Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 27 | displayName: 'Install Toolchain' |
| 28 | - script: | |
Bin Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 29 | echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh |
Bin Meng | 8c65515 | 2020-07-28 02:06:42 -0700 | [diff] [blame] | 30 | %CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh" |
Bin Meng | c7072d1 | 2019-10-27 05:19:48 -0700 | [diff] [blame] | 31 | 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 Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 37 | |
Tom Rini | ab1e85b | 2020-05-26 20:39:03 -0400 | [diff] [blame] | 38 | - 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 | |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 52 | - job: cppcheck |
| 53 | displayName: 'Static code analysis with cppcheck' |
| 54 | pool: |
| 55 | vmImage: $(ubuntu_vm) |
| 56 | container: |
| 57 | image: $(ci_runner_image) |
| 58 | options: $(container_option) |
| 59 | steps: |
Simon Glass | cd1ccfa | 2020-04-05 14:35:43 -0600 | [diff] [blame] | 60 | - script: cppcheck -j$(nproc) --force --quiet --inline-suppr . |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 61 | |
Heinrich Schuchardt | fbf2bf9 | 2020-02-21 18:24:02 +0100 | [diff] [blame] | 62 | - job: htmldocs |
| 63 | displayName: 'Build HTML documentation' |
| 64 | pool: |
| 65 | vmImage: $(ubuntu_vm) |
| 66 | container: |
| 67 | image: $(ci_runner_image) |
| 68 | options: $(container_option) |
| 69 | steps: |
Heinrich Schuchardt | 846abe4 | 2021-01-25 22:06:25 +0100 | [diff] [blame] | 70 | - script: | |
| 71 | virtualenv -p /usr/bin/python3 /tmp/venvhtml |
| 72 | . /tmp/venvhtml/bin/activate |
| 73 | pip install -r doc/sphinx/requirements.txt |
| 74 | make htmldocs |
Heinrich Schuchardt | fbf2bf9 | 2020-02-21 18:24:02 +0100 | [diff] [blame] | 75 | |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 76 | - job: todo |
| 77 | displayName: 'Search for TODO within source tree' |
| 78 | pool: |
| 79 | vmImage: $(ubuntu_vm) |
| 80 | container: |
| 81 | image: $(ci_runner_image) |
| 82 | options: $(container_option) |
| 83 | steps: |
| 84 | - script: grep -r TODO . |
| 85 | - script: grep -r FIXME . |
| 86 | - script: grep -r HACK . | grep -v HACKKIT |
| 87 | |
| 88 | - job: sloccount |
| 89 | displayName: 'Some statistics about the code base' |
| 90 | pool: |
| 91 | vmImage: $(ubuntu_vm) |
| 92 | container: |
| 93 | image: $(ci_runner_image) |
| 94 | options: $(container_option) |
| 95 | steps: |
| 96 | - script: sloccount . |
| 97 | |
| 98 | - job: maintainers |
| 99 | displayName: 'Ensure all configs have MAINTAINERS entries' |
| 100 | pool: |
| 101 | vmImage: $(ubuntu_vm) |
| 102 | container: |
| 103 | image: $(ci_runner_image) |
| 104 | options: $(container_option) |
| 105 | steps: |
| 106 | - script: | |
| 107 | if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi |
| 108 | |
| 109 | - job: tools_only |
| 110 | displayName: 'Ensure host tools build' |
| 111 | pool: |
| 112 | vmImage: $(ubuntu_vm) |
| 113 | container: |
| 114 | image: $(ci_runner_image) |
| 115 | options: $(container_option) |
| 116 | steps: |
| 117 | - script: | |
| 118 | make tools-only_config tools-only -j$(nproc) |
| 119 | |
| 120 | - job: envtools |
| 121 | displayName: 'Ensure env tools build' |
| 122 | pool: |
| 123 | vmImage: $(ubuntu_vm) |
| 124 | container: |
| 125 | image: $(ci_runner_image) |
| 126 | options: $(container_option) |
| 127 | steps: |
| 128 | - script: | |
| 129 | make tools-only_config envtools -j$(nproc) |
| 130 | |
| 131 | - job: utils |
Tom Rini | 0b3e0c4 | 2020-03-11 18:11:15 -0400 | [diff] [blame] | 132 | displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites' |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 133 | pool: |
| 134 | vmImage: $(ubuntu_vm) |
| 135 | steps: |
| 136 | - script: | |
| 137 | cat << EOF > build.sh |
| 138 | set -ex |
| 139 | cd ${WORK_DIR} |
| 140 | EOF |
| 141 | cat << "EOF" >> build.sh |
| 142 | git config --global user.name "Azure Pipelines" |
| 143 | git config --global user.email bmeng.cn@gmail.com |
| 144 | export USER=azure |
Tom Rini | 6c88310 | 2020-02-11 12:41:14 -0500 | [diff] [blame] | 145 | virtualenv -p /usr/bin/python3 /tmp/venv |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 146 | . /tmp/venv/bin/activate |
Tom Rini | 70c66dd | 2021-02-26 07:52:29 -0500 | [diff] [blame] | 147 | pip install -r test/py/requirements.txt |
Simon Glass | 9e589c0 | 2020-03-18 09:42:50 -0600 | [diff] [blame] | 148 | export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 149 | export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt |
| 150 | export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH} |
Simon Glass | a26d8fe | 2021-03-22 08:22:53 +1300 | [diff] [blame] | 151 | ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 152 | ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test |
| 153 | ./tools/buildman/buildman -t |
| 154 | ./tools/dtoc/dtoc -t |
Simon Glass | 109e84e | 2020-07-05 21:41:55 -0600 | [diff] [blame] | 155 | ./tools/patman/patman test |
Tom Rini | 0b3e0c4 | 2020-03-11 18:11:15 -0400 | [diff] [blame] | 156 | make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 157 | EOF |
| 158 | cat build.sh |
| 159 | # We cannot use "container" like other jobs above, as buildman |
| 160 | # seems to hang forever with pre-configured "container" environment |
| 161 | docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh |
| 162 | |
Pali Rohár | 80ad67b | 2020-05-17 14:38:22 +0200 | [diff] [blame] | 163 | - job: nokia_rx51_test |
| 164 | displayName: 'Run tests for Nokia RX-51 (aka N900)' |
| 165 | pool: |
| 166 | vmImage: $(ubuntu_vm) |
| 167 | container: |
| 168 | image: $(ci_runner_image) |
| 169 | options: $(container_option) |
| 170 | steps: |
| 171 | - script: | |
| 172 | ./tools/buildman/buildman --fetch-arch arm |
| 173 | export PATH=~/.buildman-toolchains/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/:$PATH |
| 174 | test/nokia_rx51_test.sh |
| 175 | |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 176 | - job: test_py |
| 177 | displayName: 'test.py' |
| 178 | pool: |
| 179 | vmImage: $(ubuntu_vm) |
| 180 | strategy: |
| 181 | matrix: |
| 182 | sandbox: |
| 183 | TEST_PY_BD: "sandbox" |
Tom Rini | 99a1bb3 | 2019-11-06 19:30:47 -0500 | [diff] [blame] | 184 | sandbox_clang: |
| 185 | TEST_PY_BD: "sandbox" |
Tom Rini | b4febf5 | 2020-04-10 18:28:04 -0400 | [diff] [blame] | 186 | OVERRIDE: "-O clang-10" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 187 | sandbox_spl: |
| 188 | TEST_PY_BD: "sandbox_spl" |
Simon Glass | 36a69e1 | 2020-10-25 20:38:36 -0600 | [diff] [blame] | 189 | TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" |
Simon Glass | 492f0b0 | 2021-03-15 17:25:34 +1300 | [diff] [blame] | 190 | sandbox_noinst: |
| 191 | TEST_PY_BD: "sandbox_noinst" |
| 192 | TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 193 | sandbox_flattree: |
| 194 | TEST_PY_BD: "sandbox_flattree" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 195 | evb_ast2500: |
| 196 | TEST_PY_BD: "evb-ast2500" |
| 197 | TEST_PY_ID: "--id qemu" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 198 | integratorcp_cm926ejs: |
| 199 | TEST_PY_BD: "integratorcp_cm926ejs" |
| 200 | TEST_PY_ID: "--id qemu" |
| 201 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 202 | qemu_arm: |
| 203 | TEST_PY_BD: "qemu_arm" |
| 204 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 205 | qemu_arm64: |
| 206 | TEST_PY_BD: "qemu_arm64" |
| 207 | TEST_PY_TEST_SPEC: "not sleep" |
Daniel Schwierzeck | 879bc74 | 2020-06-06 22:21:47 +0200 | [diff] [blame] | 208 | qemu_malta: |
| 209 | TEST_PY_BD: "malta" |
| 210 | TEST_PY_ID: "--id qemu" |
| 211 | TEST_PY_TEST_SPEC: "not sleep and not efi" |
| 212 | qemu_maltael: |
| 213 | TEST_PY_BD: "maltael" |
| 214 | TEST_PY_ID: "--id qemu" |
| 215 | TEST_PY_TEST_SPEC: "not sleep and not efi" |
| 216 | qemu_malta64: |
| 217 | TEST_PY_BD: "malta64" |
| 218 | TEST_PY_ID: "--id qemu" |
| 219 | TEST_PY_TEST_SPEC: "not sleep and not efi" |
| 220 | qemu_malta64el: |
| 221 | TEST_PY_BD: "malta64el" |
| 222 | TEST_PY_ID: "--id qemu" |
| 223 | TEST_PY_TEST_SPEC: "not sleep and not efi" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 224 | qemu_ppce500: |
| 225 | TEST_PY_BD: "qemu-ppce500" |
| 226 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | aeb3ea4 | 2020-03-28 07:25:27 -0700 | [diff] [blame] | 227 | qemu_riscv32: |
| 228 | TEST_PY_BD: "qemu-riscv32" |
| 229 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 230 | qemu_riscv64: |
| 231 | TEST_PY_BD: "qemu-riscv64" |
| 232 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | b68d9d6 | 2020-03-28 07:25:29 -0700 | [diff] [blame] | 233 | qemu_riscv32_spl: |
| 234 | TEST_PY_BD: "qemu-riscv32_spl" |
| 235 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | b68d9d6 | 2020-03-28 07:25:29 -0700 | [diff] [blame] | 236 | qemu_riscv64_spl: |
| 237 | TEST_PY_BD: "qemu-riscv64_spl" |
| 238 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 239 | qemu_x86: |
| 240 | TEST_PY_BD: "qemu-x86" |
| 241 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 242 | qemu_x86_64: |
| 243 | TEST_PY_BD: "qemu-x86_64" |
| 244 | TEST_PY_TEST_SPEC: "not sleep" |
Marek Vasut | fc5a9d7 | 2020-09-14 21:55:58 +0200 | [diff] [blame] | 245 | r2dplus_i82557c: |
| 246 | TEST_PY_BD: "r2dplus" |
| 247 | TEST_PY_ID: "--id i82557c_qemu" |
| 248 | r2dplus_pcnet: |
| 249 | TEST_PY_BD: "r2dplus" |
| 250 | TEST_PY_ID: "--id pcnet_qemu" |
| 251 | r2dplus_rtl8139: |
| 252 | TEST_PY_BD: "r2dplus" |
| 253 | TEST_PY_ID: "--id rtl8139_qemu" |
| 254 | r2dplus_tulip: |
| 255 | TEST_PY_BD: "r2dplus" |
| 256 | TEST_PY_ID: "--id tulip_qemu" |
Michal Simek | f8834fd | 2020-02-13 15:03:29 +0100 | [diff] [blame] | 257 | xilinx_zynq_virt: |
| 258 | TEST_PY_BD: "xilinx_zynq_virt" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 259 | TEST_PY_ID: "--id qemu" |
| 260 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 261 | xilinx_versal_virt: |
| 262 | TEST_PY_BD: "xilinx_versal_virt" |
| 263 | TEST_PY_ID: "--id qemu" |
| 264 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 265 | xtfpga: |
| 266 | TEST_PY_BD: "xtfpga" |
| 267 | TEST_PY_ID: "--id qemu" |
| 268 | TEST_PY_TEST_SPEC: "not sleep" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 269 | steps: |
| 270 | - script: | |
| 271 | cat << EOF > test.sh |
| 272 | set -ex |
| 273 | # make environment variables available as tests are running inside a container |
| 274 | export WORK_DIR="${WORK_DIR}" |
| 275 | export TEST_PY_BD="${TEST_PY_BD}" |
| 276 | export TEST_PY_ID="${TEST_PY_ID}" |
| 277 | export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}" |
Tom Rini | 99a1bb3 | 2019-11-06 19:30:47 -0500 | [diff] [blame] | 278 | export OVERRIDE="${OVERRIDE}" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 279 | EOF |
| 280 | cat << "EOF" >> test.sh |
| 281 | # the below corresponds to .gitlab-ci.yml "before_script" |
| 282 | cd ${WORK_DIR} |
Tom Rini | 2a1df58 | 2021-02-24 17:05:04 -0500 | [diff] [blame] | 283 | git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 284 | ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` |
| 285 | ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 286 | grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd |
| 287 | grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd |
Bin Meng | b68d9d6 | 2020-03-28 07:25:29 -0700 | [diff] [blame] | 288 | if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then |
Heinrich Schuchardt | ac1b400 | 2021-04-02 11:42:01 +0200 | [diff] [blame] | 289 | wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ; |
| 290 | export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin; |
Bin Meng | b68d9d6 | 2020-03-28 07:25:29 -0700 | [diff] [blame] | 291 | fi |
| 292 | if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]]; then |
Heinrich Schuchardt | ac1b400 | 2021-04-02 11:42:01 +0200 | [diff] [blame] | 293 | wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ; |
| 294 | export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin; |
Bin Meng | b68d9d6 | 2020-03-28 07:25:29 -0700 | [diff] [blame] | 295 | fi |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 296 | # the below corresponds to .gitlab-ci.yml "script" |
| 297 | cd ${WORK_DIR} |
Simon Glass | 28d83e7 | 2020-03-18 09:42:55 -0600 | [diff] [blame] | 298 | export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD}; |
Simon Glass | 87c8046 | 2020-03-18 09:43:00 -0600 | [diff] [blame] | 299 | tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE} |
Heinrich Schuchardt | 0c9fdd0 | 2020-07-14 00:40:19 +0200 | [diff] [blame] | 300 | cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/ |
| 301 | cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/ |
| 302 | cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi |
| 303 | cp /opt/grub/grubriscv32.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv32.efi |
| 304 | cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi |
| 305 | cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi |
Tom Rini | 17e41f2 | 2019-10-31 10:45:03 -0400 | [diff] [blame] | 306 | virtualenv -p /usr/bin/python3 /tmp/venv |
| 307 | . /tmp/venv/bin/activate |
| 308 | pip install -r test/py/requirements.txt |
Tom Rini | 528facb | 2019-11-01 13:59:14 -0400 | [diff] [blame] | 309 | export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH}; |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 310 | export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci; |
Simon Glass | 2600f7e | 2020-03-18 09:42:56 -0600 | [diff] [blame] | 311 | # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not |
Heinrich Schuchardt | 2a3ec0a | 2020-07-10 22:04:40 +0200 | [diff] [blame] | 312 | ./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 Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 313 | # the below corresponds to .gitlab-ci.yml "after_script" |
Tom Rini | 6d4656b | 2020-02-07 11:45:55 -0500 | [diff] [blame] | 314 | rm -rf /tmp/uboot-test-hooks /tmp/venv |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 315 | EOF |
| 316 | cat test.sh |
| 317 | # make current directory writeable to uboot user inside the container |
| 318 | # as sandbox testing need create files like spi flash images, etc. |
| 319 | # (TODO: clean up this in the future) |
| 320 | chmod 777 . |
| 321 | docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh |
| 322 | |
| 323 | - job: build_the_world |
| 324 | displayName: 'Build the World' |
| 325 | pool: |
| 326 | vmImage: $(ubuntu_vm) |
| 327 | strategy: |
| 328 | # Use almost the same target division in .travis.yml, only merged |
| 329 | # 4 small build jobs (arc/microblaze/nds32/xtensa) into one. |
| 330 | matrix: |
| 331 | arc_microblaze_nds32_xtensa: |
| 332 | BUILDMAN: "arc microblaze nds32 xtensa" |
| 333 | arm11_arm7_arm920t_arm946es: |
| 334 | BUILDMAN: "arm11 arm7 arm920t arm946es" |
| 335 | arm926ejs: |
| 336 | BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,spear,omap" |
| 337 | at91_non_armv7: |
| 338 | BUILDMAN: "at91 -x armv7" |
| 339 | at91_non_arm926ejs: |
| 340 | BUILDMAN: "at91 -x arm926ejs" |
| 341 | boundary_engicam_toradex: |
| 342 | BUILDMAN: "boundary engicam toradex" |
| 343 | arm_bcm: |
| 344 | BUILDMAN: "bcm -x mips" |
| 345 | nxp_arm32: |
Heiko Schocher | 56b9b31 | 2019-11-22 11:17:29 +0100 | [diff] [blame] | 346 | BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216" |
| 347 | nxp_ls101x: |
| 348 | BUILDMAN: "freescale&ls101" |
| 349 | nxp_ls102x: |
| 350 | BUILDMAN: "freescale&ls102" |
| 351 | nxp_ls104x: |
| 352 | BUILDMAN: "freescale&ls104" |
| 353 | nxp_ls108x: |
| 354 | BUILDMAN: "freescale&ls108" |
| 355 | nxp_ls20xx: |
| 356 | BUILDMAN: "freescale&ls20" |
| 357 | nxp_lx216x: |
| 358 | BUILDMAN: "freescale&lx216" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 359 | imx6: |
| 360 | BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex" |
| 361 | imx: |
| 362 | BUILDMAN: "mx -x mx6,freescale,technexion,toradex" |
| 363 | keystone2_keystone3: |
| 364 | BUILDMAN: "k2 k3" |
| 365 | samsung_socfpga: |
| 366 | BUILDMAN: "samsung socfpga" |
| 367 | spear: |
| 368 | BUILDMAN: "spear" |
| 369 | sun4i: |
| 370 | BUILDMAN: "sun4i" |
| 371 | sun5i: |
| 372 | BUILDMAN: "sun5i" |
| 373 | sun6i: |
| 374 | BUILDMAN: "sun6i" |
| 375 | sun7i: |
| 376 | BUILDMAN: "sun7i" |
| 377 | sun8i_32bit: |
| 378 | BUILDMAN: "sun8i&armv7" |
| 379 | sun8i_64bit: |
| 380 | BUILDMAN: "sun8i&aarch64" |
| 381 | sun9i: |
| 382 | BUILDMAN: "sun9i" |
| 383 | sun50i: |
| 384 | BUILDMAN: "sun50i" |
| 385 | arm_catch_all: |
Tom Rini | f04bde5 | 2021-02-15 10:52:19 -0500 | [diff] [blame] | 386 | 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 Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 387 | sandbox_x86: |
| 388 | BUILDMAN: "sandbox x86" |
| 389 | technexion: |
| 390 | BUILDMAN: "technexion" |
| 391 | kirkwood: |
| 392 | BUILDMAN: "kirkwood" |
| 393 | mvebu: |
| 394 | BUILDMAN: "mvebu" |
| 395 | m68k: |
| 396 | BUILDMAN: "m68k" |
| 397 | mips: |
| 398 | BUILDMAN: "mips" |
| 399 | non_fsl_ppc: |
| 400 | BUILDMAN: "powerpc -x freescale" |
| 401 | mpc85xx_freescale: |
| 402 | BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t4qds -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x b4860qds -x bsc91*" |
| 403 | t208xrdb_corenet_ds: |
| 404 | BUILDMAN: "t208xrdb corenet_ds" |
| 405 | fsl_ppc: |
| 406 | BUILDMAN: "t4qds b4860qds mpc83xx&freescale mpc86xx&freescale" |
| 407 | t102x: |
| 408 | BUILDMAN: "t102*" |
| 409 | p1_p2_rdb_pc: |
| 410 | BUILDMAN: "p1_p2_rdb_pc" |
| 411 | p1010rdb_bsc91: |
| 412 | BUILDMAN: "p1010rdb bsc91" |
| 413 | siemens: |
| 414 | BUILDMAN: "siemens" |
| 415 | tegra: |
| 416 | BUILDMAN: "tegra -x toradex" |
| 417 | am33xx_no_siemens: |
| 418 | BUILDMAN: "am33xx -x siemens" |
| 419 | omap: |
| 420 | BUILDMAN: "omap" |
| 421 | uniphier: |
| 422 | BUILDMAN: "uniphier" |
| 423 | aarch64_catch_all: |
Tom Rini | f04bde5 | 2021-02-15 10:52:19 -0500 | [diff] [blame] | 424 | BUILDMAN: "aarch64 -x bcm,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 425 | rockchip: |
Tom Rini | e289a16 | 2020-03-09 13:01:57 -0400 | [diff] [blame] | 426 | BUILDMAN: "rk" |
Tom Rini | f04bde5 | 2021-02-15 10:52:19 -0500 | [diff] [blame] | 427 | renesas: |
| 428 | BUILDMAN: "renesas" |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 429 | zynq: |
| 430 | BUILDMAN: "zynq&armv7" |
| 431 | zynqmp_versal: |
| 432 | BUILDMAN: "versal|zynqmp&aarch64" |
| 433 | riscv: |
| 434 | BUILDMAN: "riscv" |
| 435 | steps: |
| 436 | - script: | |
| 437 | cat << EOF > build.sh |
| 438 | set -ex |
| 439 | cd ${WORK_DIR} |
| 440 | # make environment variables available as tests are running inside a container |
| 441 | export BUILDMAN="${BUILDMAN}" |
| 442 | EOF |
| 443 | cat << "EOF" >> build.sh |
| 444 | if [[ "${BUILDMAN}" != "" ]]; then |
| 445 | ret=0; |
Bin Meng | 8ba3d24 | 2021-01-31 16:38:35 +0800 | [diff] [blame] | 446 | tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?; |
Simon Glass | da49935 | 2020-03-18 09:42:57 -0600 | [diff] [blame] | 447 | if [[ $ret -ne 0 ]]; then |
Simon Glass | ad8eaed | 2020-03-18 09:42:53 -0600 | [diff] [blame] | 448 | tools/buildman/buildman -o /tmp -seP ${BUILDMAN}; |
Bin Meng | ddaa6b1 | 2019-10-28 07:25:03 -0700 | [diff] [blame] | 449 | exit $ret; |
| 450 | fi; |
| 451 | fi |
| 452 | EOF |
| 453 | cat build.sh |
| 454 | docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh |