Sam Elliott | d202828 | 2020-06-02 18:18:54 +0100 | [diff] [blame] | 1 | # Copyright lowRISC contributors. |
| 2 | # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | # SPDX-License-Identifier: Apache-2.0 |
| 4 | # |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 5 | # Azure Pipelines CI build configuration |
| 6 | # Documentation at https://aka.ms/yaml |
| 7 | |
| 8 | variables: |
Philipp Wagner | e8ade05 | 2020-11-16 11:18:49 +0000 | [diff] [blame] | 9 | VERILATOR_VERSION: 4.104 |
Philipp Wagner | b02d9c8 | 2021-02-24 15:00:54 +0000 | [diff] [blame] | 10 | OPENOCD_VERSION: 0.11.0 |
Miguel Osorio | 88179fc | 2019-09-19 23:37:48 -0700 | [diff] [blame] | 11 | TOOLCHAIN_PATH: /opt/buildcache/riscv |
Michael Schaffner | e66fc61 | 2020-12-15 10:47:57 -0800 | [diff] [blame] | 12 | VERIBLE_VERSION: v0.0-808-g1e17daa |
Miguel Osorio | 88179fc | 2019-09-19 23:37:48 -0700 | [diff] [blame] | 13 | # Release tag from https://github.com/lowRISC/lowrisc-toolchains/releases |
Sam Elliott | 0088155 | 2020-05-04 16:46:55 +0100 | [diff] [blame] | 14 | # if you update this, update the definition in util/container/Dockerfile |
Philipp Wagner | ca40353 | 2021-04-13 09:15:28 +0100 | [diff] [blame] | 15 | TOOLCHAIN_VERSION: 20210412-1 |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 16 | # This controls where builds happen, and gets picked up by build_consts.sh. |
| 17 | BUILD_ROOT: $(Build.ArtifactStagingDirectory) |
Philipp Wagner | 11d2dcb | 2020-09-29 16:27:46 +0100 | [diff] [blame] | 18 | VIVADO_VERSION: "2020.1" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 19 | |
| 20 | trigger: |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 21 | batch: true |
| 22 | branches: |
| 23 | include: |
Philipp Wagner | f565b66 | 2020-07-22 14:04:40 +0100 | [diff] [blame] | 24 | - "*" |
Philipp Wagner | dd1706e | 2020-03-15 14:39:59 +0000 | [diff] [blame] | 25 | tags: |
| 26 | include: |
| 27 | - "*" |
| 28 | pr: |
| 29 | branches: |
| 30 | include: |
Philipp Wagner | f565b66 | 2020-07-22 14:04:40 +0100 | [diff] [blame] | 31 | - "*" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 32 | |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 33 | jobs: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 34 | - job: lint |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 35 | displayName: Run code quality checks (quick lint) |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 36 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 37 | vmImage: ubuntu-18.04 |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 38 | steps: |
| 39 | - bash: | |
Garret Kelly | f5608d0 | 2019-11-01 16:28:11 -0400 | [diff] [blame] | 40 | sudo apt-get remove -y clang-6.0 libclang-common-6.0-dev libclang1-6.0 libllvm6.0 |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 41 | displayName: Remove existing Clang installation |
| 42 | - template: ci/install-package-dependencies.yml |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 43 | ## !!! |
| 44 | ## |
| 45 | ## The steps below here are duplicated in ci/jobs/quick-lint.sh |
| 46 | ## to allow developers to "run CI" locally. Keep them in sync. |
| 47 | ## |
| 48 | ## !!! |
| 49 | - bash: ci/scripts/show-env.sh |
Philipp Wagner | 9986239 | 2020-07-22 13:32:34 +0100 | [diff] [blame] | 50 | displayName: Display environment information |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 51 | - bash: ci/scripts/lint-commits.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 52 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 53 | displayName: Check commit metadata |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 54 | - bash: ci/scripts/check-licence-headers.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 55 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 56 | displayName: Check Licence Headers |
Rupert Swarbrick | f0d5b0c | 2021-03-26 11:48:42 +0000 | [diff] [blame] | 57 | - bash: ci/scripts/exec-check.sh |
| 58 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 59 | displayName: Check executable bits |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 60 | - bash: ci/scripts/python-lint.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Rupert Swarbrick | fb9fdb6 | 2021-02-01 17:30:48 +0000 | [diff] [blame] | 61 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Rupert Swarbrick | 746f9b1 | 2021-03-26 17:19:00 +0000 | [diff] [blame] | 62 | displayName: Run Python lint (flake8) |
Rupert Swarbrick | 2d70c75 | 2020-03-24 17:23:40 +0000 | [diff] [blame] | 63 | continueOnError: true |
Rupert Swarbrick | 746f9b1 | 2021-03-26 17:19:00 +0000 | [diff] [blame] | 64 | - bash: ci/scripts/mypy.sh |
| 65 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 66 | displayName: Run Python lint (mypy) |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 67 | - bash: ci/scripts/check-generated.sh |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 68 | displayName: Ensure all generated files are clean and up-to-date |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 69 | - bash: ci/scripts/clang-format.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 70 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 71 | displayName: Use clang-format to check C/C++ coding style |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 72 | - bash: ci/scripts/include-guard.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Miguel Young de la Sota | b23dc8c | 2020-01-14 13:52:33 -0500 | [diff] [blame] | 73 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 74 | displayName: Check formatting on header guards |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 75 | - bash: ci/scripts/verible-lint.sh rtl |
Michael Schaffner | de32606 | 2020-07-14 17:50:35 -0700 | [diff] [blame] | 76 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Michael Schaffner | a94241f | 2020-08-03 15:50:14 -0700 | [diff] [blame] | 77 | displayName: Style-Lint RTL Verilog source files with Verible |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 78 | - bash: ci/scripts/verible-lint.sh dv |
Michael Schaffner | a94241f | 2020-08-03 15:50:14 -0700 | [diff] [blame] | 79 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 80 | displayName: Style-Lint DV Verilog source files with Verible |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 81 | - bash: ci/scripts/build-docs.sh |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 82 | displayName: Render documentation |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 83 | - bash: ci/scripts/build-site.sh |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 84 | displayName: Render landing site |
Rupert Swarbrick | fb9fdb6 | 2021-02-01 17:30:48 +0000 | [diff] [blame] | 85 | - bash: ci/scripts/get-build-type.sh "$SYSTEM_PULLREQUEST_TARGETBRANCH" "$(Build.Reason)" |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 86 | displayName: Check what kinds of changes the PR contains |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 87 | name: DetermineBuildType |
Philipp Wagner | 1e64355 | 2019-09-04 15:39:14 +0100 | [diff] [blame] | 88 | |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 89 | - job: slow_lints |
| 90 | displayName: Run code quality checks (in-depth lint) |
| 91 | dependsOn: lint |
| 92 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 93 | vmImage: ubuntu-18.04 |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 94 | steps: |
| 95 | - template: ci/install-package-dependencies.yml |
Rupert Swarbrick | 2aff11b | 2021-02-16 17:11:37 +0000 | [diff] [blame] | 96 | - bash: ci/scripts/check-vendoring.sh |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 97 | displayName: Check vendored directories are up-to-date |
| 98 | |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 99 | - job: sw_build |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 100 | displayName: Build Software for Earl Grey toplevel design |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 101 | dependsOn: lint |
Philipp Wagner | 9d20ee6 | 2019-11-29 14:27:28 +0000 | [diff] [blame] | 102 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 103 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 104 | vmImage: ubuntu-18.04 |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 105 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 106 | - template: ci/install-package-dependencies.yml |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 107 | - bash: | |
| 108 | set -x |
| 109 | sudo util/get-toolchain.py \ |
Srikrishna Iyer | 98333ba | 2020-11-16 23:12:29 -0800 | [diff] [blame] | 110 | --install-dir="$TOOLCHAIN_PATH" \ |
Sam Elliott | eb8ace4 | 2020-06-03 17:47:55 +0100 | [diff] [blame] | 111 | --release-version="$TOOLCHAIN_VERSION" \ |
Philipp Wagner | 1c51441 | 2019-11-27 14:48:47 +0000 | [diff] [blame] | 112 | --update |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 113 | displayName: Install toolchain |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 114 | - bash: | |
Miguel Young de la Sota | 6379357 | 2019-11-13 14:18:51 -0600 | [diff] [blame] | 115 | . util/build_consts.sh |
Miguel Young de la Sota | 4a4946d | 2019-11-21 10:44:18 -0600 | [diff] [blame] | 116 | ./meson_init.sh -A |
Miguel Young de la Sota | 76526c3 | 2020-01-28 10:24:41 -0500 | [diff] [blame] | 117 | ninja -C "$OBJ_DIR" all |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 118 | displayName: Build embedded targets |
Miguel Young de la Sota | 9d20b3d | 2020-02-03 16:35:31 -0500 | [diff] [blame] | 119 | - bash: | |
| 120 | . util/build_consts.sh |
| 121 | ninja -C "$OBJ_DIR" test |
Sam Elliott | eb8ace4 | 2020-06-03 17:47:55 +0100 | [diff] [blame] | 122 | displayName: Run unit tests |
Philipp Wagner | 622ec3f | 2021-02-02 18:37:24 +0000 | [diff] [blame] | 123 | - bash: | |
| 124 | . util/build_consts.sh |
| 125 | # Remove all Nexys Video-related build artifacts, which will be produced |
| 126 | # by the sw_build_nexysvideo job below (see comment there). |
| 127 | find "$BIN_DIR/sw/device" -name '*fpga_nexysvideo*' -type f -delete |
| 128 | displayName: Delete all Nexys Video build artifacts |
Sam Elliott | eb8ace4 | 2020-06-03 17:47:55 +0100 | [diff] [blame] | 129 | - template: ci/upload-artifacts-template.yml |
Miguel Young de la Sota | b4df860 | 2019-11-21 12:44:11 -0600 | [diff] [blame] | 130 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 131 | includePatterns: |
| 132 | - "/sw/***" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 133 | |
Philipp Wagner | 622ec3f | 2021-02-02 18:37:24 +0000 | [diff] [blame] | 134 | # Software targeting the Nexys Video board is produced by patching the source |
| 135 | # tree before building. This produces a full sw build tree, however only the |
| 136 | # artifacts with "nexysvideo" in the name are actually the ones we're looking |
| 137 | # for. Everything else will be discarded. |
| 138 | # TODO: This is a rather ugly hack, which will go away once we properly support |
| 139 | # building more than one top-level design with different parametrizations. |
| 140 | # Work towards this goal is tracked in issue #4669. |
Timothy Chen | f835aa3 | 2021-01-08 16:27:50 -0800 | [diff] [blame] | 141 | - job: sw_build_nexysvideo |
| 142 | displayName: Build Software for Earl Grey toplevel design targeting the Nexys Video board |
| 143 | dependsOn: lint |
| 144 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
| 145 | pool: |
| 146 | vmImage: ubuntu-18.04 |
| 147 | steps: |
| 148 | - template: ci/install-package-dependencies.yml |
| 149 | - bash: | |
| 150 | set -x |
| 151 | sudo util/get-toolchain.py \ |
| 152 | --install-dir="$TOOLCHAIN_PATH" \ |
| 153 | --release-version="$TOOLCHAIN_VERSION" \ |
| 154 | --update |
| 155 | displayName: Install toolchain |
| 156 | - bash: | |
| 157 | . util/build_consts.sh |
| 158 | ./hw/top_earlgrey/util/top_earlgrey_reduce.py |
| 159 | ./meson_init.sh -A |
| 160 | ninja -C "$OBJ_DIR" all |
Philipp Wagner | 622ec3f | 2021-02-02 18:37:24 +0000 | [diff] [blame] | 161 | |
| 162 | # Delete all build artifacts which are *not* for the Nexys Video board. |
| 163 | find "$BIN_DIR/sw/device" -not -name '*fpga_nexysvideo*' -type f -delete |
Timothy Chen | f835aa3 | 2021-01-08 16:27:50 -0800 | [diff] [blame] | 164 | displayName: Build embedded targets |
| 165 | - bash: | |
| 166 | . util/build_consts.sh |
| 167 | ninja -C "$OBJ_DIR" test |
| 168 | displayName: Run unit tests |
| 169 | - template: ci/upload-artifacts-template.yml |
| 170 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 171 | includePatterns: |
| 172 | - "/sw/device/**/*nexysvideo*" |
Timothy Chen | f835aa3 | 2021-01-08 16:27:50 -0800 | [diff] [blame] | 173 | |
LuÃs Marques | 5849cd1 | 2020-06-26 10:33:55 +0100 | [diff] [blame] | 174 | # We continue building with GCC, despite defaulting to Clang. This is a copy of |
| 175 | # `sw_build` with `meson_init.sh` configured with the GCC toolchain, instead of |
| 176 | # the default toolchain. |
| 177 | - job: sw_build_gcc |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 178 | displayName: Build Software for Earl Grey toplevel design (with GCC) |
Sam Elliott | 7a00a4b | 2020-06-03 17:48:10 +0100 | [diff] [blame] | 179 | dependsOn: lint |
| 180 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
| 181 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 182 | vmImage: ubuntu-18.04 |
Sam Elliott | 7a00a4b | 2020-06-03 17:48:10 +0100 | [diff] [blame] | 183 | steps: |
| 184 | - template: ci/install-package-dependencies.yml |
| 185 | - bash: | |
| 186 | set -x |
| 187 | sudo util/get-toolchain.py \ |
Srikrishna Iyer | 98333ba | 2020-11-16 23:12:29 -0800 | [diff] [blame] | 188 | --install-dir="$TOOLCHAIN_PATH" \ |
Sam Elliott | 7a00a4b | 2020-06-03 17:48:10 +0100 | [diff] [blame] | 189 | --release-version="$TOOLCHAIN_VERSION" \ |
| 190 | --update |
| 191 | displayName: Install toolchain |
| 192 | - bash: | |
| 193 | . util/build_consts.sh |
| 194 | ./meson_init.sh -A \ |
LuÃs Marques | 5849cd1 | 2020-06-26 10:33:55 +0100 | [diff] [blame] | 195 | -t "$TOOLCHAIN_PATH/meson-riscv32-unknown-elf-gcc.txt" |
Sam Elliott | 7a00a4b | 2020-06-03 17:48:10 +0100 | [diff] [blame] | 196 | ninja -C "$OBJ_DIR" all |
| 197 | displayName: Build embedded targets |
Sam Elliott | 7a00a4b | 2020-06-03 17:48:10 +0100 | [diff] [blame] | 198 | - bash: | |
| 199 | . util/build_consts.sh |
| 200 | ninja -C "$OBJ_DIR" test |
| 201 | displayName: Run unit tests |
Sam Elliott | 7a00a4b | 2020-06-03 17:48:10 +0100 | [diff] [blame] | 202 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 203 | - job: chip_earlgrey_verilator |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 204 | displayName: Build Verilator simulation of the Earl Grey toplevel design |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 205 | dependsOn: lint |
Philipp Wagner | 9d20ee6 | 2019-11-29 14:27:28 +0000 | [diff] [blame] | 206 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
Philipp Wagner | 0907ca1 | 2020-04-21 12:04:32 +0100 | [diff] [blame] | 207 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 208 | vmImage: ubuntu-18.04 |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 209 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 210 | - template: ci/install-package-dependencies.yml |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 211 | - bash: | |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 212 | python3 --version |
| 213 | fusesoc --version |
| 214 | verilator --version |
Michael Schaffner | aa193f9 | 2020-12-16 11:16:17 -0800 | [diff] [blame] | 215 | verible-verilog-lint --version |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 216 | displayName: Display environment |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 217 | - bash: | |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 218 | . util/build_consts.sh |
| 219 | mkdir -p "$OBJ_DIR/hw" |
| 220 | mkdir -p "$BIN_DIR/hw/top_earlgrey" |
| 221 | |
Philipp Wagner | fa8c692 | 2020-08-18 14:14:25 +0100 | [diff] [blame] | 222 | # Compile the simulation without threading; the runners provided by |
| 223 | # Azure provide two virtual CPUs, which seems to equal one physical |
| 224 | # CPU (at most); the use of threading slows down the simulation. |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 225 | fusesoc --cores-root=. \ |
Timothy Chen | be47dd7 | 2020-07-27 14:57:07 -0700 | [diff] [blame] | 226 | run --flag=fileset_top --target=sim --setup --build \ |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 227 | --build-root="$OBJ_DIR/hw" \ |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 228 | lowrisc:systems:chip_earlgrey_verilator \ |
Philipp Wagner | fa8c692 | 2020-08-18 14:14:25 +0100 | [diff] [blame] | 229 | --verilator_options="--no-threads" |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 230 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 231 | cp "$OBJ_DIR/hw/sim-verilator/Vchip_earlgrey_verilator" \ |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 232 | "$BIN_DIR/hw/top_earlgrey" |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 233 | displayName: Build simulation with Verilator |
| 234 | - template: ci/upload-artifacts-template.yml |
Miguel Young de la Sota | b4df860 | 2019-11-21 12:44:11 -0600 | [diff] [blame] | 235 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 236 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 237 | - "/hw/top_earlgrey/Vchip_earlgrey_verilator" |
Philipp Wagner | f4655a1 | 2019-10-30 11:59:15 +0000 | [diff] [blame] | 238 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 239 | - job: chip_englishbreakfast_verilator |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 240 | displayName: Build Verilator simulation of the English Breakfast toplevel design |
| 241 | dependsOn: lint |
| 242 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
| 243 | pool: |
| 244 | vmImage: ubuntu-18.04 |
| 245 | steps: |
| 246 | - template: ci/install-package-dependencies.yml |
| 247 | - bash: | |
| 248 | python3 --version |
| 249 | fusesoc --version |
| 250 | verilator --version |
| 251 | verible-verilog-lint --version |
| 252 | displayName: Display environment |
| 253 | - bash: | |
| 254 | . util/build_consts.sh |
| 255 | mkdir -p "$OBJ_DIR/hw" |
| 256 | mkdir -p "$BIN_DIR/hw/top_englishbreakfast" |
| 257 | |
| 258 | # Compile the simulation without threading; the runners provided by |
| 259 | # Azure provide two virtual CPUs, which seems to equal one physical |
| 260 | # CPU (at most); the use of threading slows down the simulation. |
| 261 | fusesoc --cores-root=. \ |
| 262 | run --flag=fileset_topgen --target=sim --setup --build \ |
| 263 | --build-root="$OBJ_DIR/hw" \ |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 264 | lowrisc:systems:chip_englishbreakfast_verilator \ |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 265 | --verilator_options="--no-threads" |
| 266 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 267 | cp "$OBJ_DIR/hw/sim-verilator/Vchip_englishbreakfast_verilator" \ |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 268 | "$BIN_DIR/hw/top_englishbreakfast" |
| 269 | displayName: Build simulation with Verilator |
| 270 | - template: ci/upload-artifacts-template.yml |
| 271 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 272 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 273 | - "/hw/top_englishbreakfast/Vchip_englishbreakfast_verilator" |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 274 | |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 275 | - job: execute_verilated_tests |
| 276 | displayName: Execute tests on the Verilated system |
Timothy Chen | f7e85cb | 2019-12-10 16:24:39 -0800 | [diff] [blame] | 277 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 278 | vmImage: ubuntu-18.04 |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 279 | dependsOn: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 280 | - chip_earlgrey_verilator |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 281 | - sw_build |
| 282 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 283 | - template: ci/install-package-dependencies.yml |
| 284 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 285 | parameters: |
| 286 | downloadPartialBuildBinFrom: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 287 | - chip_earlgrey_verilator |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 288 | - sw_build |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 289 | - bash: | |
Philipp Wagner | 33fadd0 | 2020-09-09 19:39:25 +0100 | [diff] [blame] | 290 | # Install an additional pytest dependency for result upload. |
| 291 | pip3 install pytest-azurepipelines |
| 292 | |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 293 | . util/build_consts.sh |
Philipp Wagner | 57418e7 | 2019-12-02 21:25:27 +0000 | [diff] [blame] | 294 | pytest --version |
Philipp Wagner | 03aaf32 | 2020-09-09 19:11:44 +0100 | [diff] [blame] | 295 | pytest test/systemtest/earlgrey/test_sim_verilator.py \ |
Philipp Wagner | 33fadd0 | 2020-09-09 19:39:25 +0100 | [diff] [blame] | 296 | --log-cli-level=DEBUG \ |
| 297 | --test-run-title="Run system tests with Verilator simulation" \ |
| 298 | --napoleon-docstrings |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 299 | displayName: Execute tests |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 300 | |
Greg Chadwick | bf9dc38 | 2020-04-17 09:30:40 +0100 | [diff] [blame] | 301 | - template: ci/run-riscv-compliance.yml |
| 302 | parameters: |
| 303 | rvc_test_suites: |
| 304 | - rv32i |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 305 | |
Greg Chadwick | bf9dc38 | 2020-04-17 09:30:40 +0100 | [diff] [blame] | 306 | - template: ci/run-riscv-compliance.yml |
| 307 | parameters: |
| 308 | rvc_test_suites: |
| 309 | - rv32im |
| 310 | - rv32imc |
| 311 | - rv32Zicsr |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 312 | |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 313 | - job: otbn_standalone_tests |
| 314 | displayName: Run OTBN Smoke Test |
| 315 | dependsOn: lint |
| 316 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.hasOTBNChanges'], '1')) |
Philipp Wagner | 8d3e563 | 2020-08-19 14:31:39 +0100 | [diff] [blame] | 317 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 318 | vmImage: ubuntu-18.04 |
Philipp Wagner | bf0ab0a | 2020-12-15 12:03:42 +0000 | [diff] [blame] | 319 | timeoutInMinutes: 10 |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 320 | steps: |
| 321 | - template: ci/install-package-dependencies.yml |
| 322 | - bash: | |
| 323 | set -x |
| 324 | sudo util/get-toolchain.py \ |
Srikrishna Iyer | 98333ba | 2020-11-16 23:12:29 -0800 | [diff] [blame] | 325 | --install-dir="$TOOLCHAIN_PATH" \ |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 326 | --release-version="$TOOLCHAIN_VERSION" \ |
| 327 | --update |
Rupert Swarbrick | 5427838 | 2020-08-25 12:45:47 +0100 | [diff] [blame] | 328 | echo "##vso[task.prependpath]$TOOLCHAIN_PATH/bin" |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 329 | displayName: Install toolchain |
| 330 | - bash: | |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 331 | python3 --version |
| 332 | fusesoc --version |
| 333 | verilator --version |
| 334 | displayName: Display environment |
| 335 | - bash: | |
Rupert Swarbrick | 7bd2a37 | 2020-10-02 12:36:12 +0100 | [diff] [blame] | 336 | make -C hw/ip/otbn/dv/otbnsim test |
| 337 | displayName: OTBN ISS Test |
| 338 | - bash: | |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 339 | ./hw/ip/otbn/dv/smoke/run_smoke.sh |
| 340 | displayName: OTBN Smoke Test |
Rupert Swarbrick | 5427838 | 2020-08-25 12:45:47 +0100 | [diff] [blame] | 341 | - bash: | |
Rupert Swarbrick | 7087ed8 | 2020-11-13 18:16:46 +0000 | [diff] [blame] | 342 | make -C hw/ip/otbn/util asm-check |
Rupert Swarbrick | 5427838 | 2020-08-25 12:45:47 +0100 | [diff] [blame] | 343 | displayName: Assemble and link code snippets |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 344 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 345 | - job: chip_earlgrey_nexysvideo |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 346 | displayName: Build NexysVideo variant of the Earl Grey toplevel design using Vivado |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 347 | dependsOn: |
| 348 | - lint |
| 349 | # The bootrom is built into the FPGA image at synthesis time. |
Timothy Chen | f835aa3 | 2021-01-08 16:27:50 -0800 | [diff] [blame] | 350 | - sw_build_nexysvideo |
Timothy Chen | 64f6a5a | 2021-02-05 17:04:40 -0800 | [diff] [blame] | 351 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0')) |
Philipp Wagner | c58f6a0 | 2020-10-07 19:57:09 +0100 | [diff] [blame] | 352 | pool: ci-public |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 353 | timeoutInMinutes: 120 # 2 hours |
| 354 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 355 | - template: ci/install-package-dependencies.yml |
| 356 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 357 | parameters: |
| 358 | downloadPartialBuildBinFrom: |
| 359 | - sw_build_nexysvideo |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 360 | - bash: | |
| 361 | set -e |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 362 | . util/build_consts.sh |
Philipp Wagner | c58f6a0 | 2020-10-07 19:57:09 +0100 | [diff] [blame] | 363 | |
| 364 | module load "xilinx/vivado/$(VIVADO_VERSION)" |
| 365 | |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 366 | mkdir -p "$OBJ_DIR/hw" |
| 367 | mkdir -p "$BIN_DIR/hw/top_earlgrey" |
| 368 | |
Timothy Chen | f835aa3 | 2021-01-08 16:27:50 -0800 | [diff] [blame] | 369 | ./hw/top_earlgrey/util/top_earlgrey_reduce.py |
| 370 | |
Greg Chadwick | 1287104 | 2020-04-20 13:42:56 +0100 | [diff] [blame] | 371 | BOOTROM_VMEM="$BIN_DIR/sw/device/boot_rom/boot_rom_fpga_nexysvideo.32.vmem" |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 372 | test -f "$BOOTROM_VMEM" |
Michael Schaffner | 20972a6 | 2021-02-24 18:53:46 -0800 | [diff] [blame] | 373 | OTP_VMEM="$BIN_DIR/sw/device/otp_img/otp_img_fpga_nexysvideo.vmem" |
| 374 | test -f "$OTP_VMEM" |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 375 | |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 376 | fusesoc --cores-root=. \ |
Timothy Chen | be47dd7 | 2020-07-27 14:57:07 -0700 | [diff] [blame] | 377 | run --flag=fileset_top --target=synth --setup --build \ |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 378 | --build-root="$OBJ_DIR/hw" \ |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 379 | lowrisc:systems:chip_earlgrey_nexysvideo \ |
Michael Schaffner | 20972a6 | 2021-02-24 18:53:46 -0800 | [diff] [blame] | 380 | --BootRomInitFile="$BOOTROM_VMEM" \ |
| 381 | --OtpCtrlMemInitFile="$OTP_VMEM" |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 382 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 383 | cp "$OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.bit" \ |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 384 | "$BIN_DIR/hw/top_earlgrey" |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 385 | displayName: Build bitstream with Vivado |
Philipp Wagner | f072c03 | 2020-12-08 17:16:30 +0000 | [diff] [blame] | 386 | - bash: | |
| 387 | . util/build_consts.sh |
| 388 | echo Synthesis log |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 389 | cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.runs/synth_1/runme.log || true |
Philipp Wagner | f072c03 | 2020-12-08 17:16:30 +0000 | [diff] [blame] | 390 | |
| 391 | echo Implementation log |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 392 | cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.runs/impl_1/runme.log || true |
Philipp Wagner | f072c03 | 2020-12-08 17:16:30 +0000 | [diff] [blame] | 393 | condition: always() |
| 394 | displayName: Display synthesis and implementation logs |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 395 | - template: ci/upload-artifacts-template.yml |
Miguel Young de la Sota | b4df860 | 2019-11-21 12:44:11 -0600 | [diff] [blame] | 396 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 397 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 398 | - "/hw/top_earlgrey/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.bit" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 399 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 400 | - job: chip_englishbreakfast_cw305 |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 401 | displayName: Build CW305 variant of the English Breakfast toplevel design using Vivado |
| 402 | dependsOn: |
| 403 | - lint |
| 404 | # The bootrom is built into the FPGA image at synthesis time. |
Pirmin Vogel | c00e37f | 2020-12-23 21:35:47 +0100 | [diff] [blame] | 405 | # Currently, we can't have different versions of binaries in $BIN_DIR. Consequently, we are |
| 406 | # using the NexysVideo bootrom here and the resulting CW305 bitstream is not functional. |
| 407 | # By generating the CW305 bootrom binary we would break execute_fpga_tests executed on the |
| 408 | # NexysVideo. |
Philipp Wagner | 84bfe55 | 2021-02-02 18:48:07 +0000 | [diff] [blame] | 409 | - sw_build_nexysvideo |
Timothy Chen | 64f6a5a | 2021-02-05 17:04:40 -0800 | [diff] [blame] | 410 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0')) |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 411 | pool: ci-public |
| 412 | timeoutInMinutes: 120 # 2 hours |
| 413 | steps: |
| 414 | - template: ci/install-package-dependencies.yml |
| 415 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 416 | parameters: |
| 417 | downloadPartialBuildBinFrom: |
| 418 | - sw_build_nexysvideo |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 419 | - bash: | |
| 420 | set -e |
| 421 | . util/build_consts.sh |
| 422 | |
| 423 | module load "xilinx/vivado/$(VIVADO_VERSION)" |
| 424 | |
| 425 | mkdir -p "$OBJ_DIR/hw" |
| 426 | mkdir -p "$BIN_DIR/hw/top_englishbreakfast" |
| 427 | |
| 428 | BOOTROM_VMEM="$BIN_DIR/sw/device/boot_rom/boot_rom_fpga_nexysvideo.32.vmem" |
| 429 | test -f "$BOOTROM_VMEM" |
| 430 | |
| 431 | fusesoc --cores-root=. \ |
| 432 | run --flag=fileset_topgen --target=synth --setup --build \ |
| 433 | --build-root="$OBJ_DIR/hw" \ |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 434 | lowrisc:systems:chip_englishbreakfast_cw305 \ |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 435 | --BootRomInitFile="$BOOTROM_VMEM" |
| 436 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 437 | cp "$OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit" \ |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 438 | "$BIN_DIR/hw/top_englishbreakfast" |
| 439 | displayName: Build bitstream with Vivado |
| 440 | - template: ci/upload-artifacts-template.yml |
| 441 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 442 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 443 | - "/hw/top_englishbreakfast/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit" |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 444 | |
Philipp Wagner | 11d2dcb | 2020-09-29 16:27:46 +0100 | [diff] [blame] | 445 | - job: execute_fpga_tests |
| 446 | displayName: Execute tests on FPGA |
| 447 | pool: FPGA |
| 448 | timeoutInMinutes: 30 |
| 449 | dependsOn: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 450 | - chip_earlgrey_nexysvideo |
Timothy Chen | f835aa3 | 2021-01-08 16:27:50 -0800 | [diff] [blame] | 451 | - sw_build_nexysvideo |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 452 | - sw_build |
Philipp Wagner | 11d2dcb | 2020-09-29 16:27:46 +0100 | [diff] [blame] | 453 | steps: |
| 454 | - template: ci/install-package-dependencies.yml |
| 455 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 456 | parameters: |
| 457 | downloadPartialBuildBinFrom: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 458 | - chip_earlgrey_nexysvideo |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 459 | - sw_build_nexysvideo |
| 460 | - sw_build |
Philipp Wagner | 11d2dcb | 2020-09-29 16:27:46 +0100 | [diff] [blame] | 461 | - bash: | |
| 462 | set -e |
| 463 | |
| 464 | module load "xilinx/vivado/$(VIVADO_VERSION)" |
| 465 | |
| 466 | # Install an additional pytest dependency for result upload. |
| 467 | pip3 install pytest-azurepipelines |
| 468 | |
| 469 | . util/build_consts.sh |
| 470 | pytest --version |
| 471 | pytest test/systemtest/earlgrey/test_fpga_nexysvideo.py \ |
| 472 | --log-cli-level=DEBUG \ |
| 473 | --test-run-title="Run system tests on Nexys Video FPGA board" \ |
| 474 | --napoleon-docstrings |
Philipp Wagner | 11d2dcb | 2020-09-29 16:27:46 +0100 | [diff] [blame] | 475 | displayName: Execute tests |
| 476 | |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 477 | - job: deploy_release_artifacts |
| 478 | displayName: Package and deploy release distribution |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 479 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 480 | vmImage: ubuntu-18.04 |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 481 | dependsOn: |
| 482 | - lint |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 483 | - sw_build |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 484 | - chip_earlgrey_verilator |
| 485 | - chip_earlgrey_nexysvideo |
Timothy Chen | 64f6a5a | 2021-02-05 17:04:40 -0800 | [diff] [blame] | 486 | condition: and(eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0')) |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 487 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 488 | - template: ci/install-package-dependencies.yml |
| 489 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 490 | parameters: |
| 491 | downloadPartialBuildBinFrom: |
| 492 | - sw_build |
| 493 | - sw_build_nexysvideo |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 494 | - chip_earlgrey_verilator |
| 495 | - chip_earlgrey_nexysvideo |
| 496 | - chip_englishbreakfast_verilator |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 497 | - bash: | |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 498 | . util/build_consts.sh |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 499 | |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 500 | util/make_distribution.sh |
Philipp Wagner | 542e220 | 2019-10-30 13:10:16 +0000 | [diff] [blame] | 501 | |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 502 | tar --list -f $BIN_DIR/opentitan-*.tar.xz |
| 503 | # Put the resulting tar file into a directory the |publish| step below can reference. |
| 504 | mkdir "$BUILD_ROOT/dist-final" |
| 505 | mv $BIN_DIR/opentitan-*.tar.xz "$BUILD_ROOT/dist-final" |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 506 | displayName: Create final dist directory out of partial ones |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 507 | - publish: $(Build.ArtifactStagingDirectory)/dist-final |
| 508 | artifact: opentitan-dist |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 509 | displayName: Upload release artifacts as Azure artifact |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 510 | - task: GithubRelease@0 |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 511 | displayName: Upload to GitHub releases (only tags) |
Philipp Wagner | 0b20f5d | 2019-11-01 16:24:52 +0000 | [diff] [blame] | 512 | condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 513 | inputs: |
| 514 | gitHubConnection: opentitan-release-upload |
| 515 | repositoryName: lowrisc/opentitan |
| 516 | addChangeLog: false |
| 517 | assets: | |
| 518 | $(Build.ArtifactStagingDirectory)/dist-final/* |
Sam Elliott | e257cd0 | 2020-09-10 13:49:38 +0100 | [diff] [blame] | 519 | |
| 520 | |
| 521 | - job: build_docker_containers |
| 522 | displayName: "Build Docker Containers" |
| 523 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 524 | vmImage: ubuntu-18.04 |
Sam Elliott | e257cd0 | 2020-09-10 13:49:38 +0100 | [diff] [blame] | 525 | dependsOn: |
| 526 | - lint |
| 527 | steps: |
| 528 | - task: Docker@2 |
| 529 | displayName: Build Developer Utility Container |
| 530 | inputs: |
| 531 | command: build |
| 532 | Dockerfile: ./util/container/Dockerfile |
| 533 | buildContext: . |
| 534 | - task: Docker@2 |
| 535 | displayName: Build Documentation Builder Container |
| 536 | inputs: |
| 537 | command: build |
| 538 | tags: gcr.io/active-premise-257318/builder |
| 539 | Dockerfile: ./site/docs/builder.Dockerfile |
| 540 | buildContext: . |
| 541 | - task: Docker@2 |
| 542 | displayName: Build Documentation Redirector Container |
| 543 | inputs: |
| 544 | command: build |
| 545 | Dockerfile: ./site/redirector/Dockerfile |
| 546 | buildContext: ./site/redirector |