blob: 7b3f3fe398f221fff06d82d9b6781da21364d01c [file] [log] [blame]
Sam Elliottd2028282020-06-02 18:18:54 +01001# 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 Contributors802543a2019-08-31 12:12:56 +01005# Azure Pipelines CI build configuration
6# Documentation at https://aka.ms/yaml
7
8variables:
Rupert Swarbrickdf237122021-04-20 14:43:48 +01009 #
Alphan Ulusoye2205892021-05-13 09:36:17 -040010 # If updating VERILATOR_VERSION, OPENOCD_VERSION, TOOLCHAIN_VERSION or RUST_VERSION
11 # update the definitions in util/container/Dockerfile as well.
Rupert Swarbrickdf237122021-04-20 14:43:48 +010012 #
Philipp Wagnerb27f72d2021-07-23 14:41:20 +010013 VERILATOR_VERSION: 4.210
Philipp Wagnerb02d9c82021-02-24 15:00:54 +000014 OPENOCD_VERSION: 0.11.0
Miguel Osorio88179fc2019-09-19 23:37:48 -070015 TOOLCHAIN_PATH: /opt/buildcache/riscv
Philipp Wagner4db8b1c2021-05-05 09:58:40 +010016 VERIBLE_VERSION: v0.0-1213-g9e5c085
Chris Frantzc4273942021-09-20 14:19:45 -070017 RUST_VERSION: 1.55.0
Miguel Osorio88179fc2019-09-19 23:37:48 -070018 # Release tag from https://github.com/lowRISC/lowrisc-toolchains/releases
Philipp Wagnerca403532021-04-13 09:15:28 +010019 TOOLCHAIN_VERSION: 20210412-1
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -060020 # This controls where builds happen, and gets picked up by build_consts.sh.
21 BUILD_ROOT: $(Build.ArtifactStagingDirectory)
Philipp Wagnerb8b053f2021-05-25 09:26:34 +010022 VIVADO_VERSION: "2020.2"
lowRISC Contributors802543a2019-08-31 12:12:56 +010023
24trigger:
lowRISC Contributors802543a2019-08-31 12:12:56 +010025 batch: true
26 branches:
27 include:
Philipp Wagnerf565b662020-07-22 14:04:40 +010028 - "*"
Philipp Wagnerdd1706e2020-03-15 14:39:59 +000029 tags:
30 include:
31 - "*"
32pr:
33 branches:
34 include:
Philipp Wagnerf565b662020-07-22 14:04:40 +010035 - "*"
lowRISC Contributors802543a2019-08-31 12:12:56 +010036
Philipp Wagnerbd9ae432019-11-01 14:33:30 +000037jobs:
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -060038- job: lint
Sam Elliott67e30fa2020-10-06 18:08:05 +010039 displayName: Run code quality checks (quick lint)
Philipp Wagnerbd9ae432019-11-01 14:33:30 +000040 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +010041 vmImage: ubuntu-18.04
Philipp Wagnerbd9ae432019-11-01 14:33:30 +000042 steps:
43 - bash: |
Garret Kellyf5608d02019-11-01 16:28:11 -040044 sudo apt-get remove -y clang-6.0 libclang-common-6.0-dev libclang1-6.0 libllvm6.0
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -060045 displayName: Remove existing Clang installation
46 - template: ci/install-package-dependencies.yml
Rupert Swarbrick105df012021-01-29 11:33:13 +000047 ## !!!
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 Wagner99862392020-07-22 13:32:34 +010054 displayName: Display environment information
Rupert Swarbrick105df012021-01-29 11:33:13 +000055 - bash: ci/scripts/lint-commits.sh $SYSTEM_PULLREQUEST_TARGETBRANCH
Philipp Wagner93cdcef2021-01-19 14:31:47 +000056 condition: eq(variables['Build.Reason'], 'PullRequest')
57 displayName: Check commit metadata
Rupert Swarbrick105df012021-01-29 11:33:13 +000058 - bash: ci/scripts/check-licence-headers.sh $SYSTEM_PULLREQUEST_TARGETBRANCH
Philipp Wagner93cdcef2021-01-19 14:31:47 +000059 condition: eq(variables['Build.Reason'], 'PullRequest')
60 displayName: Check Licence Headers
Rupert Swarbrickf0d5b0c2021-03-26 11:48:42 +000061 - bash: ci/scripts/exec-check.sh
62 condition: eq(variables['Build.Reason'], 'PullRequest')
63 displayName: Check executable bits
Rupert Swarbrick5dc62b02021-04-28 09:39:18 +010064 - bash: ci/scripts/check-ascii.sh
65 condition: eq(variables['Build.Reason'], 'PullRequest')
66 displayName: Check for non-ASCII characters in source code
Rupert Swarbrick105df012021-01-29 11:33:13 +000067 - bash: ci/scripts/python-lint.sh $SYSTEM_PULLREQUEST_TARGETBRANCH
Rupert Swarbrickfb9fdb62021-02-01 17:30:48 +000068 condition: eq(variables['Build.Reason'], 'PullRequest')
Rupert Swarbrick746f9b12021-03-26 17:19:00 +000069 displayName: Run Python lint (flake8)
Rupert Swarbrick2d70c752020-03-24 17:23:40 +000070 continueOnError: true
Rupert Swarbrick746f9b12021-03-26 17:19:00 +000071 - bash: ci/scripts/mypy.sh
72 condition: eq(variables['Build.Reason'], 'PullRequest')
73 displayName: Run Python lint (mypy)
Rupert Swarbrick105df012021-01-29 11:33:13 +000074 - bash: ci/scripts/check-generated.sh
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -060075 displayName: Ensure all generated files are clean and up-to-date
Rupert Swarbrick105df012021-01-29 11:33:13 +000076 - bash: ci/scripts/clang-format.sh $SYSTEM_PULLREQUEST_TARGETBRANCH
Philipp Wagnerbd9ae432019-11-01 14:33:30 +000077 condition: eq(variables['Build.Reason'], 'PullRequest')
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -060078 displayName: Use clang-format to check C/C++ coding style
Rupert Swarbrick105df012021-01-29 11:33:13 +000079 - bash: ci/scripts/include-guard.sh $SYSTEM_PULLREQUEST_TARGETBRANCH
Miguel Young de la Sotab23dc8c2020-01-14 13:52:33 -050080 condition: eq(variables['Build.Reason'], 'PullRequest')
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -060081 displayName: Check formatting on header guards
Rafal Kapuscik5802fd82021-04-14 16:03:31 +020082 - bash: ci/scripts/verible-format.sh
83 condition: eq(variables['Build.Reason'], 'PullRequest')
84 displayName: Check formatting of files on allow list with Verible
85 continueOnError: true
Rupert Swarbrick105df012021-01-29 11:33:13 +000086 - bash: ci/scripts/verible-lint.sh rtl
Michael Schaffnerde326062020-07-14 17:50:35 -070087 condition: eq(variables['Build.Reason'], 'PullRequest')
Michael Schaffnera94241f2020-08-03 15:50:14 -070088 displayName: Style-Lint RTL Verilog source files with Verible
Rupert Swarbrick105df012021-01-29 11:33:13 +000089 - bash: ci/scripts/verible-lint.sh dv
Michael Schaffnera94241f2020-08-03 15:50:14 -070090 condition: eq(variables['Build.Reason'], 'PullRequest')
91 displayName: Style-Lint DV Verilog source files with Verible
Philipp Wagnerd5837ab2021-10-01 16:59:49 +010092 - bash: ci/scripts/verible-lint.sh fpv
93 condition: eq(variables['Build.Reason'], 'PullRequest')
94 displayName: Style-Lint FPV Verilog source files with Verible
Rupert Swarbrick105df012021-01-29 11:33:13 +000095 - bash: ci/scripts/build-docs.sh
Philipp Wagner93cdcef2021-01-19 14:31:47 +000096 displayName: Render documentation
Rupert Swarbrick105df012021-01-29 11:33:13 +000097 - bash: ci/scripts/build-site.sh
Philipp Wagner93cdcef2021-01-19 14:31:47 +000098 displayName: Render landing site
Rupert Swarbrickfb9fdb62021-02-01 17:30:48 +000099 - bash: ci/scripts/get-build-type.sh "$SYSTEM_PULLREQUEST_TARGETBRANCH" "$(Build.Reason)"
Greg Chadwick99fe0642020-08-04 15:42:45 +0100100 displayName: Check what kinds of changes the PR contains
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000101 name: DetermineBuildType
Philipp Wagner1e643552019-09-04 15:39:14 +0100102
Sam Elliott67e30fa2020-10-06 18:08:05 +0100103- job: slow_lints
104 displayName: Run code quality checks (in-depth lint)
105 dependsOn: lint
106 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100107 vmImage: ubuntu-18.04
Sam Elliott67e30fa2020-10-06 18:08:05 +0100108 steps:
109 - template: ci/install-package-dependencies.yml
Rupert Swarbrick2aff11b2021-02-16 17:11:37 +0000110 - bash: ci/scripts/check-vendoring.sh
Sam Elliott67e30fa2020-10-06 18:08:05 +0100111 displayName: Check vendored directories are up-to-date
112
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600113- job: sw_build
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100114 displayName: Build Software for Earl Grey toplevel design
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000115 dependsOn: lint
Philipp Wagner9d20ee62019-11-29 14:27:28 +0000116 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'))
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000117 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100118 vmImage: ubuntu-18.04
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000119 steps:
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600120 - template: ci/install-package-dependencies.yml
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000121 - bash: |
122 set -x
123 sudo util/get-toolchain.py \
Srikrishna Iyer98333ba2020-11-16 23:12:29 -0800124 --install-dir="$TOOLCHAIN_PATH" \
Sam Elliotteb8ace42020-06-03 17:47:55 +0100125 --release-version="$TOOLCHAIN_VERSION" \
Philipp Wagner1c514412019-11-27 14:48:47 +0000126 --update
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600127 displayName: Install toolchain
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000128 - bash: |
Miguel Young de la Sota63793572019-11-13 14:18:51 -0600129 . util/build_consts.sh
Miguel Young de la Sota4a4946d2019-11-21 10:44:18 -0600130 ./meson_init.sh -A
Miguel Young de la Sota76526c32020-01-28 10:24:41 -0500131 ninja -C "$OBJ_DIR" all
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600132 displayName: Build embedded targets
Miguel Young de la Sota9d20b3d2020-02-03 16:35:31 -0500133 - bash: |
134 . util/build_consts.sh
135 ninja -C "$OBJ_DIR" test
Sam Elliotteb8ace42020-06-03 17:47:55 +0100136 displayName: Run unit tests
Philipp Wagner622ec3f2021-02-02 18:37:24 +0000137 - bash: |
138 . util/build_consts.sh
139 # Remove all Nexys Video-related build artifacts, which will be produced
140 # by the sw_build_nexysvideo job below (see comment there).
141 find "$BIN_DIR/sw/device" -name '*fpga_nexysvideo*' -type f -delete
142 displayName: Delete all Nexys Video build artifacts
Sam Elliotteb8ace42020-06-03 17:47:55 +0100143 - template: ci/upload-artifacts-template.yml
Miguel Young de la Sotab4df8602019-11-21 12:44:11 -0600144 parameters:
Philipp Wagner5aa7ed32021-02-02 18:53:36 +0000145 includePatterns:
146 - "/sw/***"
lowRISC Contributors802543a2019-08-31 12:12:56 +0100147
Philipp Wagner622ec3f2021-02-02 18:37:24 +0000148# Software targeting the Nexys Video board is produced by patching the source
149# tree before building. This produces a full sw build tree, however only the
150# artifacts with "nexysvideo" in the name are actually the ones we're looking
151# for. Everything else will be discarded.
152# TODO: This is a rather ugly hack, which will go away once we properly support
153# building more than one top-level design with different parametrizations.
154# Work towards this goal is tracked in issue #4669.
Timothy Chenf835aa32021-01-08 16:27:50 -0800155- job: sw_build_nexysvideo
156 displayName: Build Software for Earl Grey toplevel design targeting the Nexys Video board
157 dependsOn: lint
Timothy Chenac28d1e2021-08-18 10:58:23 -0700158 # Make the following condition always false for now, see #7814.
159 condition: and(succeeded(), False, eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'))
Timothy Chenf835aa32021-01-08 16:27:50 -0800160 pool:
161 vmImage: ubuntu-18.04
162 steps:
163 - template: ci/install-package-dependencies.yml
164 - bash: |
165 set -x
166 sudo util/get-toolchain.py \
167 --install-dir="$TOOLCHAIN_PATH" \
168 --release-version="$TOOLCHAIN_VERSION" \
169 --update
170 displayName: Install toolchain
171 - bash: |
172 . util/build_consts.sh
173 ./hw/top_earlgrey/util/top_earlgrey_reduce.py
174 ./meson_init.sh -A
175 ninja -C "$OBJ_DIR" all
Philipp Wagner622ec3f2021-02-02 18:37:24 +0000176
177 # Delete all build artifacts which are *not* for the Nexys Video board.
178 find "$BIN_DIR/sw/device" -not -name '*fpga_nexysvideo*' -type f -delete
Timothy Chenf835aa32021-01-08 16:27:50 -0800179 displayName: Build embedded targets
180 - bash: |
181 . util/build_consts.sh
182 ninja -C "$OBJ_DIR" test
183 displayName: Run unit tests
184 - template: ci/upload-artifacts-template.yml
185 parameters:
Philipp Wagner5aa7ed32021-02-02 18:53:36 +0000186 includePatterns:
187 - "/sw/device/**/*nexysvideo*"
Timothy Chenf835aa32021-01-08 16:27:50 -0800188
Pirmin Vogel18d8e132021-08-03 14:35:29 +0200189# Software targeting the English Breakfast top level is produced by patching
190# the source tree before building. This builds a selected subset of software
191# only.
192# TODO: This is a rather ugly hack, which will go away once we properly support
193# building more than one top-level design with different parametrizations.
194# Work towards this goal is tracked in issue #4669.
195- job: sw_build_englishbreakfast
196 displayName: Build Software for English Breakfast toplevel design
197 dependsOn: lint
198 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'))
199 pool:
200 vmImage: ubuntu-18.04
201 steps:
202 - template: ci/install-package-dependencies.yml
203 - bash: |
204 set -x
205 sudo util/get-toolchain.py \
206 --install-dir="$TOOLCHAIN_PATH" \
207 --release-version="$TOOLCHAIN_VERSION" \
208 --update
209 displayName: Install toolchain
210 - bash: |
211 . util/build_consts.sh
212 ./meson_init.sh -A
213 # Patch software.
214 ./hw/top_englishbreakfast/util/prepare_sw.py
215 # Build FPGA boot ROM and aes_serial binary for FPGA SCA.
216 ninja -C "$OBJ_DIR" sw/device/boot_rom/boot_rom_export_fpga_nexysvideo
217 ninja -C "$OBJ_DIR" sw/device/sca/aes_serial_export_fpga_nexysvideo
218 # Build binaries for Verilator simulation.
219 ninja -C "$OBJ_DIR" sw/device/boot_rom/boot_rom_export_sim_verilator
Timothy Trippel0703f962021-09-02 21:08:20 +0000220 ninja -C "$OBJ_DIR" sw/device/tests/aes_smoketest_export_sim_verilator
Pirmin Vogel18d8e132021-08-03 14:35:29 +0200221 ninja -C "$OBJ_DIR" sw/device/examples/hello_world/hello_world_export_sim_verilator
222 displayName: Build embedded targets
223 - template: ci/upload-artifacts-template.yml
224 parameters:
225 includePatterns:
226 - "/sw/device/***"
227
Luís Marques5849cd12020-06-26 10:33:55 +0100228# We continue building with GCC, despite defaulting to Clang. This is a copy of
229# `sw_build` with `meson_init.sh` configured with the GCC toolchain, instead of
230# the default toolchain.
231- job: sw_build_gcc
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100232 displayName: Build Software for Earl Grey toplevel design (with GCC)
Sam Elliott7a00a4b2020-06-03 17:48:10 +0100233 dependsOn: lint
234 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'))
235 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100236 vmImage: ubuntu-18.04
Sam Elliott7a00a4b2020-06-03 17:48:10 +0100237 steps:
238 - template: ci/install-package-dependencies.yml
239 - bash: |
240 set -x
241 sudo util/get-toolchain.py \
Srikrishna Iyer98333ba2020-11-16 23:12:29 -0800242 --install-dir="$TOOLCHAIN_PATH" \
Sam Elliott7a00a4b2020-06-03 17:48:10 +0100243 --release-version="$TOOLCHAIN_VERSION" \
244 --update
245 displayName: Install toolchain
246 - bash: |
247 . util/build_consts.sh
248 ./meson_init.sh -A \
Luís Marques5849cd12020-06-26 10:33:55 +0100249 -t "$TOOLCHAIN_PATH/meson-riscv32-unknown-elf-gcc.txt"
Sam Elliott7a00a4b2020-06-03 17:48:10 +0100250 ninja -C "$OBJ_DIR" all
251 displayName: Build embedded targets
Sam Elliott7a00a4b2020-06-03 17:48:10 +0100252 - bash: |
253 . util/build_consts.sh
254 ninja -C "$OBJ_DIR" test
255 displayName: Run unit tests
Sam Elliott7a00a4b2020-06-03 17:48:10 +0100256
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700257- job: chip_earlgrey_verilator
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600258 displayName: Build Verilator simulation of the Earl Grey toplevel design
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000259 dependsOn: lint
Philipp Wagner9d20ee62019-11-29 14:27:28 +0000260 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'))
Philipp Wagner0907ca12020-04-21 12:04:32 +0100261 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100262 vmImage: ubuntu-18.04
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000263 steps:
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600264 - template: ci/install-package-dependencies.yml
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000265 - bash: |
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000266 python3 --version
267 fusesoc --version
268 verilator --version
Michael Schaffneraa193f92020-12-16 11:16:17 -0800269 verible-verilog-lint --version
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600270 displayName: Display environment
Rupert Swarbricke77e2f12021-09-03 18:09:53 +0100271 - bash: ci/scripts/build-chip-verilator.sh earlgrey
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600272 displayName: Build simulation with Verilator
273 - template: ci/upload-artifacts-template.yml
Miguel Young de la Sotab4df8602019-11-21 12:44:11 -0600274 parameters:
Philipp Wagner5aa7ed32021-02-02 18:53:36 +0000275 includePatterns:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700276 - "/hw/top_earlgrey/Vchip_earlgrey_verilator"
Philipp Wagnerf4655a12019-10-30 11:59:15 +0000277
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700278- job: chip_englishbreakfast_verilator
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100279 displayName: Build Verilator simulation of the English Breakfast toplevel design
280 dependsOn: lint
281 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'))
282 pool:
283 vmImage: ubuntu-18.04
284 steps:
285 - template: ci/install-package-dependencies.yml
286 - bash: |
287 python3 --version
288 fusesoc --version
289 verilator --version
290 verible-verilog-lint --version
291 displayName: Display environment
Rupert Swarbricke77e2f12021-09-03 18:09:53 +0100292 - bash: ci/scripts/build-chip-verilator.sh englishbreakfast
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100293 displayName: Build simulation with Verilator
294 - template: ci/upload-artifacts-template.yml
295 parameters:
Philipp Wagner5aa7ed32021-02-02 18:53:36 +0000296 includePatterns:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700297 - "/hw/top_englishbreakfast/Vchip_englishbreakfast_verilator"
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100298
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600299- job: execute_verilated_tests
Alphan Ulusoya628be12021-05-14 16:24:02 -0400300 displayName: Execute tests on the Verilated system (excl. slow tests)
Philipp Wagnera4b89b92021-05-20 22:25:42 +0100301 pool: ci-public
Philipp Wagnere7d41342021-10-18 12:19:52 +0100302 timeoutInMinutes: 120
Timothy Chen7d1436d2019-12-04 17:26:14 -0800303 dependsOn:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700304 - chip_earlgrey_verilator
Timothy Chen7d1436d2019-12-04 17:26:14 -0800305 - sw_build
306 steps:
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600307 - template: ci/install-package-dependencies.yml
308 - template: ci/download-artifacts-template.yml
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000309 parameters:
310 downloadPartialBuildBinFrom:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700311 - chip_earlgrey_verilator
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000312 - sw_build
Timothy Chen7d1436d2019-12-04 17:26:14 -0800313 - bash: |
Philipp Wagner33fadd02020-09-09 19:39:25 +0100314 # Install an additional pytest dependency for result upload.
315 pip3 install pytest-azurepipelines
316
Timothy Chen7d1436d2019-12-04 17:26:14 -0800317 . util/build_consts.sh
Philipp Wagner57418e72019-12-02 21:25:27 +0000318 pytest --version
Philipp Wagner03aaf322020-09-09 19:11:44 +0100319 pytest test/systemtest/earlgrey/test_sim_verilator.py \
Alphan Ulusoya628be12021-05-14 16:24:02 -0400320 -m "not slow" \
Philipp Wagner33fadd02020-09-09 19:39:25 +0100321 --log-cli-level=DEBUG \
Alphan Ulusoya628be12021-05-14 16:24:02 -0400322 --test-run-title="Run system tests with Verilator simulation (excl. slow tests)" \
Philipp Wagner33fadd02020-09-09 19:39:25 +0100323 --napoleon-docstrings
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600324 displayName: Execute tests
Timothy Chen7d1436d2019-12-04 17:26:14 -0800325
Pirmin Vogel18d8e132021-08-03 14:35:29 +0200326- job: execute_verilated_tests_englishbreakfast
327 displayName: Execute tests on the Verilated English Breakfast toplevel design
328 pool: ci-public
329 dependsOn:
330 - chip_englishbreakfast_verilator
331 - sw_build_englishbreakfast
332 steps:
333 - template: ci/install-package-dependencies.yml
334 - template: ci/download-artifacts-template.yml
335 parameters:
336 downloadPartialBuildBinFrom:
337 - chip_englishbreakfast_verilator
338 - sw_build_englishbreakfast
339 - bash: |
340 # Install an additional pytest dependency for result upload.
341 pip3 install pytest-azurepipelines
342
343 . util/build_consts.sh
344 pytest --version
345 pytest test/systemtest/englishbreakfast/test_sim_verilator.py \
346 -m "not slow" \
347 --log-cli-level=DEBUG \
348 --test-run-title="Run English Breakfast system tests with Verilator simulation" \
349 --napoleon-docstrings
350 displayName: Execute tests
351
Greg Chadwickbf9dc382020-04-17 09:30:40 +0100352- template: ci/run-riscv-compliance.yml
353 parameters:
354 rvc_test_suites:
355 - rv32i
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600356
Greg Chadwickbf9dc382020-04-17 09:30:40 +0100357- template: ci/run-riscv-compliance.yml
358 parameters:
359 rvc_test_suites:
360 - rv32im
361 - rv32imc
362 - rv32Zicsr
Timothy Chen7d1436d2019-12-04 17:26:14 -0800363
Greg Chadwick99fe0642020-08-04 15:42:45 +0100364- job: otbn_standalone_tests
365 displayName: Run OTBN Smoke Test
366 dependsOn: lint
Philipp Wagner8d3e5632020-08-19 14:31:39 +0100367 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100368 vmImage: ubuntu-18.04
Philipp Wagnerbf0ab0a2020-12-15 12:03:42 +0000369 timeoutInMinutes: 10
Greg Chadwick99fe0642020-08-04 15:42:45 +0100370 steps:
371 - template: ci/install-package-dependencies.yml
372 - bash: |
373 set -x
374 sudo util/get-toolchain.py \
Srikrishna Iyer98333ba2020-11-16 23:12:29 -0800375 --install-dir="$TOOLCHAIN_PATH" \
Greg Chadwick99fe0642020-08-04 15:42:45 +0100376 --release-version="$TOOLCHAIN_VERSION" \
377 --update
Rupert Swarbrick54278382020-08-25 12:45:47 +0100378 echo "##vso[task.prependpath]$TOOLCHAIN_PATH/bin"
Greg Chadwick99fe0642020-08-04 15:42:45 +0100379 displayName: Install toolchain
380 - bash: |
Greg Chadwick99fe0642020-08-04 15:42:45 +0100381 python3 --version
382 fusesoc --version
383 verilator --version
384 displayName: Display environment
385 - bash: |
Rupert Swarbrick7bd2a372020-10-02 12:36:12 +0100386 make -C hw/ip/otbn/dv/otbnsim test
387 displayName: OTBN ISS Test
388 - bash: |
Greg Chadwick99fe0642020-08-04 15:42:45 +0100389 ./hw/ip/otbn/dv/smoke/run_smoke.sh
390 displayName: OTBN Smoke Test
Rupert Swarbrick54278382020-08-25 12:45:47 +0100391 - bash: |
Rupert Swarbrick7087ed82020-11-13 18:16:46 +0000392 make -C hw/ip/otbn/util asm-check
Rupert Swarbrick54278382020-08-25 12:45:47 +0100393 displayName: Assemble and link code snippets
Greg Chadwick99fe0642020-08-04 15:42:45 +0100394
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200395- job: chip_earlgrey_cw310
396 displayName: Build CW310 variant of the Earl Grey toplevel design using Vivado
397 dependsOn:
398 - lint
399 # The bootrom is built into the FPGA image at synthesis time.
Pirmin Vogelb41684f2021-07-20 09:49:50 +0200400 - sw_build
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200401 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0'))
402 pool: ci-public
403 timeoutInMinutes: 120 # 2 hours
404 steps:
405 - template: ci/install-package-dependencies.yml
406 - template: ci/download-artifacts-template.yml
407 parameters:
408 downloadPartialBuildBinFrom:
Pirmin Vogelb41684f2021-07-20 09:49:50 +0200409 - sw_build
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200410 - bash: |
411 set -e
412 . util/build_consts.sh
413
414 module load "xilinx/vivado/$(VIVADO_VERSION)"
415
416 mkdir -p "$OBJ_DIR/hw"
417 mkdir -p "$BIN_DIR/hw/top_earlgrey"
418
Pirmin Vogelb41684f2021-07-20 09:49:50 +0200419 BOOTROM_VMEM="$BIN_DIR/sw/device/boot_rom/boot_rom_fpga_cw310.scr.39.vmem"
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200420 test -f "$BOOTROM_VMEM"
Pirmin Vogelb41684f2021-07-20 09:49:50 +0200421 OTP_VMEM="$BIN_DIR/sw/device/otp_img/otp_img_fpga_cw310.vmem"
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200422 test -f "$OTP_VMEM"
423
424 fusesoc --cores-root=. \
425 run --flag=fileset_top --target=synth --setup --build \
426 --build-root="$OBJ_DIR/hw" \
427 lowrisc:systems:chip_earlgrey_cw310 \
428 --BootRomInitFile="$BOOTROM_VMEM" \
429 --OtpCtrlMemInitFile="$OTP_VMEM"
430
431 cp "$OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.bit" \
432 "$BIN_DIR/hw/top_earlgrey"
Miguel Osorio45e08ff2021-11-30 20:39:32 -0800433 cp "$OBJ_DIR/hw/synth-vivado/rom.mmi" "$BIN_DIR/hw/top_earlgrey"
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200434 displayName: Build bitstream with Vivado
435 - bash: |
436 . util/build_consts.sh
437 echo Synthesis log
438 cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/synth_1/runme.log || true
439
440 echo Implementation log
441 cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/impl_1/runme.log || true
442 condition: always()
443 displayName: Display synthesis and implementation logs
444 - template: ci/upload-artifacts-template.yml
445 parameters:
446 includePatterns:
Miguel Osorio45e08ff2021-11-30 20:39:32 -0800447 - "/hw/***"
Philipp Wagner9b37c342021-02-01 16:21:38 +0000448 - publish: "$(Build.ArtifactStagingDirectory)"
449 artifact: chip_earlgrey_cw310-build-out
450 displayName: Upload all Vivado artifacts for CW310
451 condition: failed()
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200452
Miguel Osorio45e08ff2021-11-30 20:39:32 -0800453- job: chip_earlgrey_cw310_splice_mask_rom
454 displayName: Splice mask ROM binary into CW310 bitstream using Vivado
455 dependsOn:
456 - chip_earlgrey_cw310
457 - sw_build
458 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0'))
459 pool: ci-public
460 timeoutInMinutes: 10
461 steps:
462 - template: ci/install-package-dependencies.yml
463 - template: ci/download-artifacts-template.yml
464 parameters:
465 downloadPartialBuildBinFrom:
466 - chip_earlgrey_cw310
467 - sw_build
468 - bash: |
469 set -e
470 . util/build_consts.sh
471
472 module load "xilinx/vivado/$(VIVADO_VERSION)"
473
474 util/fpga/splice_rom.sh -t cw310 -T earlgrey -b PROD
475
476 displayName: Splicing bitstream with Vivado
477 - template: ci/upload-artifacts-template.yml
478 parameters:
479 includePatterns:
480 - "/hw/***"
481 - publish: "$(Build.ArtifactStagingDirectory)"
482 artifact: chip_earlgrey_cw310-splice-mask-rom-build-out
483 displayName: Upload all Vivado artifacts for CW310
484 condition: failed()
485
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700486- job: chip_earlgrey_nexysvideo
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600487 displayName: Build NexysVideo variant of the Earl Grey toplevel design using Vivado
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000488 dependsOn:
489 - lint
490 # The bootrom is built into the FPGA image at synthesis time.
Timothy Chenf835aa32021-01-08 16:27:50 -0800491 - sw_build_nexysvideo
Timothy Chenac28d1e2021-08-18 10:58:23 -0700492 # Make the following condition always false for now, see #7814.
493 condition: and(succeeded(), False, eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0'))
Philipp Wagnerc58f6a02020-10-07 19:57:09 +0100494 pool: ci-public
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000495 timeoutInMinutes: 120 # 2 hours
496 steps:
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600497 - template: ci/install-package-dependencies.yml
498 - template: ci/download-artifacts-template.yml
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000499 parameters:
500 downloadPartialBuildBinFrom:
501 - sw_build_nexysvideo
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000502 - bash: |
503 set -e
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600504 . util/build_consts.sh
Philipp Wagnerc58f6a02020-10-07 19:57:09 +0100505
506 module load "xilinx/vivado/$(VIVADO_VERSION)"
507
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600508 mkdir -p "$OBJ_DIR/hw"
509 mkdir -p "$BIN_DIR/hw/top_earlgrey"
510
Timothy Chenf835aa32021-01-08 16:27:50 -0800511 ./hw/top_earlgrey/util/top_earlgrey_reduce.py
512
Rupert Swarbrick54c37c42021-07-15 15:06:42 +0100513 BOOTROM_VMEM="$BIN_DIR/sw/device/boot_rom/boot_rom_fpga_nexysvideo.scr.39.vmem"
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600514 test -f "$BOOTROM_VMEM"
Michael Schaffner20972a62021-02-24 18:53:46 -0800515 OTP_VMEM="$BIN_DIR/sw/device/otp_img/otp_img_fpga_nexysvideo.vmem"
516 test -f "$OTP_VMEM"
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600517
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600518 fusesoc --cores-root=. \
Timothy Chenbe47dd72020-07-27 14:57:07 -0700519 run --flag=fileset_top --target=synth --setup --build \
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600520 --build-root="$OBJ_DIR/hw" \
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700521 lowrisc:systems:chip_earlgrey_nexysvideo \
Michael Schaffner20972a62021-02-24 18:53:46 -0800522 --BootRomInitFile="$BOOTROM_VMEM" \
523 --OtpCtrlMemInitFile="$OTP_VMEM"
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600524
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700525 cp "$OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.bit" \
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600526 "$BIN_DIR/hw/top_earlgrey"
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600527 displayName: Build bitstream with Vivado
Philipp Wagnerf072c032020-12-08 17:16:30 +0000528 - bash: |
529 . util/build_consts.sh
530 echo Synthesis log
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700531 cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.runs/synth_1/runme.log || true
Philipp Wagnerf072c032020-12-08 17:16:30 +0000532
533 echo Implementation log
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700534 cat $OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.runs/impl_1/runme.log || true
Philipp Wagnerf072c032020-12-08 17:16:30 +0000535 condition: always()
536 displayName: Display synthesis and implementation logs
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600537 - template: ci/upload-artifacts-template.yml
Miguel Young de la Sotab4df8602019-11-21 12:44:11 -0600538 parameters:
Philipp Wagner5aa7ed32021-02-02 18:53:36 +0000539 includePatterns:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700540 - "/hw/top_earlgrey/lowrisc_systems_chip_earlgrey_nexysvideo_0.1.bit"
Philipp Wagner9b37c342021-02-01 16:21:38 +0000541 - publish: "$(Build.ArtifactStagingDirectory)"
542 artifact: chip_earlgrey_nexysvideo-build-out
543 displayName: Upload all Vivado artifacts for Nexys Video
544 condition: failed()
lowRISC Contributors802543a2019-08-31 12:12:56 +0100545
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700546- job: chip_englishbreakfast_cw305
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100547 displayName: Build CW305 variant of the English Breakfast toplevel design using Vivado
548 dependsOn:
549 - lint
Pirmin Vogel18d8e132021-08-03 14:35:29 +0200550 - sw_build_englishbreakfast
Timothy Chen64f6a5a2021-02-05 17:04:40 -0800551 condition: and(succeeded(), eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0'))
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100552 pool: ci-public
553 timeoutInMinutes: 120 # 2 hours
554 steps:
555 - template: ci/install-package-dependencies.yml
556 - template: ci/download-artifacts-template.yml
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000557 parameters:
558 downloadPartialBuildBinFrom:
Pirmin Vogel18d8e132021-08-03 14:35:29 +0200559 - sw_build_englishbreakfast
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100560 - bash: |
561 set -e
562 . util/build_consts.sh
563
564 module load "xilinx/vivado/$(VIVADO_VERSION)"
565
566 mkdir -p "$OBJ_DIR/hw"
567 mkdir -p "$BIN_DIR/hw/top_englishbreakfast"
568
Rupert Swarbrick97fe6a82021-07-16 11:27:50 +0100569 BOOTROM_VMEM="$BIN_DIR/sw/device/boot_rom/boot_rom_fpga_nexysvideo.32.vmem"
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100570 test -f "$BOOTROM_VMEM"
571
Philipp Wagner83d3b332021-09-29 18:10:14 +0100572 util/topgen-fusesoc.py --files-root=. --topname=top_englishbreakfast
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100573 fusesoc --cores-root=. \
574 run --flag=fileset_topgen --target=synth --setup --build \
575 --build-root="$OBJ_DIR/hw" \
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700576 lowrisc:systems:chip_englishbreakfast_cw305 \
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100577 --BootRomInitFile="$BOOTROM_VMEM"
578
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700579 cp "$OBJ_DIR/hw/synth-vivado/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit" \
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100580 "$BIN_DIR/hw/top_englishbreakfast"
581 displayName: Build bitstream with Vivado
582 - template: ci/upload-artifacts-template.yml
583 parameters:
Philipp Wagner5aa7ed32021-02-02 18:53:36 +0000584 includePatterns:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700585 - "/hw/top_englishbreakfast/lowrisc_systems_chip_englishbreakfast_cw305_0.1.bit"
Pirmin Vogel2f42ccd2020-12-22 20:19:30 +0100586
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200587- job: execute_fpga_tests_cw310
588 displayName: Execute tests on ChipWhisperer CW310 FPGA board
589 pool: FPGA
590 timeoutInMinutes: 30
591 dependsOn:
592 - chip_earlgrey_cw310
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200593 - sw_build
594 steps:
595 - template: ci/install-package-dependencies.yml
596 - template: ci/download-artifacts-template.yml
597 parameters:
598 downloadPartialBuildBinFrom:
599 - chip_earlgrey_cw310
Pirmin Vogelad2afea2021-05-20 10:43:40 +0200600 - sw_build
601 - bash: |
602 set -e
603
604 # Install an additional pytest dependency for result upload.
605 pip3 install pytest-azurepipelines
606
607 . util/build_consts.sh
608 pytest --version
609 pytest test/systemtest/earlgrey/test_fpga_cw310.py \
610 --log-cli-level=DEBUG \
611 --test-run-title="Run system tests on ChipWhisperer CW310 FPGA board" \
612 --napoleon-docstrings
613 displayName: Execute tests
614
615- job: execute_fpga_tests_nexysvideo
616 displayName: Execute tests on Nexys Video FPGA board
Philipp Wagner11d2dcb2020-09-29 16:27:46 +0100617 pool: FPGA
618 timeoutInMinutes: 30
619 dependsOn:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700620 - chip_earlgrey_nexysvideo
Timothy Chenf835aa32021-01-08 16:27:50 -0800621 - sw_build_nexysvideo
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000622 - sw_build
Philipp Wagner11d2dcb2020-09-29 16:27:46 +0100623 steps:
624 - template: ci/install-package-dependencies.yml
625 - template: ci/download-artifacts-template.yml
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000626 parameters:
627 downloadPartialBuildBinFrom:
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700628 - chip_earlgrey_nexysvideo
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000629 - sw_build_nexysvideo
630 - sw_build
Philipp Wagner11d2dcb2020-09-29 16:27:46 +0100631 - bash: |
632 set -e
633
634 module load "xilinx/vivado/$(VIVADO_VERSION)"
635
636 # Install an additional pytest dependency for result upload.
637 pip3 install pytest-azurepipelines
638
639 . util/build_consts.sh
640 pytest --version
641 pytest test/systemtest/earlgrey/test_fpga_nexysvideo.py \
642 --log-cli-level=DEBUG \
643 --test-run-title="Run system tests on Nexys Video FPGA board" \
644 --napoleon-docstrings
Philipp Wagner11d2dcb2020-09-29 16:27:46 +0100645 displayName: Execute tests
646
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600647- job: deploy_release_artifacts
648 displayName: Package and deploy release distribution
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000649 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100650 vmImage: ubuntu-18.04
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000651 dependsOn:
652 - lint
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600653 - sw_build
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700654 - chip_earlgrey_verilator
655 - chip_earlgrey_nexysvideo
Philipp Wagnera0a35a52021-08-04 16:39:35 +0100656 - chip_earlgrey_cw310
Timothy Chen64f6a5a2021-02-05 17:04:40 -0800657 condition: and(eq(dependencies.lint.outputs['DetermineBuildType.onlyDocChanges'], '0'), eq(dependencies.lint.outputs['DetermineBuildType.onlyDvChanges'], '0'))
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000658 steps:
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600659 - template: ci/install-package-dependencies.yml
660 - template: ci/download-artifacts-template.yml
Philipp Wagnerbdfb9332021-02-02 18:10:06 +0000661 parameters:
662 downloadPartialBuildBinFrom:
663 - sw_build
Timothy Chenac28d1e2021-08-18 10:58:23 -0700664 #- sw_build_nexysvideo
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700665 - chip_earlgrey_verilator
Timothy Chenac28d1e2021-08-18 10:58:23 -0700666 #- chip_earlgrey_nexysvideo
Philipp Wagnera0a35a52021-08-04 16:39:35 +0100667 - chip_earlgrey_cw310
Michael Schaffner93fe50c2021-03-31 16:25:42 -0700668 - chip_englishbreakfast_verilator
Miguel Young de la Sotad42948c2019-11-18 13:56:55 -0600669 - bash: |
Miguel Young de la Sotad42948c2019-11-18 13:56:55 -0600670 . util/build_consts.sh
Miguel Young de la Sotab5be8c62019-11-20 10:01:09 -0600671
Miguel Young de la Sotad42948c2019-11-18 13:56:55 -0600672 util/make_distribution.sh
Philipp Wagner542e2202019-10-30 13:10:16 +0000673
Miguel Young de la Sotad42948c2019-11-18 13:56:55 -0600674 tar --list -f $BIN_DIR/opentitan-*.tar.xz
675 # Put the resulting tar file into a directory the |publish| step below can reference.
676 mkdir "$BUILD_ROOT/dist-final"
677 mv $BIN_DIR/opentitan-*.tar.xz "$BUILD_ROOT/dist-final"
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600678 displayName: Create final dist directory out of partial ones
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000679 - publish: $(Build.ArtifactStagingDirectory)/dist-final
680 artifact: opentitan-dist
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600681 displayName: Upload release artifacts as Azure artifact
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000682 - task: GithubRelease@0
Miguel Young de la Sotaa68e3072020-01-02 13:59:54 -0600683 displayName: Upload to GitHub releases (only tags)
Philipp Wagner0b20f5d2019-11-01 16:24:52 +0000684 condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
Philipp Wagnerbd9ae432019-11-01 14:33:30 +0000685 inputs:
686 gitHubConnection: opentitan-release-upload
687 repositoryName: lowrisc/opentitan
688 addChangeLog: false
689 assets: |
690 $(Build.ArtifactStagingDirectory)/dist-final/*
Sam Elliotte257cd02020-09-10 13:49:38 +0100691
692
693- job: build_docker_containers
694 displayName: "Build Docker Containers"
695 pool:
Philipp Wagner5d1450c2020-10-06 12:26:36 +0100696 vmImage: ubuntu-18.04
Sam Elliotte257cd02020-09-10 13:49:38 +0100697 dependsOn:
698 - lint
699 steps:
700 - task: Docker@2
701 displayName: Build Developer Utility Container
702 inputs:
703 command: build
704 Dockerfile: ./util/container/Dockerfile
705 buildContext: .
706 - task: Docker@2
707 displayName: Build Documentation Builder Container
708 inputs:
709 command: build
710 tags: gcr.io/active-premise-257318/builder
711 Dockerfile: ./site/docs/builder.Dockerfile
712 buildContext: .
713 - task: Docker@2
714 displayName: Build Documentation Redirector Container
715 inputs:
716 command: build
717 Dockerfile: ./site/redirector/Dockerfile
718 buildContext: ./site/redirector