blob: 4c17ee8548271c8be17872a3bc43128e097d560c [file] [log] [blame]
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Azure Release Pipeline configuration
# Documentation at https://aka.ms/yaml
schedules:
# For testing purposes, run this pipeline every day at 08:37 UTC
# Use a random minute value to avoid congestion on the hour
- cron: "37 8 * * *"
displayName: "OpenTitan Release build (test)"
branches:
include:
- "master"
always: True
# To run on a schedule, PR and other triggers must be disabled
pr: none
trigger: none
variables:
# If updating VERILATOR_VERSION, TOOLCHAIN_VERSION or RUST_VERSION, update the
# definitions in util/container/Dockerfile as well.
VERILATOR_VERSION: 4.210
TOOLCHAIN_PATH: /opt/buildcache/riscv
VERIBLE_VERSION: v0.0-2135-gb534c1fe
RUST_VERSION: 1.60.0
# Release tag from https://github.com/lowRISC/lowrisc-toolchains/releases
TOOLCHAIN_VERSION: 20220210-1
# This controls where builds happen, and gets picked up by build_consts.sh.
BUILD_ROOT: $(Build.ArtifactStagingDirectory)
VIVADO_VERSION: "2020.2"
jobs:
- job: checkout
displayName: "Checkout repository"
pool:
vmImage: ubuntu-20.04
steps:
- checkout: self
path: opentitan-repo
- bash: |
tar -C $(Pipeline.Workspace)/opentitan-repo -czf $(Pipeline.Workspace)/opentitan-repo.tar.gz .
displayName: "Pack up repository"
- publish: $(Pipeline.Workspace)/opentitan-repo.tar.gz
artifact: opentitan-repo
displayName: "Upload repository"
- job: build_release
displayName: "Create the OpenTitan release"
timeoutInMinutes: 240
dependsOn: checkout
pool: ci-public
steps:
- template: ../ci/checkout-template.yml
- template: ../ci/install-package-dependencies.yml
- bash: |
set -ex
trap 'get_logs' EXIT
get_logs() {
# Export the Vivado logs
mkdir -p $OBJ_DIR/hw/top_earlgrey/standard-release
mkdir -p $OBJ_DIR/hw/top_earlgrey/chip_earlgrey_cw310_hyperdebug-release/
cp -rLt $OBJ_DIR/hw/top_earlgrey/standard-release \
$($REPO_TOP/bazelisk.sh outquery-all //hw/bitstream/vivado:fpga_cw310)
cp -rLt $OBJ_DIR/hw/top_earlgrey/chip_earlgrey_cw310_hyperdebug-release/ \
$($REPO_TOP/bazelisk.sh outquery-all //hw/bitstream/vivado:fpga_cw310_hyperdebug)
}
. util/build_consts.sh
module load "xilinx/vivado/$(VIVADO_VERSION)"
# Build the release package
# --jobs=1 is necessary due to resource constraints on the build machine.
# Running multiple Vivado and Verilator build jobs simultaneously can
# cause Synthesis failures
ci/bazelisk.sh build release --jobs=1
# Set the package-path variable for the artifact-publishing step
PKG_PATH=$(./bazelisk.sh outquery //release:opentitan)
echo $PKG_PATH
echo "##vso[task.setvariable variable=pkg_path]$PKG_PATH"
displayName: "Build Bazel release package"
- bash: |
. util/build_consts.sh
echo "Synthesis log"
cat $OBJ_DIR/hw/top_earlgrey/standard-release/build.fpga_cw310/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/synth_1/runme.log || true
echo "Implementation log"
cat $OBJ_DIR/hw/top_earlgrey/standard-release/build.fpga_cw310/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/impl_1/runme.log || true
displayName: "Display standard bitstream synth and impl logs"
- bash: |
. util/build_consts.sh
echo "Synthesis log"
cat $OBJ_DIR/hw/top_earlgrey/chip_earlgrey_cw310_hyperdebug-release/build.fpga_cw310/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/synth_1/runme.log || true
echo "Implementation log"
cat $OBJ_DIR/hw/top_earlgrey/chip_earlgrey_cw310_hyperdebug-release/build.fpga_cw310/synth-vivado/lowrisc_systems_chip_earlgrey_cw310_0.1.runs/impl_1/runme.log || true
displayName: "Display hyperdebug bitstream synth and impl logs"
- publish: $(pkg_path)
artifact: opentitan-release
displayName: "Upload release artifacts"