diff options
author | Martin Braun <martin.braun@ettus.com> | 2021-06-30 12:04:51 +0200 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2021-07-12 16:51:01 -0500 |
commit | 8cdb4df8f6b2b93af62ae931f75730741de68b62 (patch) | |
tree | 8255aa38c8fdf88bd856c5e81f088afd1b9fe649 /.ci | |
parent | df9491bd9a5e643d3dca679f69317396bc228a08 (diff) | |
download | uhd-8cdb4df8f6b2b93af62ae931f75730741de68b62.tar.gz uhd-8cdb4df8f6b2b93af62ae931f75730741de68b62.tar.bz2 uhd-8cdb4df8f6b2b93af62ae931f75730741de68b62.zip |
ci: Enable custom CXX flags, enable -Werror
- Add a new boolean to make and ninja builds (uhdAllowWarnings). It
defaults to false.
- When asserted, we set build flags for make and ninja to
-Werror -Wno-error=maybe-uninitialized
- Add a new parameter to make and ninja builds (uhdCxxFlags). It is
currently unused
Diffstat (limited to '.ci')
-rw-r--r-- | .ci/templates/steps-build-uhd-make.yml | 11 | ||||
-rw-r--r-- | .ci/templates/steps-build-uhd-ninja.yml | 11 | ||||
-rw-r--r-- | .ci/uhd-pipeline.yml | 4 |
3 files changed, 25 insertions, 1 deletions
diff --git a/.ci/templates/steps-build-uhd-make.yml b/.ci/templates/steps-build-uhd-make.yml index cc0d491e8..7073447af 100644 --- a/.ci/templates/steps-build-uhd-make.yml +++ b/.ci/templates/steps-build-uhd-make.yml @@ -6,6 +6,12 @@ parameters: - name: uhdEnableTraceLog type: boolean default: false +- name: uhdAllowWarnings + type: boolean + default: false +- name: uhdCxxFlags + type: string + default: "" steps: - script: | @@ -15,6 +21,11 @@ steps: echo "Enabling UHD Tracing" export UHD_CI_CMAKE_OPTIONS="-DUHD_LOG_MIN_LEVEL=trace $UHD_CI_CMAKE_OPTIONS" fi + if [[ "${{ parameters.uhdAllowWarnings }}" = "False" ]]; then + echo "Warnings not allowed for this build." + export CXXFLAGS="-Werror -Wno-error=maybe-uninitialized $CXXFLAGS" + fi + export CXXFLAGS="${{ parameters.uhdCxxFlags }} $CXXFLAGS" cmake \ $UHD_CI_CMAKE_OPTIONS \ ${{ parameters.uhdSrcDir }}/host diff --git a/.ci/templates/steps-build-uhd-ninja.yml b/.ci/templates/steps-build-uhd-ninja.yml index f3ee6cfaa..48b0a424d 100644 --- a/.ci/templates/steps-build-uhd-ninja.yml +++ b/.ci/templates/steps-build-uhd-ninja.yml @@ -3,11 +3,22 @@ parameters: type: string - name: uhdBuildDir type: string +- name: uhdAllowWarnings + type: boolean + default: false +- name: uhdCxxFlags + type: string + default: "" steps: - script: | mkdir -p ${{ parameters.uhdBuildDir }} cd ${{ parameters.uhdBuildDir }} + if [[ "${{ parameters.uhdAllowWarnings }}" = "False" ]]; then + echo "Warnings not allowed for this build." + export CXXFLAGS="-Werror -Wno-error=maybe-uninitialized $CXXFLAGS" + fi + export CXXFLAGS="${{ parameters.uhdCxxFlags }} $CXXFLAGS" cmake -G Ninja ${{ parameters.uhdSrcDir }}/host displayName: cmake ninja UHD - script: | diff --git a/.ci/uhd-pipeline.yml b/.ci/uhd-pipeline.yml index 73291d346..184593c06 100644 --- a/.ci/uhd-pipeline.yml +++ b/.ci/uhd-pipeline.yml @@ -11,8 +11,10 @@ trigger: paths: include: - host - - .ci/uhd-pipeline.yml + - .ci/ - images/manifest.txt + exclude: + - .ci/docker pr: branches: include: |