This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yml
182 lines (169 loc) · 5.86 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
###############################################################################
# Ascent CI Checks
###############################################################################
# Ref:
# https://aka.ms/yaml
#####
# TO USE A NEW CONTAINER, UPDATE TAG NAME HERE AS PART OF YOUR PR!
#####
variables:
ubuntu_18_tag : alpinedav/ascent-ci:ubuntu-18-devel
# only build merge target pr to develop
trigger: none
pr:
branches:
include:
- develop
# fast fail sanity checks
stages:
# main checks
- stage: Main
jobs:
###############################################################################
# Ubuntu build and test, using spack to build tpls
###############################################################################
- job: Main
pool:
vmImage: 'ubuntu-latest'
timeoutInMinutes: 0
variables:
COMPILER_CC: gcc
COMPILER_CXX: g++
COMPILER_FC: gfortran
strategy:
matrix:
shared_release_double:
containerImage: ${{ variables.ubuntu_18_tag }}
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Release
DRAY_USE_DOUBLE_PRECISION: ON
shared_release:
containerImage: ${{ variables.ubuntu_18_tag }}
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Release
DRAY_USE_DOUBLE_PRECISION: OFF
shared_debug:
containerImage: ${{ variables.ubuntu_18_tag }}
BUILD_SHARED_LIBS: ON
CMAKE_BUILD_TYPE: Debug
DRAY_USE_DOUBLE_PRECISION: OFF
static_release:
containerImage: ${{ variables.ubuntu_18_tag }}
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Release
DRAY_USE_DOUBLE_PRECISION: OFF
static_release_mpi_only:
containerImage: ${{ variables.ubuntu_18_tag }}
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Release
ENABLE_SERIAL: OFF
DRAY_USE_DOUBLE_PRECISION: OFF
static_debug:
containerImage: ${{ variables.ubuntu_18_tag }}
BUILD_SHARED_LIBS: OFF
CMAKE_BUILD_TYPE: Debug
DRAY_USE_DOUBLE_PRECISION: OFF
container: $[ variables['containerImage'] ]
steps:
- checkout: self
clean: boolean
submodules: recursive
- script: |
#################################
# run uber to build tpls
#################################
#
pwd
# echo system python details
which python
python --version
# setup spack spec
export SPACK_SPEC="@develop%gcc"
# mfem
echo $SPACK_SPEC
# run uber to build tpls
python scripts/uberenv/uberenv.py --pull --spec "${SPACK_SPEC}" --spack-config-dir=scripts/uberenv_configs/spack_configs/configs/alpinedav/ubuntu_18_devel/
displayName: 'Spack Build Tpls'
- script: |
#################################
# configure
#################################
# setup compiler env vars
export CC=${COMPILER_CC}
export CXX=${COMPILER_CXX}
export FC=${COMPILER_FC}
${CC} --version
# capture current path
export ROOT_DIR=`pwd`
# find spack generated host config file
export HOST_CONFIG=`ls ${ROOT_DIR}/uberenv_libs/*.cmake`
echo $HOST_CONFIG
# find spack installed cmake
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
echo $PATH
which cmake
cmake --version
# prepare build dir
mkdir build
cd build
# setup cmake options
export CMAKE_OPTS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
export CMAKE_OPTS="${CMAKE_OPTS} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}"
export CMAKE_OPTS="${CMAKE_OPTS} -DDRAY_USE_DOUBLE_PRECISION=${DRAY_USE_DOUBLE_PRECISION}"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_INSTALL_PREFIX=../install"
# configure
cmake ${CMAKE_OPTS} -C ${HOST_CONFIG} ../src
displayName: 'Configure with CMake'
- script: |
#################################
# build
#################################
# build
cd build
make VERBOSE=1
displayName: 'Build'
- script: |
#################################
# test
#################################
# find spack installed cmake
export ROOT_DIR=`pwd`
export CMAKE_BIN_DIR=`ls -d ${ROOT_DIR}/uberenv_libs/spack/opt/spack/*/*/cmake*/bin`
export PATH=${CMAKE_BIN_DIR}:$PATH
which ctest
cd build
# run ctest
ctest -T test --output-on-failure -V
displayName: 'Run Unit Tests'
- script: |
#################################
# gen img diff report
#################################
# run cmake target to gen report
cd build
make gen_report
displayName: 'Run Gen Test Image Diff Report'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'cTest'
testResultsFiles: '**/Test.xml'
displayName: 'Unit Test Results'
condition: always()
- task: CopyFiles@2
inputs:
contents: 'build/tests/dray/_output/**'
targetFolder: $(Build.ArtifactStagingDirectory)
condition: always()
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: Devil_Ray_Test_Outputs
condition: always()
- script: |
#################################
# install
#################################
cd build
make install
displayName: 'Install'