-
Notifications
You must be signed in to change notification settings - Fork 142
260 lines (215 loc) · 6.86 KB
/
release.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
name: SPAdes release snapshot
on:
workflow_dispatch:
push:
tags:
- '*'
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
env:
INSTALL_DIR: ${{github.workspace}}/spades
PKG_LINUX: SPAdes-*-Linux
PKG_MAC: SPAdes-*-Darwin
jobs:
# We build inside a ManyLinux container, but run checks outside
build-linux:
name: '🐧 Build SPAdes inside ManyLinux 2.28 x86-64 container'
runs-on: self-hosted
# We use userns-remap on VM side
container:
image: quay.io/pypa/manylinux_2_28_x86_64
env:
BUILD_TYPE: Release
BUILD_DIR: './build'
SRC_DIR: './src'
steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *
- name: '🧰 Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: '⚙️ Install dependencies'
run: >
dnf install -y bzip2-devel
- name: '⚙️ Configure CMake'
run: >
cmake
-B $BUILD_DIR
-S $SRC_DIR
-DSPADES_USE_NCBISDK=ON -DSPADES_ENABLE_PROJECTS=all
- name: '🚧 Build'
run: >
cmake
--build $BUILD_DIR
-j16
-t package
- name: '📦 Package'
uses: actions/upload-artifact@v4
with:
name: build-artifacts-linux
path: |
${{env.BUILD_DIR}}/${{env.PKG_LINUX}}.tar.gz
spades-1k-checks-linux:
name: '🚬 E. coli 1k smoke checks'
runs-on: self-hosted
needs: build-linux
steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *
- name: '📦 Download package'
uses: actions/download-artifact@v4
with:
name: build-artifacts-linux
path: ${{env.INSTALL_DIR}}
- name: '📦 Unpack package'
working-directory: ${{env.INSTALL_DIR}}
run: >
tar -zxf ${{env.PKG_LINUX}}.tar.gz
- name: '1k multi-cell'
run: >
$INSTALL_DIR/$PKG_LINUX/bin/spades.py --test
- name: '1k single-cell'
run: >
$INSTALL_DIR/$PKG_LINUX/bin/spades.py --sc --test
- name: '1k meta'
run: >
$INSTALL_DIR/$PKG_LINUX/bin/metaspades.py --test
- name: '1k plasmid'
run: >
$INSTALL_DIR/$PKG_LINUX/bin/plasmidspades.py --test
- name: '1k rna'
run: >
$INSTALL_DIR/$PKG_LINUX/bin/rnaspades.py --test
- name: '1k corona'
run: >
$INSTALL_DIR/$PKG_LINUX/bin/coronaspades.py --test
build-mac:
strategy:
matrix:
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: arm64
env:
BUILD_TYPE: Release
BUILD_DIR: './build'
SRC_DIR: './src'
name: '🍎 Build SPAdes for macOS'
runs-on: ${{ matrix.os }}
steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *
- name: '🧰 Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: '⚙️ Install dependencies'
run: >
brew install bzip2 mmv
- name: '💩 Fix gcc / MacSDK trash'
run: >
rm -f /opt/homebrew/Cellar/gcc@13/*/lib/gcc/13/gcc/aarch64-apple*/13/include-fixed/AvailabilityInternal.h
rm -f /usr/local/Cellar/gcc@13/*/lib/gcc/13/gcc/x86_64-apple*/13/include-fixed/AvailabilityInternal.h
- name: '⚙️ Configure CMake'
run: >
cmake
-B $BUILD_DIR
-S $SRC_DIR
-DSPADES_USE_NCBISDK=ON -DSPADES_ENABLE_PROJECTS=all
-DCMAKE_C_COMPILER=gcc-13 -DCMAKE_CXX_COMPILER=g++-13
-DSPADES_STATIC_BUILD=ON
-DOpenMP_CXX_FLAGS:STRING=-fopenmp -DOpenMP_CXX_LIB_NAMES:STRING=gomp -DOpenMP_C_FLAGS:STRING=-fopenmp -DOpenMP_C_LIB_NAMES:STRING=gomp -DOpenMP_gomp_LIBRARY=libgomp.a
-DCMAKE_EXE_LINKER_FLAGS="-Wl,-ld_classic" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-ld_classic" -DCMAKE_MODULE_LINKER_FLAGS="-Wl,-ld_classic"
-DBZIP2_LIBRARIES=$(brew --prefix bzip2)/lib/libbz2.a
- name: '🚧 Build'
run: >
cmake
--build $BUILD_DIR
-j16
-t package && mmv '${{env.BUILD_DIR}}/SPAdes-*-Darwin.tar.gz' '${{env.BUILD_DIR}}/SPAdes-#1-Darwin-${{ matrix.arch }}.tar.gz'
- name: '🗂 Inspect directory before downloading artifacts'
run: >
ls -alFR ${{env.BUILD_DIR}}/*.tar.gz
- name: '📦 Package'
uses: actions/upload-artifact@v4
with:
name: build-artifacts-mac-${{ matrix.arch }}
path: |
${{env.BUILD_DIR}}/${{env.PKG_MAC}}-${{ matrix.arch }}.tar.gz
spades-1k-checks-mac:
name: '🚬 E. coli 1k smoke checks'
strategy:
matrix:
include:
- os: macos-13
arch: x86_64
- os: macos-14
arch: arm64
runs-on: ${{ matrix.os }}
needs: build-mac
steps:
- name: '🧹 Cleanup'
run: >
set -e &&
shopt -s dotglob &&
rm -rf *
- name: '📦 Download package'
uses: actions/download-artifact@v4
with:
name: build-artifacts-mac-${{ matrix.arch }}
path: ${{env.INSTALL_DIR}}
- name: '📦 Unpack package'
working-directory: ${{env.INSTALL_DIR}}
run: >
tar -zxf ${{env.PKG_MAC}}*.tar.gz
- name: '1k multi-cell'
run: >
$INSTALL_DIR/$PKG_MAC/bin/spades.py --test
- name: '1k single-cell'
run: >
$INSTALL_DIR/$PKG_MAC/bin/spades.py --sc --test
- name: '1k meta'
run: >
$INSTALL_DIR/$PKG_MAC/bin/metaspades.py --test
- name: '1k plasmid'
run: >
$INSTALL_DIR/$PKG_MAC/bin/plasmidspades.py --test
- name: '1k rna'
run: >
$INSTALL_DIR/$PKG_MAC/bin/rnaspades.py --test
- name: '1k corona'
run: >
$INSTALL_DIR/$PKG_MAC/bin/coronaspades.py --test
# Upload continuous build
upload:
name: '🗂 Create release and upload artifacts'
needs:
- spades-1k-checks-mac
- spades-1k-checks-linux
runs-on: ubuntu-20.04
steps:
- name: '⚙️ Install dependencies'
run: sudo apt-get install -y libfuse2
- name: '📥 Download artifacts'
uses: actions/download-artifact@v4
- name: '🗂 Inspect directory after downloading artifacts'
run: ls -alFR
- name: '🚀 Create release and upload artifacts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
chmod +x pyuploadtool-x86_64.AppImage
./pyuploadtool-x86_64.AppImage **/${{env.PKG_MAC}}*.tar.gz **/${{env.PKG_LINUX}}*.tar.gz