/
azure-pipelines-seissol-template.yml
83 lines (78 loc) · 4.85 KB
/
azure-pipelines-seissol-template.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
jobs:
- ${{ each equation in parameters.equations }}:
- ${{ each precision in parameters.precisions }}:
- ${{ each build_type in parameters.build_types }}:
- job:
displayName: ${{ format('equation:{0} precision:{1} build_type:{2}', equation, precision, build_type) }}
pool:
vmImage: 'ubuntu-22.04'
steps:
- bash: |
set -euo pipefail
export IFS=$'\n\t'
export CTEST_OUTPUT_ON_FAILURE=1
whoami
pwd
ls
sudo apt-get update
sudo apt-get install gcc-11 g++-11 gfortran-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 100
sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-11 100
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 100
gcc --version
gcov-tool --version
gcov --version
sudo apt-get install -qq openmpi-bin openmpi-common libopenmpi-dev hdf5-tools libhdf5-openmpi-103 libhdf5-openmpi-dev python3 python3-pip libmetis-dev libparmetis-dev lcov
sudo pip3 install --upgrade pip
sudo pip3 install 'numpy>=1.12.0'
git clone --depth 1 --branch 1.17 https://github.com/hfp/libxsmm
cd libxsmm
make generator -j $(nproc)
mkdir -p $HOME/bin
cp bin/libxsmm_gemm_generator $HOME/bin
export PATH=$HOME/bin:$PATH
cd ..
git clone --depth 1 --branch yaml-cpp-0.7.0 https://github.com/jbeder/yaml-cpp.git
mkdir -p yaml-cpp/build && cd yaml-cpp/build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME -DBUILD_SHARED_LIBS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DYAML_CPP_BUILD_TESTS=OFF
make -j $(nproc)
make install
cd ../.. && rm -rf ./yaml-cpp
wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
tar -xf eigen-3.4.0.tar.gz
mkdir eigen3_build && cd eigen3_build && cmake ../eigen-3.4.0 && sudo make install && cd ..
git clone --depth 1 --branch v1.0.0 https://github.com/SeisSol/easi.git
mkdir easi_build
cd easi_build
cmake -DASAGI=OFF -DIMPALAJIT=OFF -DCMAKE_INSTALL_PREFIX=$HOME ../easi
make -j $(nproc) install
cd ..
git submodule update --init
displayName: prepare-environment
- bash: |
if [ "${{ equation }}" = viscoelastic2 ]; then
mechanisms=3
else
mechanisms=0
fi
mkdir -p build && cd build
CMAKE_PREFIX_PATH=~ PKG_CONFIG_PATH=~/lib/pkgconfig/ cmake -DNETCDF=OFF -DMETIS=ON -DORDER=6 -DASAGI=OFF -DHDF5=ON -DCMAKE_BUILD_TYPE=${{ build_type }} -DTESTING=ON -DLOG_LEVEL=warning -DLOG_LEVEL_MASTER=info -DHOST_ARCH=hsw -DPRECISION=${{ precision }} -DEQUATIONS=${{ equation }} -DNUMBER_OF_MECHANISMS=$mechanisms -DGEMM_TOOLS_LIST=LIBXSMM -DTESTING=ON -DCOVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
displayName: cmake
- bash: |
cd build
export PATH=$HOME/bin:$PATH
make -j $(nproc)
displayName: build
- bash: |
set -eou pipefail
cd build
make test
if [ "${{ equation }}" = elastic -a "${{ build_type }}" = Debug -a "${{ precision }}" = double ] ; then
make SeisSol-coverage
find . -name "*.info"
coverage_file=$(readlink -e $(find . -name "*info" | head -n 1))
echo "coverage_file = $coverage_file"
bash <(curl -s https://codecov.io/bash) -f $coverage_file || echo "Codecov did not collect coverage reports"
fi
displayName: tests-and-coverage