-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathazure-pipelines.yml
144 lines (139 loc) · 5.57 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
# https://aka.ms/yaml
trigger:
- master
variables:
regression: 1
jobs:
- job: build_ubuntu_2004_userguide
displayName: Ubuntu 2004 Userguide
pool:
vmImage: 'Ubuntu-20.04'
steps:
- checkout: "none"
- script: |
sudo apt-get update
sudo apt-get -y install pandoc texlive-latex-recommended texlive-fonts-extra
displayName: Install Dependencies
- script: |
cd ${SYSTEM_DEFAULTWORKINGDIRECTORY}
git clone https://github.com/martin-steinegger/conterminator.wiki.git .
.pandoc/make-pdf.sh
displayName: Build Userguide
- task: PublishPipelineArtifact@0
inputs:
targetPath: $(System.DefaultWorkingDirectory)/userguide.pdf
artifactName: userguide
- job: build_ubuntu_2004
displayName: Ubuntu 2004 Conterminator
pool:
vmImage: 'Ubuntu-20.04'
timeoutInMinutes: 120
strategy:
matrix:
avx2:
SIMD: 'AVX2'
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
sse:
SIMD: 'SSE4_1'
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
asan:
SIMD: 'AVX2'
STATIC: 0
MPI: 0
BUILD_TYPE: ASanOpt
steps:
- 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 [ "${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 Conterminator
- script: |
export TTY=0
if [ "${BUILD_TYPE}" = "ASan" ]; then
echo "leak:libgomp1" > ${BUILD_SOURCESDIRECTORY}/ASan.supp
export export ASAN_OPTIONS=suppressions=${BUILD_SOURCESDIRECTORY}/ASan.supp
fi
${BUILD_SOURCESDIRECTORY}/build/src/conterminator dna ${BUILD_SOURCESDIRECTORY}/example/dna.fas ${BUILD_SOURCESDIRECTORY}/example/dna.mapping result tmp
${BUILD_SOURCESDIRECTORY}/build/src/conterminator protein ${BUILD_SOURCESDIRECTORY}/example/prots.fas ${BUILD_SOURCESDIRECTORY}/example/prots.mapping result tmp
displayName: Run Regression Suite
condition: eq(variables['regression'], 1)
- task: PublishPipelineArtifact@0
condition: eq(variables['STATIC'], 1)
inputs:
targetPath: $(Build.SourcesDirectory)/build/src/conterminator
artifactName: conterminator-linux-$(SIMD)
- job: upload_artifacts
displayName: Upload Artifacts
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: 'Ubuntu-20.04'
dependsOn:
- build_ubuntu_2004_userguide
- build_ubuntu_2004
steps:
- script: |
cd "${BUILD_SOURCESDIRECTORY}"
mkdir conterminator
cp -f README.md LICENCE.md conterminator
cp -r examples conterminator
mkdir conterminator/bin
- task: DownloadPipelineArtifact@1
inputs:
artifactName: userguide
targetPath: $(Build.SourcesDirectory)/conterminator
- task: DownloadPipelineArtifact@1
inputs:
artifactName: conterminator-linux-SSE4_1
targetPath: $(Build.SourcesDirectory)/conterminator/
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/conterminator/conterminator"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/conterminator
archiveFile: $(Build.SourcesDirectory)/conterminator-linux-sse41.tar.gz
includeRootFolder: true
archiveType: tar
- task: DownloadPipelineArtifact@1
inputs:
artifactName: conterminator-linux-AVX2
targetPath: $(Build.SourcesDirectory)/conterminator/
- script:
chmod +x "${BUILD_SOURCESDIRECTORY}/conterminator/conterminator"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/conterminator
archiveFile: $(Build.SourcesDirectory)/conterminator-linux-avx2.tar.gz
includeRootFolder: true
archiveType: tar
- script:
rm "${BUILD_SOURCESDIRECTORY}/conterminator/conterminator"
- 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-keyscan -t rsa uniclust.mmseqs.com >> ~/.ssh/known_hosts
cd "${BUILD_SOURCESDIRECTORY}"
ssh [email protected] "mkdir -p \"/home/mirdita/repositories/mmseqs-webserver/archive/${BUILD_SOURCEVERSION}\""
scp conterminator/userguide.pdf conterminator-linux-sse41.tar.gz conterminator-linux-avx2.tar.gz [email protected]:"/home/mirdita/repositories/mmseqs-webserver/archive/${BUILD_SOURCEVERSION}"
ssh [email protected] "update-latest-conterminator.sh \"${BUILD_SOURCEVERSION}\""