aboutsummaryrefslogtreecommitdiffstats
path: root/.ci
diff options
context:
space:
mode:
Diffstat (limited to '.ci')
-rw-r--r--.ci/templates/job-uhd-build-src.yml15
-rw-r--r--.ci/templates/stages-uhd-pipeline.yml14
-rw-r--r--.ci/templates/steps-build-uhd-make.yml39
-rw-r--r--.ci/uhd-pipeline-pr.yml11
4 files changed, 78 insertions, 1 deletions
diff --git a/.ci/templates/job-uhd-build-src.yml b/.ci/templates/job-uhd-build-src.yml
index a5909388a..25f8b4897 100644
--- a/.ci/templates/job-uhd-build-src.yml
+++ b/.ci/templates/job-uhd-build-src.yml
@@ -3,10 +3,15 @@ parameters:
type: string
values:
- make
+ - make_custom_boost_version
- make_trace
- ninja
- msbuild
- ubuntu_deb
+- name: 'custom_boost_version_url'
+ type: string
+ default: 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'
+
jobs:
- job: build_ctest_and_upload_uhd_${{ parameters.toolset }}
@@ -35,7 +40,7 @@ jobs:
strategy:
${{ if eq(parameters.toolset, 'msbuild') }}:
matrix: $[ variables.dockerImageMatrixWin ]
- ${{ if or(eq(parameters.toolset, 'make'), eq(parameters.toolset, 'make_trace'), eq(parameters.toolset, 'ninja')) }}:
+ ${{ 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, 'ubuntu_deb') }}:
matrix: $[ variables.dockerImageMatrixUbuntuDeb ]
@@ -87,6 +92,14 @@ jobs:
uhdBuildDir: $(Build.BinariesDirectory)/uhddev
ubuntuReleaseName: $(ubuntuReleaseName)
+ - ${{ if eq(parameters.toolset, 'make_custom_boost_version') }}:
+ - template: steps-build-uhd-make.yml
+ parameters:
+ uhdSrcDir: $(Build.SourcesDirectory)
+ uhdBuildDir: $(Build.BinariesDirectory)/uhddev/build
+ uhdCustomBoostPackage: true
+ uhdCustomBoostPackageURL: ${{ parameters.custom_boost_version_url }}
+
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.BinariesDirectory)
diff --git a/.ci/templates/stages-uhd-pipeline.yml b/.ci/templates/stages-uhd-pipeline.yml
index 99c607e03..f7d705fed 100644
--- a/.ci/templates/stages-uhd-pipeline.yml
+++ b/.ci/templates/stages-uhd-pipeline.yml
@@ -4,6 +4,14 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
#
+parameters:
+- name: custom_boost_version
+ type: boolean
+ default: false
+- name: custom_boost_version_url
+ type: string
+ default: 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'
+
variables:
- template: ../uhd-pipeline-vars.yml
@@ -33,6 +41,12 @@ stages:
- template: job-uhd-build-src.yml
parameters:
toolset: ubuntu_deb
+ - ${{ if parameters.custom_boost_version }}:
+ - template: job-uhd-build-src.yml
+ parameters:
+ toolset: make_custom_boost_version
+ custom_boost_version_url: ${{ parameters.custom_boost_version_url }}
+
- stage: test_uhd_stage
displayName: Test UHD
diff --git a/.ci/templates/steps-build-uhd-make.yml b/.ci/templates/steps-build-uhd-make.yml
index 7073447af..1882b53ba 100644
--- a/.ci/templates/steps-build-uhd-make.yml
+++ b/.ci/templates/steps-build-uhd-make.yml
@@ -12,8 +12,43 @@ parameters:
- name: uhdCxxFlags
type: string
default: ""
+- name: uhdCustomBoostPackage
+ type: boolean
+ default: false
+- name: uhdCustomBoostPackageURL
+ type: string
+ default: 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'
+
steps:
+# If we are requested to use a custom Boost package, then we download and build
+# it first
+- ${{ if parameters.uhdCustomBoostPackage }}:
+ - bash: |
+ cd $(Pipeline.Workspace)
+ echo "Entering workspace directory:"
+ pwd
+ rm -rf boost
+ mkdir boost
+ cd boost
+ # We reimplement tar's -a flag here so we can pipe from curl straight to tar
+ if [[ "${{ parameters.uhdCustomBoostPackageURL }}" =~ bz2$ ]]; then
+ export TAR_EXTRACT_FLAG="j"
+ elif [[ "${{ parameters.uhdCustomBoostPackageURL }}" =~ gz2$ ]]; then
+ export TAR_EXTRACT_FLAG="x"
+ elif [[ "${{ parameters.uhdCustomBoostPackageURL }}" =~ xz$ ]]; then
+ export TAR_EXTRACT_FLAG="J"
+ fi
+ curl -L ${{ parameters.uhdCustomBoostPackageURL }} | tar -x -$TAR_EXTRACT_FLAG
+ export BOOST_DIR=`pwd`/`ls | head -1`
+ echo "Using Boost directory: $BOOST_DIR"
+ echo "##vso[task.setvariable variable=CustomBoostPath;isOutput=true;]$BOOST_DIR"
+ cd $BOOST_DIR
+ ./bootstrap.sh
+ ./b2 -j$(nproc)
+ displayName: "Build Custom Boost Version"
+ name: build_boost_step
+
- script: |
mkdir -p ${{ parameters.uhdBuildDir }}
cd ${{ parameters.uhdBuildDir }}
@@ -26,6 +61,10 @@ steps:
export CXXFLAGS="-Werror -Wno-error=maybe-uninitialized $CXXFLAGS"
fi
export CXXFLAGS="${{ parameters.uhdCxxFlags }} $CXXFLAGS"
+ if [[ "${{ parameters.uhdCustomBoostPackage }}" = "True" ]]; then
+ 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
cmake \
$UHD_CI_CMAKE_OPTIONS \
${{ parameters.uhdSrcDir }}/host
diff --git a/.ci/uhd-pipeline-pr.yml b/.ci/uhd-pipeline-pr.yml
index c48ffb325..13949c5e8 100644
--- a/.ci/uhd-pipeline-pr.yml
+++ b/.ci/uhd-pipeline-pr.yml
@@ -4,6 +4,14 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
#
+parameters:
+- name: custom_boost_version
+ type: boolean
+ default: false
+- name: custom_boost_version_url
+ type: string
+ default: 'https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2'
+
trigger: none
pr:
@@ -23,3 +31,6 @@ pr:
extends:
template: templates/stages-uhd-pipeline.yml
+ parameters:
+ custom_boost_version: ${{ parameters.custom_boost_version }}
+ custom_boost_version_url: ${{ parameters.custom_boost_version_url }}