-
Notifications
You must be signed in to change notification settings - Fork 62
/
azure-pipelines.yml
97 lines (90 loc) · 3.44 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
# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and
# other BLT Project Developers. See the top-level LICENSE file for details
#
# SPDX-License-Identifier: (BSD-3-Clause)
variables:
DOCKER_FLAGS: "--user='root' -v `pwd`:/blt -w /blt/build $(Compiler_ImageName)"
C_COMPILERS: "-DCMAKE_C_COMPILER=$(C_COMPILER) -DCMAKE_CXX_COMPILER=$(CXX_COMPILER)"
MPI_FLAGS: '-DENABLE_MPI=ON -DMPI_C_COMPILER=$(MPI_DIR)/bin/mpicc -DMPI_CXX_COMPILER=$(MPI_DIR)/bin/mpicxx -DMPIEXEC=$(MPI_DIR)/bin/mpiexec -DMPIEXEC_NUMPROC_FLAG=-n'
# Use the 'axom/tpls' images because they contain mpi and fortran
GCC11_IMAGENAME: 'axom/tpls:gcc-11_02-02-23_01h-47m'
CLANG10_IMAGENAME: 'axom/tpls:clang-10_02-02-23_01h-47m'
VM_ImageName: 'ubuntu-20.04'
strategy:
matrix:
linux_gcc11:
Compiler_ImageName: '$(GCC11_IMAGENAME)'
C_COMPILER: '/usr/bin/gcc'
CXX_COMPILER: '/usr/bin/g++'
CMAKE_BIN_DIR: '/usr/bin'
MPI_DIR: '/usr'
CMAKE_FLAGS: '$(C_COMPILERS) $(MPI_FLAGS) -DENABLE_GTEST_DEATH_TESTS=OFF -DENABLE_OPENMP=ON'
linux_gcc11_benchmarks:
Compiler_ImageName: '$(GCC11_IMAGENAME)'
C_COMPILER: '/usr/bin/gcc'
CXX_COMPILER: '/usr/bin/g++'
CMAKE_BIN_DIR: '/usr/bin'
MPI_DIR: '/usr'
CMAKE_FLAGS: '$(C_COMPILERS) $(MPI_FLAGS) -DENABLE_GTEST_DEATH_TESTS=OFF -DENABLE_OPENMP=ON -DENABLE_BENCHMARKS=ON'
linux_gcc11_gmock:
Compiler_ImageName: '$(GCC11_IMAGENAME)'
C_COMPILER: '/usr/bin/gcc'
CXX_COMPILER: '/usr/bin/g++'
CMAKE_BIN_DIR: '/usr/bin'
MPI_DIR: '/usr'
CMAKE_FLAGS: '$(C_COMPILERS) $(MPI_FLAGS) -DENABLE_GTEST_DEATH_TESTS=OFF -DENABLE_OPENMP=ON -DENABLE_GMOCK=ON'
linux_clang10:
Compiler_ImageName: '$(CLANG10_IMAGENAME)'
C_COMPILER: '/usr/bin/clang'
CXX_COMPILER: '/usr/bin/clang++'
CMAKE_BIN_DIR: '/usr/bin'
MPI_DIR: '/usr'
CMAKE_FLAGS: '$(C_COMPILERS) $(MPI_FLAGS) -DENABLE_GTEST_DEATH_TESTS=OFF -DENABLE_OPENMP=ON'
osx_gcc:
VM_ImageName: 'macos-12'
CMAKE_FLAGS: ''
windows:
VM_ImageName: 'windows-2022'
CMAKE_FLAGS: ''
pool:
vmImage: $(VM_ImageName)
steps:
# All
- checkout: self
clean: true
# OSX and Windows
- script: |
mkdir build
cd build
cmake $(CMAKE_FLAGS) ../tests/internal
displayName: 'OSX/Windows CMake'
condition: or( eq( variables['Agent.OS'], 'Windows_NT'), eq( variables['Agent.OS'], 'Darwin'))
- script: |
cmake --build build --config Release
displayName: 'OSX/Windows Build'
condition: or( eq( variables['Agent.OS'], 'Windows_NT'), eq( variables['Agent.OS'], 'Darwin'))
- script: |
cd build
ctest -C Release -T Test --output-on-failure -V
displayName: 'OSX/Windows Test'
condition: or( eq( variables['Agent.OS'], 'Windows_NT'), eq( variables['Agent.OS'], 'Darwin'))
# Linux
- script: |
docker run $(DOCKER_FLAGS) $(CMAKE_BIN_DIR)/cmake $(CMAKE_FLAGS) ../tests/internal
condition: eq( variables['Agent.OS'], 'Linux')
displayName: 'Linux CMake'
- script: |
docker run $(DOCKER_FLAGS) make -j2
condition: eq( variables['Agent.OS'], 'Linux')
displayName: 'Linux Build'
- script: |
docker run $(DOCKER_FLAGS) $(CMAKE_BIN_DIR)/ctest -T Test --output-on-failure -V
condition: eq( variables['Agent.OS'], 'Linux')
displayName: 'Linux Test'
# All
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: 'build/Testing/*/Test.xml'
testRunTitle: '$(Agent.JobName) Tests'
failTaskOnFailedTests: true