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: |
Rupert Swarbrick | df23712 | 2021-04-20 14:43:48 +0100 | [diff] [blame] | 9 | # |
Alphan Ulusoy | e220589 | 2021-05-13 09:36:17 -0400 | [diff] [blame] | 10 | # If updating VERILATOR_VERSION, OPENOCD_VERSION, TOOLCHAIN_VERSION or RUST_VERSION |
| 11 | # update the definitions in util/container/Dockerfile as well. |
Rupert Swarbrick | df23712 | 2021-04-20 14:43:48 +0100 | [diff] [blame] | 12 | # |
Philipp Wagner | b27f72d | 2021-07-23 14:41:20 +0100 | [diff] [blame] | 13 | VERILATOR_VERSION: 4.210 |
Philipp Wagner | b02d9c8 | 2021-02-24 15:00:54 +0000 | [diff] [blame] | 14 | OPENOCD_VERSION: 0.11.0 |
Miguel Osorio | 88179fc | 2019-09-19 23:37:48 -0700 | [diff] [blame] | 15 | TOOLCHAIN_PATH: /opt/buildcache/riscv |
Michael Schaffner | 6c1f1da | 2022-04-19 12:40:58 -0700 | [diff] [blame] | 16 | VERIBLE_VERSION: v0.0-2135-gb534c1fe |
Jon Flatley | aa91c77 | 2022-02-16 17:00:27 -0500 | [diff] [blame] | 17 | RUST_VERSION: 1.58.0 |
Miguel Osorio | 88179fc | 2019-09-19 23:37:48 -0700 | [diff] [blame] | 18 | # Release tag from https://github.com/lowRISC/lowrisc-toolchains/releases |
Luís Marques | 01b2cac | 2022-02-10 21:48:11 +0000 | [diff] [blame] | 19 | TOOLCHAIN_VERSION: 20220210-1 |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 20 | # This controls where builds happen, and gets picked up by build_consts.sh. |
| 21 | BUILD_ROOT: $(Build.ArtifactStagingDirectory) |
Philipp Wagner | b8b053f | 2021-05-25 09:26:34 +0100 | [diff] [blame] | 22 | VIVADO_VERSION: "2020.2" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 23 | |
| 24 | trigger: |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 25 | batch: true |
| 26 | branches: |
| 27 | include: |
Philipp Wagner | f565b66 | 2020-07-22 14:04:40 +0100 | [diff] [blame] | 28 | - "*" |
Philipp Wagner | dd1706e | 2020-03-15 14:39:59 +0000 | [diff] [blame] | 29 | tags: |
| 30 | include: |
| 31 | - "*" |
| 32 | pr: |
| 33 | branches: |
| 34 | include: |
Philipp Wagner | f565b66 | 2020-07-22 14:04:40 +0100 | [diff] [blame] | 35 | - "*" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 36 | |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 37 | jobs: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 38 | - job: lint |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 39 | displayName: Run code quality checks (quick lint) |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 40 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 41 | vmImage: ubuntu-18.04 |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 42 | steps: |
| 43 | - bash: | |
Garret Kelly | f5608d0 | 2019-11-01 16:28:11 -0400 | [diff] [blame] | 44 | 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] | 45 | displayName: Remove existing Clang installation |
| 46 | - template: ci/install-package-dependencies.yml |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 47 | ## !!! |
| 48 | ## |
| 49 | ## The steps below here are duplicated in ci/jobs/quick-lint.sh |
| 50 | ## to allow developers to "run CI" locally. Keep them in sync. |
| 51 | ## |
| 52 | ## !!! |
| 53 | - bash: ci/scripts/show-env.sh |
Philipp Wagner | 9986239 | 2020-07-22 13:32:34 +0100 | [diff] [blame] | 54 | displayName: Display environment information |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 55 | - bash: ci/scripts/lint-commits.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 56 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 57 | displayName: Check commit metadata |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 58 | - bash: ci/scripts/check-licence-headers.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 59 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 60 | displayName: Check Licence Headers |
Rupert Swarbrick | f0d5b0c | 2021-03-26 11:48:42 +0000 | [diff] [blame] | 61 | - bash: ci/scripts/exec-check.sh |
| 62 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 63 | displayName: Check executable bits |
Rupert Swarbrick | 5dc62b0 | 2021-04-28 09:39:18 +0100 | [diff] [blame] | 64 | - bash: ci/scripts/check-ascii.sh |
| 65 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 66 | displayName: Check for non-ASCII characters in source code |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 67 | - bash: ci/scripts/python-lint.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Rupert Swarbrick | fb9fdb6 | 2021-02-01 17:30:48 +0000 | [diff] [blame] | 68 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Rupert Swarbrick | 746f9b1 | 2021-03-26 17:19:00 +0000 | [diff] [blame] | 69 | displayName: Run Python lint (flake8) |
Rupert Swarbrick | 2d70c75 | 2020-03-24 17:23:40 +0000 | [diff] [blame] | 70 | continueOnError: true |
Rupert Swarbrick | 746f9b1 | 2021-03-26 17:19:00 +0000 | [diff] [blame] | 71 | - bash: ci/scripts/mypy.sh |
| 72 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 73 | displayName: Run Python lint (mypy) |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 74 | - bash: ci/scripts/check-generated.sh |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 75 | displayName: Ensure all generated files are clean and up-to-date |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 76 | - bash: ci/scripts/clang-format.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 77 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 78 | displayName: Use clang-format to check C/C++ coding style |
Michał Mazurek | a7f3bad | 2022-04-22 20:35:58 +0200 | [diff] [blame] | 79 | - bash: ci/scripts/rust-format.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
| 80 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 81 | displayName: Use rustfmt to check Rust coding style |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 82 | - bash: ci/scripts/include-guard.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
Miguel Young de la Sota | b23dc8c | 2020-01-14 13:52:33 -0500 | [diff] [blame] | 83 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 84 | displayName: Check formatting on header guards |
Miguel Young de la Sota | cf77e21 | 2022-04-21 12:03:48 -0400 | [diff] [blame] | 85 | - bash: ci/scripts/whitespace.sh $SYSTEM_PULLREQUEST_TARGETBRANCH |
| 86 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 87 | displayName: Check trailing whitespace |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 88 | - bash: ci/scripts/verible-lint.sh rtl |
Michael Schaffner | de32606 | 2020-07-14 17:50:35 -0700 | [diff] [blame] | 89 | condition: eq(variables['Build.Reason'], 'PullRequest') |
Michael Schaffner | a94241f | 2020-08-03 15:50:14 -0700 | [diff] [blame] | 90 | displayName: Style-Lint RTL Verilog source files with Verible |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 91 | - bash: ci/scripts/verible-lint.sh dv |
Michael Schaffner | a94241f | 2020-08-03 15:50:14 -0700 | [diff] [blame] | 92 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 93 | displayName: Style-Lint DV Verilog source files with Verible |
Philipp Wagner | d5837ab | 2021-10-01 16:59:49 +0100 | [diff] [blame] | 94 | - bash: ci/scripts/verible-lint.sh fpv |
| 95 | condition: eq(variables['Build.Reason'], 'PullRequest') |
| 96 | displayName: Style-Lint FPV Verilog source files with Verible |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 97 | - bash: ci/scripts/build-docs.sh |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 98 | displayName: Render documentation |
Rupert Swarbrick | 105df01 | 2021-01-29 11:33:13 +0000 | [diff] [blame] | 99 | - bash: ci/scripts/build-site.sh |
Philipp Wagner | 93cdcef | 2021-01-19 14:31:47 +0000 | [diff] [blame] | 100 | displayName: Render landing site |
Rupert Swarbrick | fb9fdb6 | 2021-02-01 17:30:48 +0000 | [diff] [blame] | 101 | - bash: ci/scripts/get-build-type.sh "$SYSTEM_PULLREQUEST_TARGETBRANCH" "$(Build.Reason)" |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 102 | displayName: Check what kinds of changes the PR contains |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 103 | name: DetermineBuildType |
Philipp Wagner | 1e64355 | 2019-09-04 15:39:14 +0100 | [diff] [blame] | 104 | |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 105 | - job: slow_lints |
| 106 | displayName: Run code quality checks (in-depth lint) |
| 107 | dependsOn: lint |
| 108 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 109 | vmImage: ubuntu-18.04 |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 110 | steps: |
| 111 | - template: ci/install-package-dependencies.yml |
Miguel Young de la Sota | 369e027 | 2022-04-21 13:14:23 -0400 | [diff] [blame] | 112 | - bash: ci/bazelisk.sh run buildifier_check |
Drew Macrae | 932a70a | 2022-04-18 16:34:13 -0400 | [diff] [blame] | 113 | displayName: Use buildifier to check Bazel coding style |
Rupert Swarbrick | 2aff11b | 2021-02-16 17:11:37 +0000 | [diff] [blame] | 114 | - bash: ci/scripts/check-vendoring.sh |
Sam Elliott | 67e30fa | 2020-10-06 18:08:05 +0100 | [diff] [blame] | 115 | displayName: Check vendored directories are up-to-date |
| 116 | |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 117 | - job: sw_build |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 118 | displayName: Build Software for Earl Grey toplevel design |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 119 | dependsOn: lint |
Philipp Wagner | 9d20ee6 | 2019-11-29 14:27:28 +0000 | [diff] [blame] | 120 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
Miles Dai | 9125a78 | 2022-04-13 11:35:09 -0400 | [diff] [blame] | 121 | pool: ci-public |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 122 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 123 | - template: ci/install-package-dependencies.yml |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 124 | - bash: | |
| 125 | set -x |
| 126 | sudo util/get-toolchain.py \ |
Srikrishna Iyer | 98333ba | 2020-11-16 23:12:29 -0800 | [diff] [blame] | 127 | --install-dir="$TOOLCHAIN_PATH" \ |
Sam Elliott | eb8ace4 | 2020-06-03 17:47:55 +0100 | [diff] [blame] | 128 | --release-version="$TOOLCHAIN_VERSION" \ |
Philipp Wagner | 1c51441 | 2019-11-27 14:48:47 +0000 | [diff] [blame] | 129 | --update |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 130 | displayName: Install toolchain |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 131 | - bash: | |
Miguel Young de la Sota | 6379357 | 2019-11-13 14:18:51 -0600 | [diff] [blame] | 132 | . util/build_consts.sh |
Miguel Young de la Sota | 4a4946d | 2019-11-21 10:44:18 -0600 | [diff] [blame] | 133 | ./meson_init.sh -A |
Miguel Young de la Sota | 76526c3 | 2020-01-28 10:24:41 -0500 | [diff] [blame] | 134 | ninja -C "$OBJ_DIR" all |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 135 | displayName: Build embedded targets |
Miguel Young de la Sota | 9d20b3d | 2020-02-03 16:35:31 -0500 | [diff] [blame] | 136 | - bash: | |
| 137 | . util/build_consts.sh |
| 138 | ninja -C "$OBJ_DIR" test |
Sam Elliott | eb8ace4 | 2020-06-03 17:47:55 +0100 | [diff] [blame] | 139 | displayName: Run unit tests |
| 140 | - template: ci/upload-artifacts-template.yml |
Miguel Young de la Sota | b4df860 | 2019-11-21 12:44:11 -0600 | [diff] [blame] | 141 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 142 | includePatterns: |
| 143 | - "/sw/***" |
lowRISC Contributors | 802543a | 2019-08-31 12:12:56 +0100 | [diff] [blame] | 144 | |
Greg Chadwick | b045dd8 | 2022-02-15 11:29:24 +0000 | [diff] [blame] | 145 | - job: cw310_sw_build |
| 146 | displayName: Build Software required for CW310 FPGA synthesis |
| 147 | dependsOn: lint |
| 148 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
| 149 | pool: |
| 150 | vmImage: ubuntu-18.04 |
| 151 | steps: |
| 152 | - template: ci/install-package-dependencies.yml |
| 153 | - bash: | |
| 154 | set -x |
| 155 | sudo util/get-toolchain.py \ |
| 156 | --install-dir="$TOOLCHAIN_PATH" \ |
| 157 | --release-version="$TOOLCHAIN_VERSION" \ |
| 158 | --update |
| 159 | displayName: Install toolchain |
| 160 | - bash: | |
| 161 | . util/build_consts.sh |
| 162 | ./meson_init.sh -A |
| 163 | ninja -C "$OBJ_DIR" \ |
| 164 | sw/device/otp_img/otp_img_export_fpga_cw310 \ |
| 165 | sw/device/lib/testing/test_rom/test_rom_export_fpga_cw310 |
| 166 | displayName: Build embedded targets |
| 167 | - template: ci/upload-artifacts-template.yml |
| 168 | parameters: |
| 169 | includePatterns: |
| 170 | - "/sw/***" |
| 171 | |
Pirmin Vogel | 18d8e13 | 2021-08-03 14:35:29 +0200 | [diff] [blame] | 172 | # Software targeting the English Breakfast top level is produced by patching |
| 173 | # the source tree before building. This builds a selected subset of software |
| 174 | # only. |
| 175 | # TODO: This is a rather ugly hack, which will go away once we properly support |
| 176 | # building more than one top-level design with different parametrizations. |
| 177 | # Work towards this goal is tracked in issue #4669. |
| 178 | - job: sw_build_englishbreakfast |
| 179 | displayName: Build Software for English Breakfast toplevel design |
| 180 | dependsOn: lint |
| 181 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
| 182 | pool: |
| 183 | vmImage: ubuntu-18.04 |
| 184 | steps: |
| 185 | - template: ci/install-package-dependencies.yml |
| 186 | - bash: | |
| 187 | set -x |
| 188 | sudo util/get-toolchain.py \ |
| 189 | --install-dir="$TOOLCHAIN_PATH" \ |
| 190 | --release-version="$TOOLCHAIN_VERSION" \ |
| 191 | --update |
| 192 | displayName: Install toolchain |
| 193 | - bash: | |
| 194 | . util/build_consts.sh |
| 195 | ./meson_init.sh -A |
| 196 | # Patch software. |
| 197 | ./hw/top_englishbreakfast/util/prepare_sw.py |
| 198 | # Build FPGA boot ROM and aes_serial binary for FPGA SCA. |
Timothy Trippel | 961b2cd | 2021-12-14 22:28:58 +0000 | [diff] [blame] | 199 | ninja -C "$OBJ_DIR" sw/device/lib/testing/test_rom/test_rom_export_fpga_nexysvideo |
Pirmin Vogel | 18d8e13 | 2021-08-03 14:35:29 +0200 | [diff] [blame] | 200 | ninja -C "$OBJ_DIR" sw/device/sca/aes_serial_export_fpga_nexysvideo |
| 201 | # Build binaries for Verilator simulation. |
Timothy Trippel | 961b2cd | 2021-12-14 22:28:58 +0000 | [diff] [blame] | 202 | ninja -C "$OBJ_DIR" sw/device/lib/testing/test_rom/test_rom_export_sim_verilator |
Timothy Trippel | 0703f96 | 2021-09-02 21:08:20 +0000 | [diff] [blame] | 203 | ninja -C "$OBJ_DIR" sw/device/tests/aes_smoketest_export_sim_verilator |
Pirmin Vogel | 18d8e13 | 2021-08-03 14:35:29 +0200 | [diff] [blame] | 204 | ninja -C "$OBJ_DIR" sw/device/examples/hello_world/hello_world_export_sim_verilator |
| 205 | displayName: Build embedded targets |
| 206 | - template: ci/upload-artifacts-template.yml |
| 207 | parameters: |
| 208 | includePatterns: |
| 209 | - "/sw/device/***" |
| 210 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 211 | - job: chip_earlgrey_verilator |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 212 | displayName: Build Verilator simulation of the Earl Grey toplevel design |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 213 | dependsOn: lint |
Philipp Wagner | 9d20ee6 | 2019-11-29 14:27:28 +0000 | [diff] [blame] | 214 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
Greg Chadwick | 424a57d | 2022-02-15 16:33:00 +0000 | [diff] [blame] | 215 | pool: ci-public |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 216 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 217 | - template: ci/install-package-dependencies.yml |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 218 | - bash: | |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 219 | python3 --version |
| 220 | fusesoc --version |
| 221 | verilator --version |
Michael Schaffner | aa193f9 | 2020-12-16 11:16:17 -0800 | [diff] [blame] | 222 | verible-verilog-lint --version |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 223 | displayName: Display environment |
Rupert Swarbrick | e77e2f1 | 2021-09-03 18:09:53 +0100 | [diff] [blame] | 224 | - bash: ci/scripts/build-chip-verilator.sh earlgrey |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 225 | displayName: Build simulation with Verilator |
| 226 | - template: ci/upload-artifacts-template.yml |
Miguel Young de la Sota | b4df860 | 2019-11-21 12:44:11 -0600 | [diff] [blame] | 227 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 228 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 229 | - "/hw/top_earlgrey/Vchip_earlgrey_verilator" |
Philipp Wagner | f4655a1 | 2019-10-30 11:59:15 +0000 | [diff] [blame] | 230 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 231 | - job: chip_englishbreakfast_verilator |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 232 | displayName: Build Verilator simulation of the English Breakfast toplevel design |
| 233 | dependsOn: lint |
| 234 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0')) |
| 235 | pool: |
| 236 | vmImage: ubuntu-18.04 |
| 237 | steps: |
| 238 | - template: ci/install-package-dependencies.yml |
| 239 | - bash: | |
| 240 | python3 --version |
| 241 | fusesoc --version |
| 242 | verilator --version |
| 243 | verible-verilog-lint --version |
| 244 | displayName: Display environment |
Rupert Swarbrick | e77e2f1 | 2021-09-03 18:09:53 +0100 | [diff] [blame] | 245 | - bash: ci/scripts/build-chip-verilator.sh englishbreakfast |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 246 | displayName: Build simulation with Verilator |
| 247 | - template: ci/upload-artifacts-template.yml |
| 248 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 249 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 250 | - "/hw/top_englishbreakfast/Vchip_englishbreakfast_verilator" |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 251 | |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 252 | - job: execute_verilated_tests |
Alphan Ulusoy | a628be1 | 2021-05-14 16:24:02 -0400 | [diff] [blame] | 253 | displayName: Execute tests on the Verilated system (excl. slow tests) |
Philipp Wagner | a4b89b9 | 2021-05-20 22:25:42 +0100 | [diff] [blame] | 254 | pool: ci-public |
Philipp Wagner | e7d4134 | 2021-10-18 12:19:52 +0100 | [diff] [blame] | 255 | timeoutInMinutes: 120 |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 256 | dependsOn: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 257 | - chip_earlgrey_verilator |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 258 | - sw_build |
| 259 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 260 | - template: ci/install-package-dependencies.yml |
| 261 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 262 | parameters: |
| 263 | downloadPartialBuildBinFrom: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 264 | - chip_earlgrey_verilator |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 265 | - sw_build |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 266 | - bash: | |
Philipp Wagner | 33fadd0 | 2020-09-09 19:39:25 +0100 | [diff] [blame] | 267 | # Install an additional pytest dependency for result upload. |
| 268 | pip3 install pytest-azurepipelines |
| 269 | |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 270 | . util/build_consts.sh |
Philipp Wagner | 57418e7 | 2019-12-02 21:25:27 +0000 | [diff] [blame] | 271 | pytest --version |
Philipp Wagner | 03aaf32 | 2020-09-09 19:11:44 +0100 | [diff] [blame] | 272 | pytest test/systemtest/earlgrey/test_sim_verilator.py \ |
Alphan Ulusoy | a628be1 | 2021-05-14 16:24:02 -0400 | [diff] [blame] | 273 | -m "not slow" \ |
Philipp Wagner | 33fadd0 | 2020-09-09 19:39:25 +0100 | [diff] [blame] | 274 | --log-cli-level=DEBUG \ |
Alphan Ulusoy | a628be1 | 2021-05-14 16:24:02 -0400 | [diff] [blame] | 275 | --test-run-title="Run system tests with Verilator simulation (excl. slow tests)" \ |
Philipp Wagner | 33fadd0 | 2020-09-09 19:39:25 +0100 | [diff] [blame] | 276 | --napoleon-docstrings |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 277 | displayName: Execute tests |
Timothy Chen | 7d1436d | 2019-12-04 17:26:14 -0800 | [diff] [blame] | 278 | |
Pirmin Vogel | 18d8e13 | 2021-08-03 14:35:29 +0200 | [diff] [blame] | 279 | - job: execute_verilated_tests_englishbreakfast |
| 280 | displayName: Execute tests on the Verilated English Breakfast toplevel design |
| 281 | pool: ci-public |
| 282 | dependsOn: |
| 283 | - chip_englishbreakfast_verilator |
| 284 | - sw_build_englishbreakfast |
| 285 | steps: |
| 286 | - template: ci/install-package-dependencies.yml |
| 287 | - template: ci/download-artifacts-template.yml |
| 288 | parameters: |
| 289 | downloadPartialBuildBinFrom: |
| 290 | - chip_englishbreakfast_verilator |
| 291 | - sw_build_englishbreakfast |
| 292 | - bash: | |
| 293 | # Install an additional pytest dependency for result upload. |
| 294 | pip3 install pytest-azurepipelines |
| 295 | |
| 296 | . util/build_consts.sh |
| 297 | pytest --version |
| 298 | pytest test/systemtest/englishbreakfast/test_sim_verilator.py \ |
| 299 | -m "not slow" \ |
| 300 | --log-cli-level=DEBUG \ |
| 301 | --test-run-title="Run English Breakfast system tests with Verilator simulation" \ |
| 302 | --napoleon-docstrings |
| 303 | displayName: Execute tests |
| 304 | |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 305 | - job: otbn_standalone_tests |
| 306 | displayName: Run OTBN Smoke Test |
| 307 | dependsOn: lint |
Philipp Wagner | 8d3e563 | 2020-08-19 14:31:39 +0100 | [diff] [blame] | 308 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 309 | vmImage: ubuntu-18.04 |
Philipp Wagner | bf0ab0a | 2020-12-15 12:03:42 +0000 | [diff] [blame] | 310 | timeoutInMinutes: 10 |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 311 | steps: |
| 312 | - template: ci/install-package-dependencies.yml |
| 313 | - bash: | |
| 314 | set -x |
| 315 | sudo util/get-toolchain.py \ |
Srikrishna Iyer | 98333ba | 2020-11-16 23:12:29 -0800 | [diff] [blame] | 316 | --install-dir="$TOOLCHAIN_PATH" \ |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 317 | --release-version="$TOOLCHAIN_VERSION" \ |
| 318 | --update |
Rupert Swarbrick | 5427838 | 2020-08-25 12:45:47 +0100 | [diff] [blame] | 319 | echo "##vso[task.prependpath]$TOOLCHAIN_PATH/bin" |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 320 | displayName: Install toolchain |
| 321 | - bash: | |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 322 | python3 --version |
| 323 | fusesoc --version |
| 324 | verilator --version |
| 325 | displayName: Display environment |
| 326 | - bash: | |
Rupert Swarbrick | 7bd2a37 | 2020-10-02 12:36:12 +0100 | [diff] [blame] | 327 | make -C hw/ip/otbn/dv/otbnsim test |
| 328 | displayName: OTBN ISS Test |
| 329 | - bash: | |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 330 | ./hw/ip/otbn/dv/smoke/run_smoke.sh |
| 331 | displayName: OTBN Smoke Test |
Rupert Swarbrick | 5427838 | 2020-08-25 12:45:47 +0100 | [diff] [blame] | 332 | - bash: | |
Rupert Swarbrick | 7087ed8 | 2020-11-13 18:16:46 +0000 | [diff] [blame] | 333 | make -C hw/ip/otbn/util asm-check |
Rupert Swarbrick | 5427838 | 2020-08-25 12:45:47 +0100 | [diff] [blame] | 334 | displayName: Assemble and link code snippets |
Greg Chadwick | 99fe064 | 2020-08-04 15:42:45 +0100 | [diff] [blame] | 335 | |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 336 | - job: chip_earlgrey_cw310 |
| 337 | displayName: Build CW310 variant of the Earl Grey toplevel design using Vivado |
| 338 | dependsOn: |
| 339 | - lint |
| 340 | # The bootrom is built into the FPGA image at synthesis time. |
Greg Chadwick | b045dd8 | 2022-02-15 11:29:24 +0000 | [diff] [blame] | 341 | - cw310_sw_build |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 342 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0')) |
| 343 | pool: ci-public |
| 344 | timeoutInMinutes: 120 # 2 hours |
| 345 | steps: |
| 346 | - template: ci/install-package-dependencies.yml |
| 347 | - template: ci/download-artifacts-template.yml |
| 348 | parameters: |
| 349 | downloadPartialBuildBinFrom: |
Greg Chadwick | b045dd8 | 2022-02-15 11:29:24 +0000 | [diff] [blame] | 350 | - cw310_sw_build |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 351 | - bash: | |
| 352 | set -e |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 353 | module load "xilinx/vivado/$(VIVADO_VERSION)" |
Rupert Swarbrick | d9b83ce | 2022-04-07 14:27:59 +0100 | [diff] [blame] | 354 | ci/scripts/build-bitstream-vivado.sh top_earlgrey cw310 |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 355 | displayName: Build bitstream with Vivado |
| 356 | - bash: | |
| 357 | . util/build_consts.sh |
| 358 | echo Synthesis log |
| 359 | cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/synth_1/runme.log || true |
| 360 | |
| 361 | echo Implementation log |
| 362 | cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/impl_1/runme.log || true |
| 363 | condition: always() |
| 364 | displayName: Display synthesis and implementation logs |
| 365 | - template: ci/upload-artifacts-template.yml |
| 366 | parameters: |
| 367 | includePatterns: |
Miguel Osorio | 45e08ff | 2021-11-30 20:39:32 -0800 | [diff] [blame] | 368 | - "/hw/***" |
Philipp Wagner | 9b37c34 | 2021-02-01 16:21:38 +0000 | [diff] [blame] | 369 | - publish: "$(Build.ArtifactStagingDirectory)" |
| 370 | artifact: chip_earlgrey_cw310-build-out |
| 371 | displayName: Upload all Vivado artifacts for CW310 |
| 372 | condition: failed() |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 373 | |
Miguel Osorio | 45e08ff | 2021-11-30 20:39:32 -0800 | [diff] [blame] | 374 | - job: chip_earlgrey_cw310_splice_mask_rom |
| 375 | displayName: Splice mask ROM binary into CW310 bitstream using Vivado |
| 376 | dependsOn: |
| 377 | - chip_earlgrey_cw310 |
| 378 | - sw_build |
| 379 | condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0')) |
| 380 | pool: ci-public |
| 381 | timeoutInMinutes: 10 |
| 382 | steps: |
| 383 | - template: ci/install-package-dependencies.yml |
| 384 | - template: ci/download-artifacts-template.yml |
| 385 | parameters: |
| 386 | downloadPartialBuildBinFrom: |
| 387 | - chip_earlgrey_cw310 |
| 388 | - sw_build |
| 389 | - bash: | |
| 390 | set -e |
| 391 | . util/build_consts.sh |
| 392 | |
| 393 | module load "xilinx/vivado/$(VIVADO_VERSION)" |
| 394 | |
| 395 | util/fpga/splice_rom.sh -t cw310 -T earlgrey -b PROD |
| 396 | |
| 397 | displayName: Splicing bitstream with Vivado |
| 398 | - template: ci/upload-artifacts-template.yml |
| 399 | parameters: |
| 400 | includePatterns: |
| 401 | - "/hw/***" |
Miles Dai | ca6be0f | 2022-04-06 15:27:05 -0400 | [diff] [blame] | 402 | - ${{ if eq(variables['Build.SourceBranchName'], 'master') }}: |
| 403 | - template: ci/gcp-upload-bitstream-template.yml |
| 404 | parameters: |
| 405 | parentDir: "$BIN_DIR/hw/top_earlgrey" |
| 406 | includeFiles: |
| 407 | - "lowrisc_systems_chip_earlgrey_cw310_0.1.bit.orig" |
| 408 | - "lowrisc_systems_chip_earlgrey_cw310_0.1.bit.splice" |
| 409 | gcpKeyFile: "gcpkey.json" |
| 410 | bucketURI: "gs://opentitan-bitstreams/master" |
Miguel Osorio | 45e08ff | 2021-11-30 20:39:32 -0800 | [diff] [blame] | 411 | - publish: "$(Build.ArtifactStagingDirectory)" |
| 412 | artifact: chip_earlgrey_cw310-splice-mask-rom-build-out |
| 413 | displayName: Upload all Vivado artifacts for CW310 |
| 414 | condition: failed() |
| 415 | |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 416 | - job: chip_englishbreakfast_cw305 |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 417 | displayName: Build CW305 variant of the English Breakfast toplevel design using Vivado |
| 418 | dependsOn: |
| 419 | - lint |
Pirmin Vogel | 18d8e13 | 2021-08-03 14:35:29 +0200 | [diff] [blame] | 420 | - sw_build_englishbreakfast |
Timothy Chen | 64f6a5a | 2021-02-05 17:04:40 -0800 | [diff] [blame] | 421 | 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] | 422 | pool: ci-public |
| 423 | timeoutInMinutes: 120 # 2 hours |
| 424 | steps: |
| 425 | - template: ci/install-package-dependencies.yml |
| 426 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 427 | parameters: |
| 428 | downloadPartialBuildBinFrom: |
Pirmin Vogel | 18d8e13 | 2021-08-03 14:35:29 +0200 | [diff] [blame] | 429 | - sw_build_englishbreakfast |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 430 | - bash: | |
| 431 | set -e |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 432 | module load "xilinx/vivado/$(VIVADO_VERSION)" |
Rupert Swarbrick | d9b83ce | 2022-04-07 14:27:59 +0100 | [diff] [blame] | 433 | ci/scripts/build-bitstream-vivado.sh top_englishbreakfast cw305 |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 434 | displayName: Build bitstream with Vivado |
| 435 | - template: ci/upload-artifacts-template.yml |
| 436 | parameters: |
Philipp Wagner | 5aa7ed3 | 2021-02-02 18:53:36 +0000 | [diff] [blame] | 437 | includePatterns: |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 438 | - "/hw/top_englishbreakfast/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit" |
Pirmin Vogel | 2f42ccd | 2020-12-22 20:19:30 +0100 | [diff] [blame] | 439 | |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 440 | - job: execute_fpga_tests_cw310 |
| 441 | displayName: Execute tests on ChipWhisperer CW310 FPGA board |
| 442 | pool: FPGA |
Miles Dai | d6691ca | 2022-04-13 11:28:05 -0400 | [diff] [blame] | 443 | timeoutInMinutes: 8 |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 444 | dependsOn: |
| 445 | - chip_earlgrey_cw310 |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 446 | - sw_build |
| 447 | steps: |
| 448 | - template: ci/install-package-dependencies.yml |
| 449 | - template: ci/download-artifacts-template.yml |
| 450 | parameters: |
| 451 | downloadPartialBuildBinFrom: |
| 452 | - chip_earlgrey_cw310 |
Pirmin Vogel | ad2afea | 2021-05-20 10:43:40 +0200 | [diff] [blame] | 453 | - sw_build |
| 454 | - bash: | |
| 455 | set -e |
| 456 | |
| 457 | # Install an additional pytest dependency for result upload. |
| 458 | pip3 install pytest-azurepipelines |
| 459 | |
| 460 | . util/build_consts.sh |
| 461 | pytest --version |
| 462 | pytest test/systemtest/earlgrey/test_fpga_cw310.py \ |
| 463 | --log-cli-level=DEBUG \ |
| 464 | --test-run-title="Run system tests on ChipWhisperer CW310 FPGA board" \ |
| 465 | --napoleon-docstrings |
| 466 | displayName: Execute tests |
| 467 | |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 468 | - job: deploy_release_artifacts |
| 469 | displayName: Package and deploy release distribution |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 470 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 471 | vmImage: ubuntu-18.04 |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 472 | dependsOn: |
| 473 | - lint |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 474 | - sw_build |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 475 | - chip_earlgrey_verilator |
Philipp Wagner | a0a35a5 | 2021-08-04 16:39:35 +0100 | [diff] [blame] | 476 | - chip_earlgrey_cw310 |
Timothy Chen | 64f6a5a | 2021-02-05 17:04:40 -0800 | [diff] [blame] | 477 | 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] | 478 | steps: |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 479 | - template: ci/install-package-dependencies.yml |
| 480 | - template: ci/download-artifacts-template.yml |
Philipp Wagner | bdfb933 | 2021-02-02 18:10:06 +0000 | [diff] [blame] | 481 | parameters: |
| 482 | downloadPartialBuildBinFrom: |
| 483 | - sw_build |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 484 | - chip_earlgrey_verilator |
Philipp Wagner | a0a35a5 | 2021-08-04 16:39:35 +0100 | [diff] [blame] | 485 | - chip_earlgrey_cw310 |
Michael Schaffner | 93fe50c | 2021-03-31 16:25:42 -0700 | [diff] [blame] | 486 | - chip_englishbreakfast_verilator |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 487 | - bash: | |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 488 | . util/build_consts.sh |
Miguel Young de la Sota | b5be8c6 | 2019-11-20 10:01:09 -0600 | [diff] [blame] | 489 | |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 490 | util/make_distribution.sh |
Philipp Wagner | 542e220 | 2019-10-30 13:10:16 +0000 | [diff] [blame] | 491 | |
Miguel Young de la Sota | d42948c | 2019-11-18 13:56:55 -0600 | [diff] [blame] | 492 | tar --list -f $BIN_DIR/opentitan-*.tar.xz |
| 493 | # Put the resulting tar file into a directory the |publish| step below can reference. |
| 494 | mkdir "$BUILD_ROOT/dist-final" |
| 495 | 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] | 496 | displayName: Create final dist directory out of partial ones |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 497 | - publish: $(Build.ArtifactStagingDirectory)/dist-final |
| 498 | artifact: opentitan-dist |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 499 | displayName: Upload release artifacts as Azure artifact |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 500 | - task: GithubRelease@0 |
Miguel Young de la Sota | a68e307 | 2020-01-02 13:59:54 -0600 | [diff] [blame] | 501 | displayName: Upload to GitHub releases (only tags) |
Philipp Wagner | 0b20f5d | 2019-11-01 16:24:52 +0000 | [diff] [blame] | 502 | condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/')) |
Philipp Wagner | bd9ae43 | 2019-11-01 14:33:30 +0000 | [diff] [blame] | 503 | inputs: |
| 504 | gitHubConnection: opentitan-release-upload |
| 505 | repositoryName: lowrisc/opentitan |
| 506 | addChangeLog: false |
| 507 | assets: | |
| 508 | $(Build.ArtifactStagingDirectory)/dist-final/* |
Sam Elliott | e257cd0 | 2020-09-10 13:49:38 +0100 | [diff] [blame] | 509 | |
| 510 | |
| 511 | - job: build_docker_containers |
| 512 | displayName: "Build Docker Containers" |
| 513 | pool: |
Philipp Wagner | 5d1450c | 2020-10-06 12:26:36 +0100 | [diff] [blame] | 514 | vmImage: ubuntu-18.04 |
Sam Elliott | e257cd0 | 2020-09-10 13:49:38 +0100 | [diff] [blame] | 515 | dependsOn: |
| 516 | - lint |
| 517 | steps: |
| 518 | - task: Docker@2 |
| 519 | displayName: Build Developer Utility Container |
| 520 | inputs: |
| 521 | command: build |
| 522 | Dockerfile: ./util/container/Dockerfile |
| 523 | buildContext: . |
| 524 | - task: Docker@2 |
| 525 | displayName: Build Documentation Builder Container |
| 526 | inputs: |
| 527 | command: build |
| 528 | tags: gcr.io/active-premise-257318/builder |
| 529 | Dockerfile: ./site/docs/builder.Dockerfile |
| 530 | buildContext: . |
| 531 | - task: Docker@2 |
| 532 | displayName: Build Documentation Redirector Container |
| 533 | inputs: |
| 534 | command: build |
| 535 | Dockerfile: ./site/redirector/Dockerfile |
| 536 | buildContext: ./site/redirector |
Drew Macrae | 8a35814 | 2022-01-26 07:20:04 -0800 | [diff] [blame] | 537 | |
Drew Macrae | b90a49c | 2022-04-05 12:17:49 -0400 | [diff] [blame] | 538 | - job: bazel_test |
| 539 | displayName: Bazel Software Build and Test |
Miles Dai | 28acbee | 2022-04-22 16:52:17 -0400 | [diff] [blame] | 540 | timeoutInMinutes: 120 |
Drew Macrae | b90a49c | 2022-04-05 12:17:49 -0400 | [diff] [blame] | 541 | dependsOn: lint |
| 542 | pool: |
| 543 | vmImage: ubuntu-18.04 |
Miles Dai | 1c42d29 | 2022-04-16 00:33:23 -0400 | [diff] [blame] | 544 | variables: |
| 545 | - name: bazelCacheGcpKeyPath |
| 546 | value: '' |
Drew Macrae | b90a49c | 2022-04-05 12:17:49 -0400 | [diff] [blame] | 547 | steps: |
| 548 | - template: ci/install-package-dependencies.yml |
Miles Dai | 1c42d29 | 2022-04-16 00:33:23 -0400 | [diff] [blame] | 549 | - task: DownloadSecureFile@1 |
| 550 | condition: eq(variables['Build.SourceBranchName'], 'master') |
| 551 | name: bazelCacheGcpKey |
| 552 | inputs: |
| 553 | secureFile: "bazel_cache_gcp_key.json" |
| 554 | - bash: echo "##vso[task.setvariable variable=bazelCacheGcpKeyPath]$(bazelCacheGcpKey.secureFilePath)" |
| 555 | condition: eq(variables['Build.SourceBranchName'], 'master') |
| 556 | displayName: Set the remote cache GCP key path |
Miguel Young de la Sota | 369e027 | 2022-04-21 13:14:23 -0400 | [diff] [blame] | 557 | - bash: | |
| 558 | # This command builds all software and runs all unit tests that run on |
| 559 | # the host. |
| 560 | export GCP_BAZEL_CACHE_KEY=$(bazelCacheGcpKeyPath) |
| 561 | ci/bazelisk.sh test \ |
| 562 | --build_tests_only=false \ |
Miguel Young de la Sota | 634aceb | 2022-04-21 13:38:37 -0400 | [diff] [blame] | 563 | --define DISABLE_VERILATOR_BUILD=true \ |
Miguel Young de la Sota | 369e027 | 2022-04-21 13:14:23 -0400 | [diff] [blame] | 564 | --test_tag_filters=-broken,-cw310,-verilator,-dv \ |
| 565 | //sw/... |
| 566 | displayName: "Build and Unit Test Software with Bazel" |