-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yml
132 lines (109 loc) · 3.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
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
jobs:
- job: linux
pool:
vmImage: 'ubuntu-latest'
steps:
- checkout: self
submodules: recursive
- script: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add conda to PATH
- script: conda create --yes --quiet --name btllib_CI
displayName: Create Anaconda environment
- script: |
source activate btllib_CI
conda install --yes -c conda-forge mamba
mamba install --yes -c conda-forge -c bioconda libcxx compilers clang llvm clang-format=18 clang-tools boost samtools coreutils xz lrzip meson ninja cmake openmp
pip install gcovr
displayName: Install dependencies
- script: |
source activate btllib_CI
meson setup build && cd build && ninja
displayName: 'Build the project'
- script: |
source activate btllib_CI
set -o errexit -o pipefail
./compile
cd examples
g++ nthash_spacedseeds.cpp -std=c++17 -I../install/include -L../install/lib -lbtllib && ./a.out
displayName: 'Compile example'
- script: |
source activate btllib_CI
cd build && ninja clang-format-check
displayName: 'Run clang-format'
- script: |
source activate btllib_CI
cd build && meson test --repeat=5 --print-errorlogs
displayName: 'Run tests'
- script: |
source activate btllib_CI
cd build && ninja sanitize-undefined
if [[ $? -ne 0 ]]; then
cat __build-sanitize-undefined/meson-logs/testlog.txt
exit 1
fi
displayName: 'Sanitize undefined'
- script: |
source activate btllib_CI
set -o errexit -o pipefail
./compile
cd build && ninja test-wrappers
displayName: 'Test wrappers'
- script: |
source activate btllib_CI
cd build && ninja test && ninja code-coverage
displayName: 'Run code coverage tests'
- job: macos
pool:
vmImage: 'macOS-latest'
steps:
- checkout: self
persistCredentials: true
submodules: recursive
- script: |
mkdir -p ~/miniforge3
curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-x86_64.sh -o ~/miniforge3/miniforge.sh
bash ~/miniforge3/miniforge.sh -b -u -p ~/miniforge3
rm -rf ~/miniforge3/miniforge.sh
~/miniforge3/bin/conda init bash
~/miniforge3/bin/conda init zsh
export CONDA=$(realpath ~/miniforge3/bin)
echo "##vso[task.prependpath]$CONDA"
displayName: Install conda
- script: conda create --yes --quiet --name btllib_CI
displayName: Create Anaconda environment
- script: |
source activate btllib_CI
mamba install --yes -c conda-forge -c bioconda libcxx compilers llvm clang-format clang-tools boost 'samtools>=1.14' coreutils xz lrzip meson ninja cmake openmp gcovr
displayName: 'Install required software'
- script: |
source activate btllib_CI
export CXXFLAGS="$CXXFLAGS -Wno-error=unused-but-set-variable"
meson setup build && cd build && ninja
displayName: 'Build the project'
- script: |
source activate btllib_CI
set -o errexit -o pipefail
./compile
cd examples
clang++ nthash_spacedseeds.cpp -std=c++17 -I../install/include -L../install/lib -lbtllib && ./a.out
displayName: 'Compile example'
- script: |
source activate btllib_CI && cd build && meson test --repeat=5 --print-errorlogs
displayName: 'Run tests'
- script: |
source activate btllib_CI && cd build
export CXXFLAGS="$CXXFLAGS -Wno-error=unused-but-set-variable"
ninja sanitize-undefined
if [[ $? -ne 0 ]]; then
cat __build-sanitize-undefined/meson-logs/testlog.txt
exit 1
fi
displayName: 'Sanitize undefined'
- script: |
source activate btllib_CI
set -o errexit -o pipefail
./compile
cd build && ninja test-wrappers
displayName: 'Test wrappers'