diff options
author | Steven Koo <steven.koo@ni.com> | 2022-04-22 16:11:57 -0500 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-06-10 13:24:04 -0500 |
commit | 685a334c55083b9f68ae4b021554eed584931c18 (patch) | |
tree | 7f9e2d17097b97e6f007c17343d62f0d25c6b726 /.ci | |
parent | b8a21959a6f51c73766cac5bb09ee240bf497e2b (diff) | |
download | uhd-685a334c55083b9f68ae4b021554eed584931c18.tar.gz uhd-685a334c55083b9f68ae4b021554eed584931c18.tar.bz2 uhd-685a334c55083b9f68ae4b021554eed584931c18.zip |
ci: Add package source support to pipelines
This change adds support for building the release tarballs using
pipelines using tools/package_source.sh
Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/templates/job-uhd-package-src.yml | 77 | ||||
-rw-r--r-- | .ci/templates/stages-uhd-pipeline.yml | 11 |
2 files changed, 88 insertions, 0 deletions
diff --git a/.ci/templates/job-uhd-package-src.yml b/.ci/templates/job-uhd-package-src.yml new file mode 100644 index 000000000..27bc66f2f --- /dev/null +++ b/.ci/templates/job-uhd-package-src.yml @@ -0,0 +1,77 @@ +parameters: +- name: uhdSrcDir + type: string +- name: uhdBuildDir + type: string +- name: release_binaries + type: boolean + default: false + +jobs: +- job: uhd_package_src + displayName: UHD Package Source + 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'] ] + dockerImageMatrixSourcePackageBuilders: $[ dependencies.get_latest_uhd_docker.outputs['setDockerVar.dockerImageMatrixSourcePackageBuilders'] ] + pool: + name: Drivers-NIBuildFarm-RFMIBUILD + demands: + - docker + - Agent.OS -equals Linux + strategy: + matrix: $[ variables.dockerImageMatrixSourcePackageBuilders ] + workspace: + clean: all + container: + image: '$(dockerImagePrefix)$(DockerImageName):$(dockerBuildNumber)' + endpoint: 'Docker / Artifactory - rnd-builds-local' + steps: + - checkout: self + clean: true + + - script: | + mkdir -p ${{ parameters.uhdBuildDir }} + cd ${{ parameters.uhdBuildDir }} + if [[ "${{ parameters.release_binaries }}" = "True" ]]; then + echo "Setting UHD_RELEASE_MODE to release" + export UHD_CI_CMAKE_OPTIONS="-DUHD_RELEASE_MODE=release $UHD_CI_CMAKE_OPTIONS" + fi + cmake \ + $UHD_CI_CMAKE_OPTIONS \ + ${{ parameters.uhdSrcDir }}/host + + # Finds UHD_VERSION String from CMake Output + uhd_version_str=$(grep UHD_VERSION:STRING= CMakeCache.txt) + + # Strip variable prefix + uhd_version_str=${uhd_version_str#"UHD_VERSION:STRING="} + + echo "##vso[task.setvariable variable=uhdVersionStr;isOutput=true;]$uhd_version_str" + name: get_uhd_version + displayName: Determine UHD Version Name + + - script: | + cd ${{ parameters.uhdSrcDir }}/tools + ./package_source.sh -n "uhd_$(get_uhd_version.uhdVersionStr)" -f "uhd_fpga_$(get_uhd_version.uhdVersionStr)" + displayName: Run package_source.sh + + - script: | + rm -rf ${{ parameters.uhdSrcDir }}/build/root + displayName: Delete build root folder + + - task: PublishPipelineArtifact@1 + inputs: + targetPath: '${{ parameters.uhdSrcDir }}/build' + artifactName: 'uhddev-package-src' + displayName: Upload uhd source packages + + - script: | + rm -rf ${{ parameters.uhdSrcDir }}/build + displayName: Delete Build folder diff --git a/.ci/templates/stages-uhd-pipeline.yml b/.ci/templates/stages-uhd-pipeline.yml index 424d15a80..401ea561f 100644 --- a/.ci/templates/stages-uhd-pipeline.yml +++ b/.ci/templates/stages-uhd-pipeline.yml @@ -170,6 +170,17 @@ stages: displayName: delete auto.conf condition: always() +- stage: package_uhd_src + displayName: Package UHD Source + dependsOn: [] + jobs: + - template: job-get-latest-uhd-docker.yml + - template: job-uhd-package-src.yml + parameters: + uhdSrcDir: $(Build.SourcesDirectory) + uhdBuildDir: $(Build.BinariesDirectory)/uhddev/build + release_binaries: ${{ parameters.release_binaries }} + - stage: build_gnuradio_stage_linux displayName: Build gnuradio Linux dependsOn: build_uhd_stage_linux |