-
Notifications
You must be signed in to change notification settings - Fork 14
240 lines (210 loc) · 8.56 KB
/
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
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
name: Build & upload binaries
on:
push:
branches:
- testactions
workflow_dispatch:
env:
regression: 1
jobs:
build_macos:
name: macOS
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust Toolchain
run: |
rustup update
rustup target install x86_64-apple-darwin
rustup target install aarch64-apple-darwin
- name: Build
run: |
cd ${{ github.workspace }}
./util/build_osx.sh . build
- name: Run Regression Suite
if: ${{ env.regression == 1 }}
run: |
${{ github.workspace }}/regression/run_regression.sh ${{ github.workspace }}/build/src/foldmason ${{ github.workspace }}/regression
- name: Upload MacOS Universal
uses: actions/upload-artifact@v3
with:
name: foldmason-darwin-universal
path: ${{ github.workspace }}/build/foldmason
build_ubuntu:
name: Build Ubuntu
runs-on: ubuntu-22.04
timeout-minutes: 120
strategy:
matrix:
include:
- SIMD: AVX2
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
- SIMD: SSE4_1
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
- SIMD: SSE2
STATIC: 1
MPI: 0
BUILD_TYPE: RelWithDebInfo
- SIMD: AVX2_MPI
STATIC: 0
MPI: 1
BUILD_TYPE: RelWithDebInfo
- SIMD: AVX2
STATIC: 0
MPI: 0
BUILD_TYPE: ASanOpt
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install G++
run: |
sudo apt-get update
sudo apt-get install -y g++-12 rustc cargo
- name: Install Dependencies
if: matrix.MPI == 1
run: |
sudo apt-get update
sudo apt-get -y install mpi-default-dev mpi-default-bin
- name: Build Foldmason
run: |
mkdir build
cd build
export CC=gcc-12
export CXX=g++-12
WERROR=1
if [ "${{ matrix.BUILD_TYPE }}" = "ASanOpt" ]; then
WERROR=0
fi
if [ "${{ matrix.STATIC }}" -eq "1" ]; then
cmake -DHAVE_SANITIZER=1 -DCMAKE_BUILD_TYPE=${{ matrix.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=$WERROR -DHAVE_${{ matrix.SIMD }}=1 -DHAVE_MPI=${{ matrix.MPI }} ..
else
cmake -DHAVE_SANITIZER=1 -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DHAVE_TESTS=1 \
-DENABLE_WERROR=$WERROR -DHAVE_${{ matrix.SIMD }}=1 -DHAVE_MPI=${{ matrix.MPI }} ..
fi
make -j $(nproc --all)
- name: Run Regression Suite
if: ${{ env.regression == 1 }}
run: |
export TTY=0
if [ "${{ matrix.BUILD_TYPE }}" = "ASan" ]; then
echo "leak:libgomp1" > ASan.supp
export ASAN_OPTIONS=suppressions=ASan.supp
fi
${{ github.workspace }}/regression/run_regression.sh ${{ github.workspace }}/build/src/foldmason ${{ github.workspace }}/regression
- name: Upload Linux
if: matrix.STATIC == 1
uses: actions/upload-artifact@v3
with:
name: mmseqs-linux-${{ matrix.SIMD }}
path: build/src/mmseqs
build_ubuntu_cross:
name: Ubuntu Cross-Compile
runs-on: ubuntu-20.04
timeout-minutes: 120
strategy:
matrix:
include:
- SIMD: ARM8
ARCH: arm64
CPREF: aarch64
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Toolchain
run: |
sudo dpkg --add-architecture ${{ matrix.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=${{ matrix.ARCH }}] http://ports.ubuntu.com/ubuntu-ports/ focal main universe multiverse
deb [arch=${{ matrix.ARCH }}] http://ports.ubuntu.com/ubuntu-ports/ focal-updates main universe multiverse
deb [arch=${{ matrix.ARCH }}] http://ports.ubuntu.com/ubuntu-ports/ focal-backports main universe multiverse
deb [arch=${{ matrix.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-${{ matrix.ARCH }} zlib1g-dev:${{ matrix.ARCH }} libbz2-dev:${{ matrix.ARCH }}
rustup target add ${{ matrix.CPREF }}-unknown-linux-gnu
- name: Build Cross
run: |
mkdir build && cd build
CC=${{ matrix.CPREF }}-linux-gnu-gcc CXX=${{ matrix.CPREF }}-linux-gnu-g++ \
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHAVE_TESTS=1 \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_EXE_LINKER_FLAGS="-static -static-libgcc -static-libstdc++" \
-DCMAKE_FIND_LIBRARY_SUFFIXES=".a" \
-DRust_CARGO_TARGET=${{ matrix.CPREF }}-unknown-linux-gnu \
-DENABLE_WERROR=1 -DHAVE_${{ matrix.SIMD }}=1 ..
make -j $(nproc --all)
- name: Upload Linux Artifact
uses: actions/upload-artifact@v3
with:
name: mmseqs-linux-${{ matrix.SIMD }}
path: build/src/foldmason
upload_artifacts:
name: Upload Artifacts
runs-on: ubuntu-latest
needs: [build_macos, build_ubuntu, build_ubuntu_cross]
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Prepare Artifacts Directory
run: |
mkdir foldmason
cp -f README.md LICENSE.md foldmason
mkdir mmseqs/bin
- name: Download Userguide Artifact
uses: actions/download-artifact@v3
with:
name: userguide
path: foldmason
- name: Download foldmason-darwin-universal Artifact
uses: actions/download-artifact@v3
with:
name: foldmason-darwin-universal
path: foldmason/bin
- name: Set Executable Permissions on macOS Binary
run: chmod +x foldmason/bin/foldmason
- name: Archive macOS Binary
run: tar -czvf foldmason-osx-universal.tar.gz -C foldmason .
- name: Download foldmason-linux-SSE4_1 Artifact
uses: actions/download-artifact@v3
with:
name: foldmason-linux-SSE4_1
path: foldmason/bin
- name: Set Executable Permissions on SSE4_1 Binary
run: chmod +x foldmason/bin/foldmason
- name: Archive SSE4_1 Binary
run: tar -czvf foldmason-linux-sse41.tar.gz -C foldmason .
# - name: Get Deployment Key
# uses: actions/download-artifact@v3
# with:
# name: secretKeyPleaseDontSteal
# - name: Sign and Upload Artifacts
# run: |
# mkdir -p $HOME/.ssh && mv secretKeyPleaseDontSteal $HOME/.ssh/id_rsa
# chmod 700 $HOME/.ssh && chmod 600 $HOME/.ssh/id_rsa
# ssh-keygen -f $HOME/.ssh/id_rsa -y > $HOME/.ssh/id_rsa.pub
# cp mmseqs/userguide.pdf userguide.pdf
# ssh-keygen -Y sign -f $HOME/.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[]=@mmseqs-linux-pp