-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathlinux_build.yml
42 lines (42 loc) · 1.48 KB
/
linux_build.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
steps:
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
sudo chown -R ${USER} ${CONDA}
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda create --name coordgen_build $(compiler) cmake \
boost-cpp=$(boost_version) boost=$(boost_version) \
libboost=$(boost_version)
displayName: Setup build environment
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
conda activate coordgen_build
export BASE_PATH=$(pwd)
mkdir build && cd build && \
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCOORDGEN_RIGOROUS_BUILD=ON \
-DBoost_NO_SYSTEM_PATHS=ON \
-DCMAKE_INCLUDE_PATH="${CONDA_PREFIX}/include" \
-DCMAKE_LIBRARY_PATH="${CONDA_PREFIX}/lib" \
-DCMAKE_INSTALL_PREFIX="${BASE_PATH}/install" \
-DCOORDGEN_BUILD_SHARED_LIBS=$(shared_lib)
displayName: Configure build (Run CMake)
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
conda activate coordgen_build
cd build
make -j $( $(number_of_cores) ) install
displayName: Build
- bash: |
source ${CONDA}/etc/profile.d/conda.sh
conda activate coordgen_build
cd build
ctest -j $( $(number_of_cores) ) --output-on-failure -T Test
displayName: Run tests
- task: PublishTestResults@2
inputs:
testResultsFormat: "CTest"
testResultsFiles: "build/Testing/*/Test.xml"
testRunTitle: $(system.phasedisplayname) CTest Test Run