-
Notifications
You must be signed in to change notification settings - Fork 98
259 lines (216 loc) · 12.8 KB
/
build_binaries.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
name: Build binaries
on:
push:
pull_request:
release:
types: [published]
jobs:
ubuntu:
strategy:
matrix:
projects: [
{short_name: "physiboss-tutorial", project: "physiboss-tutorial", name: "PhysiBoSS tutorial", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-tutorial-invasion", project: "physiboss-tutorial-invasion", name: "PhysiBoSS Cancer Invasion", binary: "invasion_model", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-cell-lines", project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template_BM", project: "template_BM", name: "PhysiBoSS Template", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template", project: "template", name: "PhysiCell Template", binary: "project", extra_run: ""},
{short_name: "rules", project: "rules-sample", name: "PhysiCell Rules", binary: "project", extra_run: ""},
{short_name: "physimess", project: "physimess-sample", name: "PhysiMeSS", binary: "project", extra_run: ""},
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build ${{ matrix.projects.name }}
run: |
make ${{ matrix.projects.project }}
make clean
${{ matrix.projects.extra_run }}
make static STATIC_OPENMP=/usr/lib/gcc/x86_64-linux-gnu/11/libgomp.a
- name: Checking binary for ${{ matrix.projects.name }}
run: |
ldd ${{ matrix.projects.binary }}
- name: Build ${{ matrix.projects.name }} project archive
run: |
rm -fr config/PhysiCell_settings-backup.xml
tar -zcvf ${{ matrix.projects.short_name }}-linux.tar.gz ${{ matrix.projects.binary }} Makefile main.cpp config/ custom_modules/
- uses: actions/upload-release-asset@v1
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: ${{ matrix.projects.short_name }}-linux.tar.gz
asset_path: ${{ github.workspace }}/${{ matrix.projects.short_name }}-linux.tar.gz
asset_content_type: application/gzip
windows:
strategy:
matrix:
projects: [
{short_name: "physiboss-tutorial", project: "physiboss-tutorial", name: "PhysiBoSS tutorial", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-tutorial-invasion", project: "physiboss-tutorial-invasion", name: "PhysiBoSS Cancer Invasion", binary: "invasion_model", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-cell-lines", project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template_BM", project: "template_BM", name: "PhysiBoSS Template", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template", project: "template", name: "PhysiCell Template", binary: "project", extra_run: ""},
{short_name: "rules", project: "rules-sample", name: "PhysiCell Rules", binary: "project", extra_run: ""},
{short_name: "physimess", project: "physimess-sample", name: "PhysiMeSS", binary: "project", extra_run: ""},
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
]
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
update: true
install: mingw-w64-x86_64-binutils mingw-w64-x86_64-gcc mingw-w64-x86_64-headers-git mingw-w64-x86_64-gcc-libs mingw-w64-x86_64-libwinpthread-git mingw-w64-x86_64-lapack mingw-w64-x86_64-openblas mingw-w64-x86_64-libxml2 mingw-w64-x86_64-bzip2 mingw-w64-x86_64-python mingw-w64-x86_64-python-zstandard mingw-w64-x86_64-python-cffi make bison flex mingw-w64-x86_64-ca-certificates
- name: Build ${{ matrix.projects.name }} project
run: |
make ${{ matrix.projects.project }}
make clean
python beta/setup_windows_dep.py
${{ matrix.projects.extra_run }}
make static
- name: Checking binary for ${{ matrix.projects.name }}
run: |
ldd .\\${{ matrix.projects.binary }}.exe
- name: Build ${{ matrix.projects.name }} project archive
run: |
rm -fr config/PhysiCell_settings-backup.xml
tar -zcvf ${{ matrix.projects.short_name }}-win.tar.gz ${{ matrix.projects.binary }}.exe *.dll Makefile main.cpp config/ custom_modules/
- uses: actions/upload-release-asset@v1
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: ${{ matrix.projects.short_name }}-win.tar.gz
asset_path: ${{ github.workspace }}\${{ matrix.projects.short_name }}-win.tar.gz
asset_content_type: application/gzip
macos_step0a:
strategy:
matrix:
projects: [
{short_name: "physiboss-tutorial", project: "physiboss-tutorial", name: "PhysiBoSS tutorial", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-tutorial-invasion", project: "physiboss-tutorial-invasion", name: "PhysiBoSS Cancer Invasion", binary: "invasion_model", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-cell-lines", project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template_BM", project: "template_BM", name: "PhysiBoSS Template", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template", project: "template", name: "PhysiCell Template", binary: "project", extra_run: ""},
{short_name: "rules", project: "rules-sample", name: "PhysiCell Rules", binary: "project", extra_run: ""},
{short_name: "physimess", project: "physimess-sample", name: "PhysiMeSS", binary: "project", extra_run: ""},
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
]
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run : brew install gcc@13
- name: Build ${{ matrix.projects.name }} project
run: |
export MACOSX_DEPLOYMENT_TARGET=12
make ${{ matrix.projects.project }}
make clean
${{ matrix.projects.extra_run }}
make PHYSICELL_CPP=g++-13 static
cp ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macos12
- name: Caching produced project binary
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/${{ matrix.projects.binary }}_macos12
key: ${{ runner.os }}-macos12-${{ github.run_id }}
- name: Look at the generated binary
run: |
otool -L ${{ matrix.projects.binary }}
otool -l ${{ matrix.projects.binary }}
lipo -archs ${{ matrix.projects.binary }}
macos_step0b:
strategy:
matrix:
projects: [
{short_name: "physiboss-tutorial", project: "physiboss-tutorial", name: "PhysiBoSS tutorial", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-tutorial-invasion", project: "physiboss-tutorial-invasion", name: "PhysiBoSS Cancer Invasion", binary: "invasion_model", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-cell-lines", project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template_BM", project: "template_BM", name: "PhysiBoSS Template", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template", project: "template", name: "PhysiCell Template", binary: "project", extra_run: ""},
{short_name: "rules", project: "rules-sample", name: "PhysiCell Rules", binary: "project", extra_run: ""},
{short_name: "physimess", project: "physimess-sample", name: "PhysiMeSS", binary: "project", extra_run: ""},
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run : brew install gcc@13
- name: Build ${{ matrix.projects.name }} project
run: |
export MACOSX_DEPLOYMENT_TARGET=12
make ${{ matrix.projects.project }}
make clean
${{ matrix.projects.extra_run }}
make PHYSICELL_CPP=g++-13 static
cp ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macosm1
- name: Caching produced project binary
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/${{ matrix.projects.binary }}_macosm1
key: ${{ runner.os }}-macosm1-${{ github.run_id }}
- name: Look at the generated binary
run: |
otool -L ${{ matrix.projects.binary }}
otool -l ${{ matrix.projects.binary }}
lipo -archs ${{ matrix.projects.binary }}
macos_step1:
strategy:
matrix:
projects: [
{short_name: "physiboss-tutorial", project: "physiboss-tutorial", name: "PhysiBoSS tutorial", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-tutorial-invasion", project: "physiboss-tutorial-invasion", name: "PhysiBoSS Cancer Invasion", binary: "invasion_model", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "physiboss-cell-lines", project: "physiboss-cell-lines-sample", name: "PhysiBoSS Cell Lines", binary: "PhysiBoSS_Cell_Lines", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template_BM", project: "template_BM", name: "PhysiBoSS Template", binary: "project", extra_run: "make Compile_MaBoSS PHYSICELL_CPP=g++-11"},
{short_name: "template", project: "template", name: "PhysiCell Template", binary: "project", extra_run: ""},
{short_name: "rules", project: "rules-sample", name: "PhysiCell Rules", binary: "project", extra_run: ""},
{short_name: "physimess", project: "physimess-sample", name: "PhysiMeSS", binary: "project", extra_run: ""},
{short_name: "interaction", project: "interaction-sample", name: "PhysiCell Interaction", binary: "interaction_demo", extra_run: ""},
]
runs-on: macos-12
needs: [macos_step0a, macos_step0b]
steps:
- uses: actions/checkout@v4
- name: Caching produced project binary
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/${{ matrix.projects.binary }}_macosm1
key: ${{ runner.os }}-macosm1-${{ github.run_id }}
- name: Caching produced project binary
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/${{ matrix.projects.binary }}_macos12
key: ${{ runner.os }}-macos12-${{ github.run_id }}
- name: Creating universal binary
run: |
lipo -create -output ${{ matrix.projects.binary }} ${{ matrix.projects.binary }}_macos12 ${{ matrix.projects.binary }}_macosm1
- name: Checking universal binary
run: |
lipo -archs ${{ matrix.projects.binary }}
otool -l ${{ matrix.projects.binary }}
otool -L ${{ matrix.projects.binary }}
- name: Build project archive
run: |
make ${{ matrix.projects.project }}
rm -fr config/PhysiCell_settings-backup.xml
tar -zcvf ${{ matrix.projects.short_name }}-macos.tar.gz ${{ matrix.projects.binary }} Makefile main.cpp config/ custom_modules/
- uses: actions/upload-release-asset@v1
if: github.event_name == 'release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: ${{ matrix.projects.short_name }}-macos.tar.gz
asset_path: ${{ github.workspace }}/${{ matrix.projects.short_name }}-macos.tar.gz
asset_content_type: application/gzip