Skip to content

Commit

Permalink
Allow linux-build_and_test script to take a BUILD_TYPE variable (…
Browse files Browse the repository at this point in the history
…default: Debug)

Also use `Release` build for `linux_clang10` Azure CI job.
  • Loading branch information
kennyweiss committed Nov 10, 2021
1 parent af61ad8 commit 5ef1b3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
VM_ImageName: 'ubuntu-18.04'
Compiler_ImageName: '$(CLANG10_IMAGENAME)'
CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON'
BUILD_TYPE: 'Release'
COMPILER: 'clang++'
TEST_TARGET: 'linux_clang10'
HOST_CONFIG: '[email protected]'
Expand Down Expand Up @@ -90,7 +91,7 @@ jobs:
- script: |
echo " -e $TEST_TARGET -e $COMPILER -e $DO_BUILD -e $DO_TEST -e $CMAKE_EXTRA_FLAGS $(Compiler_ImageName) ./scripts/azure-pipelines/linux-build_and_test.sh"
docker run --rm --user='root' -v `pwd`:/home/axom/axom $(Compiler_ImageName) chown -R axom /home/axom
docker run --rm -v `pwd`:/home/axom/axom -e TEST_TARGET -e COMPILER -e DO_BUILD -e DO_TEST -e DO_CLEAN -e HOST_CONFIG -e CMAKE_EXTRA_FLAGS $(Compiler_ImageName) ./axom/scripts/azure-pipelines/linux-build_and_test.sh
docker run --rm -v `pwd`:/home/axom/axom -e TEST_TARGET -e COMPILER -e DO_BUILD -e DO_TEST -e DO_CLEAN -e HOST_CONFIG -e CMAKE_EXTRA_FLAGS -e BUILD_TYPE $(Compiler_ImageName) ./axom/scripts/azure-pipelines/linux-build_and_test.sh
condition: eq( variables['Agent.OS'], 'Linux')
displayName: 'Linux Build & Test ($(TEST_TARGET))'
Expand Down
11 changes: 7 additions & 4 deletions scripts/azure-pipelines/linux-build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ function or_die () {
}

or_die cd axom
git submodule init
git submodule update
git submodule init
git submodule update

echo HOST_CONFIG
echo $HOST_CONFIG

export BUILD_TYPE=${BUILD_TYPE:-Debug}


if [[ "$DO_BUILD" == "yes" ]] ; then
echo "~~~~~~ RUNNING CMAKE ~~~~~~~~"
or_die ./config-build.py -hc /home/axom/axom/host-configs/docker/${HOST_CONFIG}.cmake -DENABLE_GTEST_DEATH_TESTS=ON ${CMAKE_EXTRA_FLAGS}
or_die cd build-$HOST_CONFIG-debug
or_die ./config-build.py -hc /home/axom/axom/host-configs/docker/${HOST_CONFIG}.cmake -bt ${BUILD_TYPE} -DENABLE_GTEST_DEATH_TESTS=ON ${CMAKE_EXTRA_FLAGS}
or_die cd build-$HOST_CONFIG-${BUILD_TYPE,,}
echo "~~~~~~ BUILDING ~~~~~~~~"
if [[ ${CMAKE_EXTRA_FLAGS} == *COVERAGE* ]] ; then
or_die make -j 10
Expand Down

0 comments on commit 5ef1b3d

Please sign in to comment.