aboutsummaryrefslogtreecommitdiffstats
path: root/.ci/templates/job-uhd-build-installer.yml
blob: 05df0fc394e8467b81cba85e5a2c4b5873b332ac (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
parameters:
- name: 'toolset'
  type: string
  values:
  - make
  - msbuild
  - ubuntu_deb
- name: 'installer'
  type: string
  values:
  - rpm # make
  - tar # make
  - nsis # msbuild
  - deb # ubuntu_deb

jobs:
- job: build_uhd_installer_${{ parameters.toolset }}
  displayName: ${{ parameters.toolset }} UHD installer
  dependsOn: get_latest_uhd_docker
  variables:
    # Docker vars from job-get-latest-uhd-docker.yml
    dockerBuildNumber: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerBuildNumber'] ]
    dockerImagePrefix: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImagePrefix'] ]
    dockerImageMatrixLin: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixLin'] ]
    dockerImageMatrixWin: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixWin'] ]
    dockerImageMatrixUbuntuDeb: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixUbuntuDeb'] ]
  pool:
    ${{ if eq(parameters.toolset, 'msbuild') }}:
      name: de-dre-lab
    ${{ if ne(parameters.toolset, 'msbuild') }}:
      name: Drivers-NIBuildFarm-RFMIBUILD
    demands:
      - docker
      - ${{ if eq(parameters.toolset, 'msbuild') }}:
        - Agent.OS -equals Windows_NT
      - ${{ if ne(parameters.toolset, 'msbuild') }}:
        - Agent.OS -equals Linux
  workspace:
    clean: outputs
  strategy:
    ${{ if and(eq(parameters.toolset, 'make'), eq(parameters.installer, 'tarball')) }}:
      matrix: $[ variables.dockerImageMatrixLin ]
    ${{ if and(eq(parameters.toolset, 'msbuild'), eq(parameters.installer, 'nsis')) }}:
      matrix: $[ variables.dockerImageMatrixWin ]
    ${{ if and(eq(parameters.toolset, 'ubuntu_deb'), eq(parameters.installer, 'deb')) }}:
      matrix: $[ variables.dockerImageMatrixUbuntuDeb ]
  container:
    image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)'
    endpoint: 'Docker / Artifactory - rnd-builds-local'
    ${{ if eq(parameters.toolset, 'ubuntu_deb') }}:
      #pbuilder requires access to /proc
      options: --privileged
  steps:
  - checkout: self
    clean: true

  - download: uhd_build_docker_container
  - ${{ if eq(parameters.toolset, 'ubuntu_deb') }}:
    - template: steps-build-uhd-installer-ubuntu-deb.yml
      parameters:
        uhdSrcDir: $(Build.SourcesDirectory)
        uhdInstallerDir: $(Build.BinariesDirectory)/uhddev-installer
        ubuntuReleaseName: $(ubuntuReleaseName)
  - ${{ if ne(parameters.toolset, 'ubuntu_deb') }}:
    - download: current
      artifact: uhddev-$(buildOSName)-${{ parameters.toolset }}
      displayName: Download pipeline artifact uhddev-$(buildOSName)-${{ parameters.toolset }}
    - task: ExtractFiles@1
      inputs:
        archiveFilePatterns: $(Pipeline.Workspace)/uhddev-$(buildOSName)-${{ parameters.toolset }}/uhddev-$(buildOSName)-${{ parameters.toolset }}.tar.gz
        destinationFolder: $(Build.BinariesDirectory)
        cleanDestinationFolder: true
  - ${{ if and(eq(parameters.toolset, 'msbuild'), eq(parameters.installer, 'nsis')) }}:
    - template: steps-build-uhd-installer-msbuild-nsis.yml
      parameters:
        uhdSrcDir: $(Build.SourcesDirectory)
        uhdBuildDir: $(Build.BinariesDirectory)\\uhddev\\build
        uhdInstallerDir: $(Build.BinariesDirectory)\\uhddev-installer
        cmakeCompiler: $(cmakeCompiler)
        cmakeArch: $(cmakeArch)
        vsArch: $(vsArch)
        vsYear: $(vsYear)
  - task: PublishPipelineArtifact@1
    inputs:
      targetPath: '$(Build.BinariesDirectory)/uhddev-installer'
      artifactName: 'uhddev-$(buildOSName)-${{ parameters.toolset }}-${{ parameters.installer }}-installer'
    displayName: Upload uhd installer artifact