diff options
author | Steven Koo <steven.koo@ni.com> | 2022-01-21 14:38:03 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-24 12:21:21 -0600 |
commit | 8bf00d41e0ad9bde0c2552e65196ff749340417c (patch) | |
tree | 5b1f7af0418dc6c711069e64cc6f15324918c52c /.ci | |
parent | 32cbda4fed71f6340302d8a230979546f6927f32 (diff) | |
download | uhd-8bf00d41e0ad9bde0c2552e65196ff749340417c.tar.gz uhd-8bf00d41e0ad9bde0c2552e65196ff749340417c.tar.bz2 uhd-8bf00d41e0ad9bde0c2552e65196ff749340417c.zip |
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 <steven.koo@ni.com>
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/templates/job-uhd-build-src.yml | 1 | ||||
-rw-r--r-- | .ci/templates/steps-build-uhd-make.yml | 15 |
2 files changed, 15 insertions, 1 deletions
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 }}) |