Skip to content

Commit

Permalink
Merge pull request #13 from LLNL/task/add-osx-ci-tests
Browse files Browse the repository at this point in the history
Task/add osx ci tests
  • Loading branch information
rhornung67 committed May 1, 2019
2 parents 9c2e475 + 0f5c634 commit 165dfaf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[![Azure Pipelines Build Status](https://dev.azure.com/axom/axom/_apis/build/status/LLNL.axom?branchName=develop)](https://dev.azure.com/axom/axom/_build/latest?definitionId=1&branchName=develop)
[![Documentation Status](https://readthedocs.org/projects/axom/badge/?version=develop)](https://axom.readthedocs.io/en/develop/?badge=develop)

Axom
Expand Down
23 changes: 21 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ strategy:
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE=Off'
COMPILER: 'clang++'
TEST_TARGET: 'linux_clang6'
osx_gcc:
VM_ImageName: 'macos-10.13'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE=Off'
TEST_TARGET: 'osx_gcc'

pool:
vmImage: $(VM_ImageName)
Expand All @@ -43,9 +47,24 @@ steps:
- checkout: self
clean: boolean
submodules: recursive
- task: CMake@1
inputs:
workingDir: 'build'
cmakeArgs: '$(CMAKE_EXTRA_FLAGS) ../src'
condition: eq( variables['Agent.OS'], 'Darwin')
- script: |
cd build
make
displayName: '$(TEST_TARGET) Build & Test'
condition: eq( variables['Agent.OS'], 'Darwin')
- script: |
cd build
ctest -T test --output-on-failure -V
displayName: '$(TEST_TARGET) Build & Test'
condition: eq( variables['Agent.OS'], 'Darwin')
- 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
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
Expand Down
4 changes: 2 additions & 2 deletions scripts/azure-pipelines/linux-build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ function or_die () {
fi
}

or_die mkdir azure-${Test_Target}-build
cd azure-${Test_Target}-build
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
Expand Down

0 comments on commit 165dfaf

Please sign in to comment.