aboutsummaryrefslogtreecommitdiffstats
path: root/fpga/.ci/x4xx-pr-check.yml
blob: 3de9f674d5292ebb427f57b6722d74499503a980 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#
# Copyright 2021 Ettus Research, a National Instruments Brand
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# Description:
#
#   This pipeline is used to test building  the FPGA and CPLD for each pull
#   request.
#
#   See https://aka.ms/yaml for pipeline YAML documentation.
#

trigger:
- none

# Filter for target branches and paths on PRs. See:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#pr-triggers
pr:
  branches:
    include:
    - master
  paths:
    include:
    - fpga/usrp3/lib
    - fpga/usrp3/tools
    - fpga/usrp3/top/x400
    - fpga/.ci

jobs:
# -------------------------------------------------------------------
# Build XG FPGA (100 MHz)
# -------------------------------------------------------------------
- template: templates/fpga_build.yml
  parameters:
    target: X410_XG_100
    debug: true  # to be able to debug any failed attempts
    clean: false # for speedup of PR testing
    timeout: 360

# -------------------------------------------------------------------
# Build X4 FPGA (200 MHz)
# -------------------------------------------------------------------
- template: templates/fpga_build.yml
  parameters:
    target: X410_X4_200
    debug: true  # to be able to debug any failed attempts
    clean: false # for speedup of PR testing
    timeout: 360

# -------------------------------------------------------------------
# Build C1 FPGA (400 MHz)
# -------------------------------------------------------------------
- template: templates/fpga_build.yml
  parameters:
    target: X410_C1_400
    debug: true  # to be able to debug any failed attempts
    clean: false # for speedup of PR testing
    timeout: 360

# -------------------------------------------------------------------
# Make CPLD
# -------------------------------------------------------------------
#- template: templates/mb_cpld_build.yml
#  parameters:
#    debug: true  # to be able to debug any failed attempts

# -------------------------------------------------------------------
# Make ZBX CPLD
# -------------------------------------------------------------------
#- template: templates/zbx_cpld_build.yml
#  parameters:
#    debug: true  # to be able to debug any failed attempts

# -------------------------------------------------------------------
# Build IP
# -------------------------------------------------------------------
- job: IP
  displayName: 'Build IP'
  pool:
    name: de-dre-lab
    demands:
    - ettus_fpga_build
    - vivado2019.1
  timeoutInMinutes: 120
  steps:
    - checkout: self
      clean: false

    - bash: |
        python3 cleanup_incomplete_ip_builds.py -d $BUILD_SOURCESDIRECTORY/fpga/usrp3/top/x400
      workingDirectory: fpga/.ci/scripts/
      displayName: 'Incomplete IP Cleanup'

    # Delete everything except for the build-ip directory, which is expected to
    # remain for speed-up.
    - bash: |
        git clean -xdff -e build-ip
      displayName: 'git clean'

    - bash: |
        source setupenv.sh
        make X410_IP
      workingDirectory: fpga/usrp3/top/x400

    - publish: fpga/usrp3/top/x400/build-ip
      artifact: 'IP ($(System.JobAttempt))'
      condition: failed()

    - publish: fpga/usrp3/top/x400/build-ip
      artifact: 'IP'
      condition: succeeded()

    - template: templates/check_clean_repo_steps.yml