-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
116 lines (109 loc) · 4.28 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#
# Copyright (c) 2017-2023, Lawrence Livermore National Security, LLC and
# other Axom Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: (BSD-3-Clause)
#
variables:
DO_BUILD: 'yes'
DO_TEST: 'yes'
DO_CLEAN: 'no'
CLANG10_IMAGENAME: 'axom/tpls:clang-10_02-02-23_01h-47m'
GCC11_IMAGENAME: 'axom/tpls:gcc-11_02-02-23_01h-47m'
system.debug: false
jobs:
- job: Build_and_Test
strategy:
matrix:
linux_gcc11:
VM_ImageName: 'ubuntu-20.04'
Compiler_ImageName: '$(GCC11_IMAGENAME)'
CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_ENABLE_MFEM_SIDRE_DATACOLLECTION:BOOL=ON'
COMPILER: 'g++'
TEST_TARGET: 'linux_gcc11'
HOST_CONFIG: '[email protected]'
linux_gcc11_64bit:
VM_ImageName: 'ubuntu-20.04'
Compiler_ImageName: '$(GCC11_IMAGENAME)'
CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_USE_64BIT_INDEXTYPE:BOOL=ON'
COMPILER: 'g++'
TEST_TARGET: 'linux_gcc11'
HOST_CONFIG: '[email protected]'
linux_clang10:
VM_ImageName: 'ubuntu-20.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]'
osx_gcc:
VM_ImageName: 'macos-11'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF'
TEST_TARGET: 'osx_gcc'
windows:
VM_ImageName: 'windows-2019'
CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF'
TEST_TARGET: 'win_vs'
pool:
vmImage: $(VM_ImageName)
steps:
- checkout: self
clean: true
submodules: recursive
- task: CMake@1
inputs:
workingDir: 'build'
cmakeArgs: '$(CMAKE_EXTRA_FLAGS) ../src'
condition: or( eq( variables['Agent.OS'], 'Windows_NT'), eq( variables['Agent.OS'], 'Darwin'))
- task: VSBuild@1
inputs:
solution: 'build/*.sln'
vsVersion: 'latest'
condition: eq( variables['Agent.OS'], 'Windows_NT')
displayName: 'Visual Studio Build ($(TEST_TARGET))'
- script: |
cd build
ctest -C Debug -T test --output-on-failure -V
condition: eq( variables['Agent.OS'], 'Windows_NT')
displayName: 'Visual Studio Test ($(TEST_TARGET))'
- script: |
cd build
make
condition: eq( variables['Agent.OS'], 'Darwin')
displayName: 'Darwin Build ($(TEST_TARGET))'
- script: |
cd build
ctest -T test --output-on-failure -V
condition: eq( variables['Agent.OS'], 'Darwin')
displayName: 'Darwin Test ($(TEST_TARGET))'
- 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 -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))'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
testRunTitle: '$(TEST_TARGET) Tests'
failTaskOnFailedTests: true
- job: Check_Style
variables:
VM_ImageName: 'ubuntu-20.04'
Compiler_ImageName: '$(CLANG10_IMAGENAME)'
TEST_TARGET: 'linux_clang10'
HOST_CONFIG: '[email protected]'
CMAKE_EXTRA_FLAGS: '-DENABLE_CLANGFORMAT=ON'
pool:
vmImage: $(VM_ImageName)
steps:
- checkout: self
clean: true
submodules: recursive
- script: |
echo " -e HOST_CONFIG -e CMAKE_EXTRA_FLAGS $(Compiler_ImageName) ./axom/scripts/azure-pipelines/linux-check.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 HOST_CONFIG -e CMAKE_EXTRA_FLAGS $(Compiler_ImageName) ./axom/scripts/azure-pipelines/linux-check.sh
displayName: '$(TEST_TARGET) Style Check'