-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from LLNL/task/linux_build-set
Added azure builds and tests for basic linux configuration.
- Loading branch information
Showing
2 changed files
with
86 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,55 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
# | ||
# Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and | ||
# other Axom Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (BSD-3-Clause) | ||
# | ||
|
||
trigger: | ||
- master | ||
variables: | ||
DO_BUILD: 'yes' | ||
DO_TEST: 'yes' | ||
|
||
strategy: | ||
matrix: | ||
linux_gcc6: | ||
VM_ImageName: 'ubuntu-16.04' | ||
Compiler_ImageName: 'axom/compilers:gcc-6' | ||
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE=Off' | ||
COMPILER: 'g++' | ||
TEST_TARGET: 'linux_gcc6' | ||
linux_gcc7: | ||
VM_ImageName: 'ubuntu-16.04' | ||
Compiler_ImageName: 'axom/compilers:gcc-7' | ||
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE=Off' | ||
COMPILER: 'g++' | ||
TEST_TARGET: 'linux_gcc7' | ||
linux_clang4: | ||
VM_ImageName: 'ubuntu-16.04' | ||
Compiler_ImageName: 'axom/compilers:clang-4' | ||
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE=Off' | ||
COMPILER: 'clang++' | ||
TEST_TARGET: 'linux_clang4' | ||
linux_clang6: | ||
VM_ImageName: 'ubuntu-16.04' | ||
Compiler_ImageName: 'axom/compilers:clang-6' | ||
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE=Off' | ||
COMPILER: 'clang++' | ||
TEST_TARGET: 'linux_clang6' | ||
|
||
pool: | ||
vmImage: 'Ubuntu-16.04' | ||
vmImage: $(VM_ImageName) | ||
|
||
steps: | ||
- script: echo Hello, world! | ||
displayName: 'Run a one-line script' | ||
|
||
- script: | | ||
echo Add other tasks to build, test, and deploy your project. | ||
echo See https://aka.ms/yaml | ||
displayName: 'Run a multi-line script' | ||
- checkout: self | ||
clean: boolean | ||
submodules: recursive | ||
- script: | | ||
docker run --rm --user='root' -v `pwd`:/home/axom $(Compiler_ImageName) chown -R axom /home/axom | ||
docker run --rm -v `pwd`:/home/axom -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 | ||
condition: eq( variables['Agent.OS'], 'Linux') | ||
displayName: '$(TEST_TARGET) Build & Test' | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFormat: 'cTest' | ||
testResultsFiles: '**/Test.xml' | ||
testRunTitle: '$(TEST_TARGET) Tests' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
############################################################################## | ||
# Copyright (c) 2017-2019, Lawrence Livermore National Security, LLC and | ||
# other Axom Project Developers. See the top-level COPYRIGHT file for details. | ||
# | ||
# SPDX-License-Identifier: (BSD-3-Clause) | ||
############################################################################## | ||
|
||
env | ||
function or_die () { | ||
"$@" | ||
local status=$? | ||
if [[ $status != 0 ]] ; then | ||
echo ERROR $status command: $@ | ||
exit $status | ||
fi | ||
} | ||
|
||
or_die mkdir azure-${Test_Target}-build | ||
cd azure-${Test_Target}-build | ||
if [[ "$DO_BUILD" == "yes" ]] ; then | ||
or_die cmake -DCMAKE_CXX_COMPILER="${COMPILER}" ${CMAKE_EXTRA_FLAGS} ../src | ||
if [[ ${CMAKE_EXTRA_FLAGS} == *COVERAGE* ]] ; then | ||
or_die make -j 3 | ||
else | ||
or_die make -j 3 VERBOSE=1 | ||
fi | ||
if [[ "${DO_TEST}" == "yes" ]] ; then | ||
or_die ctest -T test --output-on-failure -V | ||
fi | ||
if [[ "${DO_MEMCHECK}" == "yes" ]] ; then | ||
or_die ctest -T memcheck | ||
fi | ||
fi | ||
|
||
exit 0 |