aboutsummaryrefslogtreecommitdiffstats
path: root/.ci/templates/job-gnuradio-grettus-build-src.yml
diff options
context:
space:
mode:
authorSteven Koo <steven.koo@ni.com>2022-01-24 11:16:39 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2022-01-25 13:57:45 -0600
commit3cfecebc14c5e3ea2e1b9dd73f08281e3c7a2169 (patch)
tree7de7a5eae74ef2a1ea0ae3a4c564d0680a207538 /.ci/templates/job-gnuradio-grettus-build-src.yml
parent87745ecef99684fe25a8aedaa7e0c96a06e9e4f0 (diff)
downloaduhd-3cfecebc14c5e3ea2e1b9dd73f08281e3c7a2169.tar.gz
uhd-3cfecebc14c5e3ea2e1b9dd73f08281e3c7a2169.tar.bz2
uhd-3cfecebc14c5e3ea2e1b9dd73f08281e3c7a2169.zip
ci: Build gnuradio and gr-ettus
This change adds build support for gnuradio and gr-ettus. After building gnuradio and gr-ettus 3.8 against the uhddev commit, the job will upload the build artifact for gnuradio and gr-ettus for use by downstream jobs, like hardware testing. Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to '.ci/templates/job-gnuradio-grettus-build-src.yml')
-rw-r--r--.ci/templates/job-gnuradio-grettus-build-src.yml114
1 files changed, 114 insertions, 0 deletions
diff --git a/.ci/templates/job-gnuradio-grettus-build-src.yml b/.ci/templates/job-gnuradio-grettus-build-src.yml
new file mode 100644
index 000000000..90521f807
--- /dev/null
+++ b/.ci/templates/job-gnuradio-grettus-build-src.yml
@@ -0,0 +1,114 @@
+parameters:
+- name: 'toolset'
+ type: string
+ values:
+ - make
+
+jobs:
+- job: build_and_upload_gnuradio_grettus_${{ parameters.toolset }}
+ displayName: ${{ parameters.toolset }}, ctest, and upload gnuradio and grettus
+ 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'] ]
+ macOSBuilders: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.macOSBuilders'] ]
+ pool:
+ ${{ if eq(parameters.toolset, 'msbuild') }}:
+ name: de-dre-lab
+ ${{ if ne(parameters.toolset, 'msbuild') }}:
+ name: Drivers-NIBuildFarm-RFMIBUILD
+ demands:
+ - ${{ if eq(parameters.toolset, 'msbuild') }}:
+ - docker
+ - Agent.OS -equals Windows_NT
+ - ${{ if or(eq(parameters.toolset, 'make'), eq(parameters.toolset, 'make_trace'), eq(parameters.toolset, 'ninja'), eq(parameters.toolset, 'make_custom_boost_version')) }}:
+ - docker
+ - Agent.OS -equals Linux
+ - ${{ if eq(parameters.toolset, 'make_homebrew_macos') }}:
+ - Agent.OS -equals Darwin
+ - Agent.OSVersion -equals $(macOSVersionDemand)
+ - Agent.OSArchitecture -equals $(macOSArchDemand)
+ workspace:
+ clean: outputs
+ strategy:
+ ${{ if eq(parameters.toolset, 'msbuild') }}:
+ matrix: $[ variables.dockerImageMatrixWin ]
+ ${{ if or(eq(parameters.toolset, 'make'), eq(parameters.toolset, 'make_trace'), eq(parameters.toolset, 'ninja'), eq(parameters.toolset, 'make_custom_boost_version')) }}:
+ matrix: $[ variables.dockerImageMatrixLin ]
+ ${{ if eq(parameters.toolset, 'make_homebrew_macos') }}:
+ matrix: $[ variables.macOSBuilders ]
+ ${{ if ne(parameters.toolset, 'make_homebrew_macos') }}:
+ container:
+ image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)'
+ endpoint: 'Docker / Artifactory - rnd-builds-local'
+ steps:
+ - checkout: self
+ clean: true
+ - checkout: gnuradio
+ clean: true
+ submodules: recursive
+ - checkout: gr-ettus
+ clean: true
+
+ - task: DeleteFiles@1
+ inputs:
+ SourceFolder: $(Agent.BuildDirectory)
+ Contents: |
+ uhddev-$(buildOSName)-${{ parameters.toolset }}
+ displayName: Delete uhddev artifacts folder
+
+ - download: uhd_build_docker_container
+
+ - 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: $(Agent.BuildDirectory)/uhddev-$(buildOSName)-${{ parameters.toolset }}
+ cleanDestinationFolder: false
+ displayName: Extract uhddev-$(buildOSName)-${{ parameters.toolset }} artifacts
+
+ - ${{ if eq(parameters.toolset, 'make') }}:
+ - template: steps-build-gnuradio-make.yml
+ parameters:
+ gnuradioSrcDir: $(Build.SourcesDirectory)/gnuradio
+ gnuradioBuildDir: $(Build.BinariesDirectory)/gnuradio/build
+ gnuradioInstallPath: $(Build.BinariesDirectory)/gnuradio/build-installed
+ uhdInstalledArtifactPath: $(Agent.BuildDirectory)/uhddev-$(buildOSName)-${{ parameters.toolset }}/uhddev/build-installed
+
+ - ${{ if eq(parameters.toolset, 'make') }}:
+ - template: steps-build-gr-ettus-make.yml
+ parameters:
+ grettusSrcDir: $(Build.SourcesDirectory)/gr-ettusdev
+ grettusBuildDir: $(Build.BinariesDirectory)/gr-ettusdev/build
+ grettusInstallPath: $(Build.BinariesDirectory)/gnuradio/build-installed
+ uhdInstalledArtifactPath: $(Agent.BuildDirectory)/uhddev-$(buildOSName)-${{ parameters.toolset }}/uhddev/build-installed
+ gnuradioInstalledArtifactPath: $(Build.BinariesDirectory)/gnuradio/build-installed
+
+ - task: ArchiveFiles@2
+ inputs:
+ rootFolderOrFile: $(Build.BinariesDirectory)
+ includeRootFolder: false
+ archiveType: tar
+ tarCompression: gz
+ archiveFile: $(Build.ArtifactStagingDirectory)/gnuradio-grettus-$(buildOSName)-${{ parameters.toolset }}.tar.gz
+ replaceExistingArchive: true
+ displayName: Compress build files
+
+ - task: CopyFiles@2
+ inputs:
+ sourceFolder: $(Pipeline.Workspace)/uhd_build_docker_container/$(UHDPipelineDockerImageArtifactName)
+ targetFolder: $(Build.ArtifactStagingDirectory)
+ displayName: Copy builder container version to artifact folder
+
+ - task: PublishPipelineArtifact@1
+ inputs:
+ targetPath: '$(Build.ArtifactStagingDirectory)'
+ artifactName: 'gnuradio-grettus-$(buildOSName)-${{ parameters.toolset }}'
+ displayName: Upload gnuradio and gr-ettus build artifacts