aboutsummaryrefslogtreecommitdiffstats
path: root/.ci/templates/steps-build-uhd-installer-fedora-rpm.yml
blob: 7933acf3f637d3cb314c45702fa73dda3f253a96 (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
parameters:
- name: uhdSrcDir
  type: string
- name: uhdBuildDir
  type: string
- name: uhdInstallerDir
  type: string
- name: fedoraReleaseName
  type: string
- name: releaseBinaries
  type: boolean
  default: false

steps:
- script: |
    mkdir -p ${{ parameters.uhdBuildDir }}
    mkdir -p ${{ parameters.uhdInstallerDir }}
    cd ${{ parameters.uhdBuildDir}}
    if [[ "${{ parameters.releaseBinaries }}" = "True" ]]; then
      echo "Setting UHD_RELEASE_MODE to release"
      export UHD_CI_CMAKE_OPTIONS="-DUHD_RELEASE_MODE=release $UHD_CI_CMAKE_OPTIONS"
    fi
    cmake \
      -DCMAKE_INSTALL_PREFIX=/usr \
      $UHD_CI_CMAKE_OPTIONS \
      -DUNDERSCORE_UHD_VERSION=ON \
      -DENABLE_DPDK=OFF \
      -G "Unix Makefiles" \
      ${{ parameters.uhdSrcDir }}/host
  displayName: cmake rpm

- script: |
    cd ${{ parameters.uhdBuildDir }}
    make package -j$(nproc)
  displayName: make package rpm

- task: CopyFiles@2
  inputs:
    sourceFolder: ${{ parameters.uhdBuildDir }}
    contents: 'uhd*.rpm'
    targetFolder: ${{ parameters.uhdInstallerDir }}
    cleanTargetFolder: true
  displayName: Copy rpm installer