From 8bf00d41e0ad9bde0c2552e65196ff749340417c Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Fri, 21 Jan 2022 14:38:03 -0600 Subject: ci: Generate installed binaries for downstream use CMake doesn't allow source path to change once set. This is problematic because downstream pipeline jobs could use the artifacts to test but have no way to install. Instead setup to install to uhdBuildDir-installed. Downstream jobs then then directly reference uhd from there. Signed-off-by: Steven Koo --- .ci/templates/job-uhd-build-src.yml | 1 + .ci/templates/steps-build-uhd-make.yml | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to '.ci') diff --git a/.ci/templates/job-uhd-build-src.yml b/.ci/templates/job-uhd-build-src.yml index 5b642d723..49c65c1da 100644 --- a/.ci/templates/job-uhd-build-src.yml +++ b/.ci/templates/job-uhd-build-src.yml @@ -67,6 +67,7 @@ jobs: parameters: uhdSrcDir: ../../../s uhdBuildDir: $(Build.BinariesDirectory)/uhddev/build + uhdGenerateTestBinaries: true - ${{ if eq(parameters.toolset, 'make_trace') }}: - template: steps-build-uhd-make.yml diff --git a/.ci/templates/steps-build-uhd-make.yml b/.ci/templates/steps-build-uhd-make.yml index 1882b53ba..2f478879d 100644 --- a/.ci/templates/steps-build-uhd-make.yml +++ b/.ci/templates/steps-build-uhd-make.yml @@ -18,7 +18,9 @@ parameters: - name: uhdCustomBoostPackageURL type: string default: 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2' - +- name: uhdGenerateTestBinaries + type: boolean + default: false steps: # If we are requested to use a custom Boost package, then we download and build @@ -65,6 +67,11 @@ steps: export BOOST_CMAKE_DIR=$(dirname `find $(build_boost_step.CustomBoostPath)/stage/lib -name BoostConfig.cmake`) export UHD_CI_CMAKE_OPTIONS="-DBoost_INCLUDE_DIR=$(build_boost_step.CustomBoostPath) -DBoost_DIR=$BOOST_CMAKE_DIR -DBoost_LIBRARY_DIRS=$(build_boost_step.CustomBoostPath)/stage/lib $UHD_CI_CMAKE_OPTIONS" fi + if [[ "${{ parameters.uhdGenerateTestBinaries }}" = "True" ]]; then + mkdir -p ${{ parameters.uhdBuildDir }}-installed + echo "Setting CMAKE_INSTALL_PREFIX to ${{ parameters.uhdBuildDir }}-installed" + export UHD_CI_CMAKE_OPTIONS="-DCMAKE_INSTALL_PREFIX=${{ parameters.uhdBuildDir }}-installed" + fi cmake \ $UHD_CI_CMAKE_OPTIONS \ ${{ parameters.uhdSrcDir }}/host @@ -79,3 +86,9 @@ steps: ctest --no-compress-output --output-on-failure -T test continueOnError: true displayName: ctest make UHD + +- script: | + cd ${{ parameters.uhdBuildDir }} + make install + displayName: Install uhd to uhdBuildDir-installed + condition: and(succeeded(), ${{ parameters.uhdGenerateTestBinaries }}) -- cgit v1.2.3