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