forked from libmapper/libmapper
-
Notifications
You must be signed in to change notification settings - Fork 0
266 lines (257 loc) · 11.2 KB
/
ci.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
name: C/C++ CI
on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: install dependencies
run: sudo apt-get install g++-8 autoconf-archive curl zlib1g-dev
- name: install liblo
run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-tests --disable-tools --disable-examples || (cat config.log; false)) && make install && find inst && cd ..
- name: autogen
run:
pwd
&& mkdir $PWD/inst
&& env NOCONFIGURE=1 am_opt=--copy ./autogen.sh
&& (./configure --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
- name: make
run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
- name: make tests
run: cd test && make tests
- name: make dist
run: make dist
- name: python wheels
run:
pwd && make distclean && bindings/python/build_wheels.py
- uses: actions/upload-artifact@v3
with:
path: |
libmapper*.tar.gz
./wheelhouse/*.whl
MacOS-Latest:
runs-on: macOS-latest
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: install dependencies
run: brew install autoconf-archive automake
- name: download liblo
run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz
- name: liblo make arm64
run:
cd ./liblo-0.31
&& pwd
&& (./configure CFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin -fPIC" CXXFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin" --build=x86_64-apple-darwin19.6.0 --host=aarch64-apple-darwin --enable-static --prefix=$PWD/inst --disable-shared --disable-tests --disable-tools --disable-examples || (cat config.log; false))
&& make install
&& mv ./inst/lib/liblo.a ./inst/lib/liblo.a.arm64
&& cd ..
- name: liblo make x86_64
run:
cd ./liblo-0.31
&& pwd
&& make clean
&& (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-shared --disable-tests --disable-tools --disable-examples CFLAGS=-fPIC || (cat config.log; false))
&& make install
&& mv ./inst/lib/liblo.a ./inst/lib/liblo.a.x86_64
&& cd ..
- name: liblo universal binary
run: cd ./liblo-0.31/inst/lib && lipo -create -output ./liblo.a ./liblo.a.arm64 ./liblo.a.x86_64 && lipo -info ./liblo.a && rm ./liblo.a.* && cd ../../..
- name: libmapper autogen arm64
run:
pwd
&& mkdir $PWD/inst
&& (./autogen.sh CFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin" CXXFLAGS="-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin" --build=x86_64-apple-darwin19.6.0 --host=aarch64-apple-darwin --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
- name: libmapper make arm64 part 1
continue-on-error: true
run:
make install
- name: libmapper make arm64 part 2
run:
cd ./src/.libs
&& clang -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk --target=arm64-apple-darwin -o libmapper.9.dylib libmapper_la-device.o libmapper_la-expression.o libmapper_la-graph.o libmapper_la-link.o libmapper_la-list.o libmapper_la-map.o libmapper_la-network.o libmapper_la-object.o libmapper_la-properties.o libmapper_la-router.o libmapper_la-signal.o libmapper_la-slot.o libmapper_la-table.o libmapper_la-time.o libmapper_la-value.o -L/Users/runner/work/libmapper/libmapper/liblo-0.31/inst/lib /Users/runner/work/libmapper/libmapper/liblo-0.31/inst/lib/liblo.a -lz -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -install_name /Users/runner/work/libmapper/libmapper/inst/lib/libmapper.9.dylib -compatibility_version 10 -current_version 10.0 -Wl,-single_module
&& cd ../..
&& mv ./src/.libs/libmapper.9.dylib ./inst/lib/libmapper.9.dylib.arm64
&& file ./inst/lib/libmapper.9.dylib.arm64
&& mv ./inst/lib/libmapper.a ./inst/lib/libmapper.a.arm64
&& lipo -info ./inst/lib/libmapper.a.arm64
- name: libmapper autogen x86_64
run:
make clean
&& (./autogen.sh --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
- name: libmapper make x86_64
run:
make
&& (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false))
&& make install
&& mv ./inst/lib/libmapper.9.dylib ./inst/lib/libmapper.9.dylib.x86_64
&& file ./inst/lib/libmapper.9.dylib.x86_64
&& mv ./inst/lib/libmapper.a ./inst/lib/libmapper.a.x86_64
&& lipo -info ./inst/lib/libmapper.a.x86_64
- name: libmapper universal binary
run:
pwd
&& find inst
&& cd ./inst/lib
&& lipo -create -output ./libmapper.a ./libmapper.a.arm64 ./libmapper.a.x86_64
&& lipo -info ./libmapper.a
&& rm ./libmapper.a.*
&& file ./libmapper.9.dylib.arm64
&& file ./libmapper.9.dylib.x86_64
&& lipo -create -output ./libmapper.9.dylib ./libmapper.9.dylib.arm64 ./libmapper.9.dylib.x86_64
&& file ./libmapper.9.dylib
&& rm ./libmapper.9.dylib.*
&& cd ../..
- name: make tests
run: cd test && make tests
- name: python wheels
run:
cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
&& pip3 wheel bindings/python -w ./wheelhouse
&& unzip -t wheelhouse/*.whl
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
MacOS-10:
runs-on: macOS-10.15
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: install dependencies
run: brew install autoconf-archive automake
- name: install liblo
run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.31/liblo-0.31.tar.gz && tar -xzf liblo-0.31.tar.gz && cd liblo-0.31 && (./configure --host=$HOST --prefix=$PWD/inst --enable-static --disable-shared --disable-tests --disable-tools --disable-examples CFLAGS=-fPIC || (cat config.log; false)) && make install && find inst && cd ..
- name: autogen
run: pwd && mkdir $PWD/inst && (./autogen.sh --enable-static --prefix=$PWD/inst PKG_CONFIG_PATH=$PWD/liblo-0.31/inst/lib/pkgconfig || (cat config.log; false))
- name: make
run: make && (make check || (for i in src/*.log; do echo === $i ===; cat $i; done; false)) && make install && find inst
- name: make tests
run: cd test && make tests
- name: python wheels
run:
cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
&& pip3 wheel bindings/python -w ./wheelhouse
&& unzip -t wheelhouse/*.whl
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Windows-Latest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Run windows PowerShell build script
shell: pwsh
run: .\windows_build.ps1
- name: Copy dlls to python dir
run: cp -v $PWD/build/Debug/libmapper.dll bindings/python/libmapper/libmapper.dll && cp -v $PWD/build/liblo/liblo-master/cmake/build/Debug/liblo.dll bindings/python/libmapper/liblo.dll && cp -v $PWD/build/zlib/msvc2017_64/lib/zlib/zlib.dll bindings/python/libmapper/zlib.dll
- name: Build python wheel
run: pip install wheel && cd bindings/python && python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
path: ./bindings/python/dist/*.whl
Linux-check-wheel:
runs-on: ubuntu-latest
needs: Linux
steps:
- uses: actions/setup-python@v2
- name: download artifact
uses: actions/download-artifact@v2
- name: install wheel
run:
ls
&& find artifact
&& python3 -m pip install artifact/wheelhouse/libmapper*-py3-none-manylinux_2_24_x86_64.whl
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& for i in test testcallbacks testconvergent testinstance testmapfromstr testreverse testvector; do echo running $i; if ! python ./$i.py; then exit 1; fi; done
MacOS-Latest-check-wheel:
runs-on: macOS-latest
needs: MacOS-Latest
env:
SYSTEM_VERSION_COMPAT: 0
steps:
- uses: actions/setup-python@v2
- name: download artifact
uses: actions/download-artifact@v2
- name: install wheel
run:
ls
&& find artifact
&& python3 -m pip install artifact/libmapper*-py3-none-macosx_11_0_x86_64.whl
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& for i in test testcallbacks testconvergent testinstance testmapfromstr testreverse testvector; do echo running $i; if ! python ./$i.py; then exit 1; fi; done
MacOS-10-check-wheel:
runs-on: macOS-10.15
needs: MacOS-10
steps:
- uses: actions/setup-python@v2
- name: download artifact
uses: actions/download-artifact@v2
- name: install wheel
run:
ls
&& find artifact
&& python3 -m pip install artifact/libmapper*-py3-none-macosx_10_15_x86_64.whl
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& for i in test testcallbacks testconvergent testinstance testmapfromstr testreverse testvector; do echo running $i; if ! python ./$i.py; then exit 1; fi; done
Windows-Latest-check-wheel:
runs-on: windows-latest
needs: Windows-Latest
steps:
- uses: actions/setup-python@v2
- name: download artifact
uses: actions/download-artifact@v2
- name: install wheel
run:
ls
&& cd artifact
&& ls
&& python3 -m pip install libmapper-2.1-py3-none-win_amd64.whl
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& python ./test.py
&& python ./testcallbacks.py
&& python ./testconvergent.py
&& python ./testinstance.py
&& python ./testmapfromstr.py
&& python ./testreverse.py
&& python ./testvector.py