forked from soedinglab/MMseqs2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
403 lines (391 loc) · 15.5 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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
# https://aka.ms/yaml
trigger:
- master
variables:
regression: 1
jobs:
- job: build_ubuntu_userguide
displayName: Ubuntu Userguide
pool:
vmImage: 'Ubuntu-20.04'
steps:
- checkout: "none"
- task: Cache@2
inputs:
key: '"tectonic" | "$(Agent.OS)"'
restoreKeys: |
"tectonic" | "$(Agent.OS)"
"tectonic"
path: $(Pipeline.Workspace)/tectonic-cache/
displayName: Cache Tectonic
- script: |
wget -qO- https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%400.8.0/tectonic-0.8.0-x86_64-unknown-linux-gnu.tar.gz | tar xzvf - tectonic
wget -qO- https://github.com/jgm/pandoc/releases/download/2.11.3.2/pandoc-2.11.3.2-linux-amd64.tar.gz | tar --strip-components=2 -xzvf - pandoc-2.11.3.2/bin/pandoc
sudo mv -f pandoc tectonic /usr/local/bin
displayName: Install Dependencies
- script: |
cd ${SYSTEM_DEFAULTWORKINGDIRECTORY}
git clone https://github.com/soedinglab/MMseqs2.wiki.git .
export XDG_CACHE_HOME=${PIPELINE_WORKSPACE}/tectonic-cache/
.pandoc/make-pdf.sh
displayName: Build Userguide
- task: PublishPipelineArtifact@0
inputs:
targetPath: $(System.DefaultWorkingDirectory)/userguide.pdf
artifactName: userguide
- job: build_macos
displayName: macOS
pool:
vmImage: 'macos-12'
steps:
- checkout: self
submodules: true
- script: |
cd ${BUILD_SOURCESDIRECTORY}
./util/build_osx.sh . build
displayName: Build MMseqs2
- script: |
${BUILD_SOURCESDIRECTORY}/util/regression/run_regression.sh ${BUILD_SOURCESDIRECTORY}/build/mmseqs ${BUILD_SOURCESDIRECTORY}/regression
displayName: Run Regression Suite
condition: eq(variables['regression'], 1)
- task: PublishPipelineArtifact@0
inputs:
targetPath: $(Build.SourcesDirectory)/build/mmseqs
artifactName: mmseqs-darwin-universal
- job: build_ubuntu
displayName: Ubuntu MMseqs2
pool:
vmImage: 'Ubuntu-20.04'
timeoutInMinutes: 120
strategy:
matrix:
avx2:
SIMD: 'AVX2'
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
sse41:
SIMD: 'SSE4_1'
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
sse2:
SIMD: 'SSE2'
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
avx2_mpi:
SIMD: 'AVX2'
STATIC: 0
MPI: 1
BUILD_TYPE: RelWithDebInfo
asan:
SIMD: 'AVX2'
STATIC: 0
MPI: 0
BUILD_TYPE: ASanOpt
steps:
- checkout: self
submodules: true
- script: |
#sudo add-apt-repository ppa:ubuntu-toolchain-r/test
#sudo apt-get update
sudo apt-get install -y g++-10
condition: eq(variables['BUILD_TYPE'], 'ASanOpt')
displayName: Install newer G++
- script: |
sudo apt-get update
sudo apt-get -y install mpi-default-dev mpi-default-bin
displayName: Install Dependencies
condition: eq(variables['MPI'], 1)
- script: |
mkdir build && cd build
if [ "${BUILD_TYPE}" = "ASanOpt" ]; then
export CC=gcc-10 ; export CXX=g++-10
fi
if [ "${STATIC}" -eq "1" ]; then
cmake -DHAVE_SANITIZER=1 -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DHAVE_TESTS=1 \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc \
-static-libstdc++" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
-DENABLE_WERROR=1 -DHAVE_${SIMD}=1 -DHAVE_MPI=${MPI} ..
else
cmake -DHAVE_SANITIZER=1 -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DHAVE_TESTS=1 \
-DENABLE_WERROR=1 -DHAVE_${SIMD}=1 -DHAVE_MPI=${MPI} ..
fi
make -j $(nproc --all)
displayName: Build MMseqs2
- script: |
export TTY=0
if [ "${BUILD_TYPE}" = "ASan" ]; then
echo "leak:libgomp1" > ${BUILD_SOURCESDIRECTORY}/ASan.supp
export ASAN_OPTIONS=suppressions=${BUILD_SOURCESDIRECTORY}/ASan.supp
fi
${BUILD_SOURCESDIRECTORY}/util/regression/run_regression.sh ${BUILD_SOURCESDIRECTORY}/build/src/mmseqs ${BUILD_SOURCESDIRECTORY}/regression
displayName: Run Regression Suite
condition: eq(variables['regression'], 1)
- task: PublishPipelineArtifact@0
condition: eq(variables['STATIC'], 1)
inputs:
targetPath: $(Build.SourcesDirectory)/build/src/mmseqs
artifactName: mmseqs-linux-$(SIMD)
- job: build_ubuntu_cross
displayName: Ubuntu Cross-Compile
pool:
vmImage: 'Ubuntu-20.04'
timeoutInMinutes: 120
strategy:
matrix:
power8:
SIMD: POWER8
ARCH: ppc64el
CPREF: powerpc64le
power9:
SIMD: POWER9
ARCH: ppc64el
CPREF: powerpc64le
arm64:
SIMD: ARM8
ARCH: arm64
CPREF: aarch64
steps:
- script: |
sudo dpkg --add-architecture $ARCH
cat << HEREDOC | sudo tee /etc/apt/sources.list
deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ focal main universe multiverse
deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ focal-updates main universe multiverse
deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ focal-backports main universe multiverse
deb [arch=amd64,i386] http://security.ubuntu.com/ubuntu/ focal-security main universe multiverse
deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ focal main universe multiverse
deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main universe multiverse
deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main universe multiverse
deb [arch=$ARCH] http://ports.ubuntu.com/ubuntu-ports/ focal-security main universe multiverse
HEREDOC
sudo apt-get update
sudo apt-get -y install -o APT::Immediate-Configure=false crossbuild-essential-$ARCH zlib1g-dev:$ARCH libbz2-dev:$ARCH
displayName: Install Toolchain
- script: |
mkdir build && cd build
CC=${CPREF}-linux-gnu-gcc CXX=${CPREF}-linux-gnu-g++ \
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DHAVE_TESTS=1 \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc \
-static-libstdc++" -DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
-DENABLE_WERROR=1 -DHAVE_${SIMD}=1 ..
make -j $(nproc --all)
displayName: Build MMseqs2
- task: PublishPipelineArtifact@0
inputs:
targetPath: $(Build.SourcesDirectory)/build/src/mmseqs
artifactName: mmseqs-linux-$(SIMD)
- job: build_windows
displayName: Windows
pool:
vmImage: 'windows-2019'
variables:
CYGWIN_ROOT: $(System.Workfolder)\cygwin
CYGWIN_MIRROR: http://cygwin.mirror.constant.com
timeoutInMinutes: 120
steps:
- powershell: git config --global core.autocrlf false
displayName: core.autocrlf false
- checkout: self
submodules: true
- script: |
rmdir /s /q C:\Strawberry
displayName: Remove Strawberry Perl (Conflict with Cygwin)
- script: |
choco install cygwin --params="/InstallDir:%CYGWIN_ROOT%"
displayName: Install Cygwin
- script: |
%CYGWIN_ROOT%\cygwinsetup.exe -qnNdO -R "%CYGWIN_ROOT%" -s "%CYGWIN_MIRROR%" -g -P ^
bash,^
xxd,^
cmake,^
make,^
gcc-core,^
gcc-g++,^
zlib-devel,^
libbz2-devel,^
busybox-standalone,^
git,^
binutils,^
wget
displayName: Install Dependencies
- script: |
%CYGWIN_ROOT%\bin\bash.exe -cl "${BUILD_SOURCESDIRECTORY}/util/build_windows.sh $(cygpath ${BUILD_SOURCESDIRECTORY}) $(cygpath ${BUILD_SOURCESDIRECTORY}/build)"
displayName: Build MMseqs2
- task: "ArchiveFiles@2"
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)\build\mmseqs
archiveFile: $(Build.SourcesDirectory)\mmseqs-win64.zip
includeRootFolder: true
archiveType: zip
- task: PublishPipelineArtifact@0
inputs:
targetPath: $(Build.SourcesDirectory)\mmseqs-win64.zip
artifactName: mmseqs-win64
# - script: |
# %BUILD_SOURCESDIRECTORY%\build\mmseqs\mmseqs.bat version
# displayName: Setup Busybox
- script: |
%CYGWIN_ROOT%\bin\bash.exe -cl "${BUILD_SOURCESDIRECTORY}/util/regression/run_regression.sh $(cygpath ${BUILD_SOURCESDIRECTORY}/build/build_sse41/src/mmseqs.exe) $(cygpath ${BUILD_SOURCESDIRECTORY}/regression)"
displayName: Run Regression Suite
condition: eq(variables['regression'], 1)
- job: upload_artifacts
displayName: Upload Artifacts
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: 'ubuntu-latest'
dependsOn:
- build_ubuntu_userguide
- build_macos
- build_ubuntu
- build_ubuntu_cross
- build_windows
steps:
- script: |
cd "${BUILD_SOURCESDIRECTORY}"
mkdir mmseqs
cp -f README.md LICENSE.md mmseqs
cp -r examples mmseqs
mkdir mmseqs/matrices
cp -f data/*.out mmseqs/matrices
mkdir mmseqs/util
cp -f util/bash-completion.sh mmseqs/util
mkdir mmseqs/bin
- task: DownloadPipelineArtifact@1
inputs:
artifactName: userguide
targetPath: $(Build.SourcesDirectory)/mmseqs
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-darwin-universal
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-osx-universal.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-linux-SSE4_1
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-linux-sse41.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-linux-AVX2
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-linux-avx2.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-linux-SSE2
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-linux-sse2.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-linux-POWER9
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-linux-ppc64le-power9.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-linux-POWER8
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-linux-ppc64le-power8.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-linux-ARM8
targetPath: $(Build.SourcesDirectory)/mmseqs/bin
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-linux-arm64.tar.gz
includeRootFolder: true
archiveType: tar
- script:
rm "${BUILD_SOURCESDIRECTORY}/mmseqs/bin/mmseqs"
- task: DownloadPipelineArtifact@1
inputs:
artifactName: mmseqs-win64
targetPath: $(Build.SourcesDirectory)
- script: |
unzip "${BUILD_SOURCESDIRECTORY}/mmseqs-win64.zip"
chmod +x mmseqs/mmseqs.bat mmseqs/bin/*
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/mmseqs
archiveFile: $(Build.SourcesDirectory)/mmseqs-win64.zip
includeRootFolder: true
archiveType: zip
- task: DownloadSecureFile@1
inputs:
secureFile: secretKeyPleaseDontSteal
displayName: Get Deployment Key
- script: |
mkdir ~/.ssh && mv $DOWNLOADSECUREFILE_SECUREFILEPATH ~/.ssh/id_rsa
chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_rsa
ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub
cd "${BUILD_SOURCESDIRECTORY}"
cp mmseqs/userguide.pdf userguide.pdf
ssh-keygen -Y sign -f ~/.ssh/id_rsa -n file \
userguide.pdf \
mmseqs-osx-universal.tar.gz \
mmseqs-linux-sse2.tar.gz \
mmseqs-linux-sse41.tar.gz \
mmseqs-linux-avx2.tar.gz \
mmseqs-linux-arm64.tar.gz \
mmseqs-linux-ppc64le-power8.tar.gz \
mmseqs-linux-ppc64le-power9.tar.gz \
mmseqs-win64.zip
curl --retry 5 --retry-all-errors -X POST \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F file[][email protected] -F signature[][email protected] \
-F identifier="mmseqs" -F directory="${BUILD_SOURCEVERSION}" \
https://mmseqs.com/upload