diff options
Diffstat (limited to 'fpga/.ci/templates/mb_cpld_build.yml')
-rw-r--r-- | fpga/.ci/templates/mb_cpld_build.yml | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/fpga/.ci/templates/mb_cpld_build.yml b/fpga/.ci/templates/mb_cpld_build.yml new file mode 100644 index 000000000..53aa0736f --- /dev/null +++ b/fpga/.ci/templates/mb_cpld_build.yml @@ -0,0 +1,67 @@ +# +# Copyright 2021 Ettus Research, a National Instruments Brand +# +# SPDX-License-Identifier: LGPL-3.0-or-later +# +# Description: +# +# This template is used to build the MB CPLD within the uhddev repository. +# Exports the CPLD build results (from build directory) as artifacts 'MB CPLD +# image'. +# +# See description for the parameters below. +# + +parameters: + ### Optional parameters + # Set to true if the intermediate files from build-<target> directory should + # be exported for debugging as artifact 'MB CPLD build (<attempt>)' + - name: debug + type: boolean + default: false + # Checkout repository in a clean state as described in + # https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema%2Cparameter-schema#checkout + - name: clean + type: boolean + default: true + +jobs: +- job: MB_CPLD + displayName: 'Build MB CPLD' + pool: + name: de-dre-lab + demands: + - ettus_fpga_build + - quartus18.1_lite + timeoutInMinutes: 30 + steps: + # Currently limited to be executed in same repo. + # Removes all unversioned files if necessary. + # Checkout path defined by single repository case in + # https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/multi-repo-checkout?view=azure-devops#checkout-path + - checkout: self + clean: ${{ parameters.clean }} + + # Run CPLD build + # Increase license server timeout as there might appear timeouts during + # static timing analysis which end up setting the build to fail. + - script: | + call set FLEXLM_TIMEOUT=20000000 + call make + workingDirectory: $(Agent.BuildDirectory)/s/fpga/usrp3/top/x400/cpld + displayName: 'Build CPLD' + + # Publish the final result only if all previous steps passed + - publish: $(Agent.BuildDirectory)/s/fpga/usrp3/top/x400/cpld/build + artifact: 'MB CPLD image' + displayName: 'Publish CPLD' + + # always publish intermediate files + - publish: $(Agent.BuildDirectory)/s/fpga/usrp3/top/x400/cpld/output_files + artifact: 'MB CPLD build ($(System.JobAttempt))' + condition: and(always(), eq('${{ parameters.debug }}', true)) + displayName: 'Publish Build Directory' + + # Check if FPGA build left any untracked files. + - ${{ if eq(parameters.debug, true) }}: + - template: check_clean_repo_steps.yml |