forked from libmapper/libmapper
-
Notifications
You must be signed in to change notification settings - Fork 1
242 lines (235 loc) · 9.73 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
name: C/C++ CI
on: [push, pull_request]
jobs:
Linux:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: install dependencies
run: sudo apt-get install g++-9 autoconf-archive curl zlib1g-dev doxygen
- name: install liblo
run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.32/liblo-0.32.tar.gz && tar -xzf liblo-0.32.tar.gz && cd liblo-0.32 && (./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.32/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@v4
with:
name: artifact_linux
path: |
libmapper*.tar.gz
./wheelhouse/*.whl
MacOS:
runs-on: macOS-13
timeout-minutes: 30
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: install dependencies
run:
brew install autoconf-archive automake pkg-config
&& python3 -m pip install --upgrade setuptools
&& python3 -m pip install packaging
- name: download liblo
run: curl -L -O https://downloads.sourceforge.net/project/liblo/liblo/0.32/liblo-0.32.tar.gz && tar -xzf liblo-0.32.tar.gz
- name: liblo make arm64
run:
cd ./liblo-0.32
&& 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.32
&& 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.32/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.32/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.11.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-message.o libmapper_la-network.o libmapper_la-object.o libmapper_la-path.o libmapper_la-property.o libmapper_la-signal.o libmapper_la-slot.o libmapper_la-table.o libmapper_la-time.o libmapper_la-mpr_set_coerced.o libmapper_la-value.o -L/Users/runner/work/libmapper/libmapper/liblo-0.32/inst/lib /Users/runner/work/libmapper/libmapper/liblo-0.32/inst/lib/liblo.a -lz -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -install_name /Users/runner/work/libmapper/libmapper/inst/lib/libmapper.11.dylib -compatibility_version 10 -current_version 10.0 -Wl,-single_module
&& cd ../..
&& mv ./src/.libs/libmapper.11.dylib ./inst/lib/libmapper.11.dylib.arm64
&& file ./inst/lib/libmapper.11.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.32/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.11.dylib ./inst/lib/libmapper.11.dylib.x86_64
&& file ./inst/lib/libmapper.11.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.11.dylib.arm64
&& file ./libmapper.11.dylib.x86_64
&& lipo -create -output ./libmapper.11.dylib ./libmapper.11.dylib.arm64 ./libmapper.11.dylib.x86_64
&& file ./libmapper.11.dylib
&& rm ./libmapper.11.dylib.*
&& cd ../..
- name: make tests
run: cd test && make tests
- name: python wheels
run:
mv bindings/python/pyproject.toml bindings/python/pyproject.toml.temp
&& cp -v $PWD/inst/lib/libmapper.*.dylib bindings/python/libmapper/libmapper.dylib
&& python3 -m pip install wheel
&& pip3 wheel bindings/python -w ./wheelhouse
&& unzip -t wheelhouse/*.whl
- uses: actions/upload-artifact@v4
with:
name: artifact_macos
path: ./wheelhouse/*.whl
Windows-Latest:
runs-on: windows-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run windows PowerShell build script
shell: pwsh
run: .\windows_build.ps1
- name: Build python wheel
run: .\bindings\python\windows_build_wheel.ps1
- uses: actions/upload-artifact@v4
with:
name: artifact_windows
path: ./bindings/python/dist/*.whl
Linux-check-wheel:
runs-on: ubuntu-latest
needs: Linux
timeout-minutes: 20
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: download artifact
uses: actions/download-artifact@v4
with:
name: artifact_linux
- name: install wheel
run:
ls
&& python3 -m pip install wheelhouse/libmapper*-py3-none-manylinux_2_24_x86_64.whl
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& for i in test testcallbacks testconvergent testgetvalue testinstance testmapfromstr testnumpy testreverse testvector; do echo running ${i}; if ! python3 ${i}.py; then exit 1; fi; done;
MacOS-check-wheel:
runs-on: macOS-13
needs: MacOS
timeout-minutes: 20
env:
SYSTEM_VERSION_COMPAT: 0
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: download artifact
uses: actions/download-artifact@v4
with:
name: artifact_macos
- name: install wheel
run:
ls
&& python3 -m pip install libmapper*-py3-none-macosx_*_universal2.whl
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& for i in test testcallbacks testconvergent testgetvalue testinstance testmapfromstr testnumpy testreverse testvector; do echo running ${i}; if ! python3 ${i}.py; then exit 1; fi; done;
Windows-Latest-check-wheel:
runs-on: windows-latest
needs: Windows-Latest
timeout-minutes: 20
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: download artifact
uses: actions/download-artifact@v4
with:
name: artifact_windows
- name: install wheel
run:
ls
&& python3 -m pip install libmapper-2.4.10-py3-none-win_amd64.whl
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: run python tests
run:
mkdir testpython
&& cd testpython
&& cp ../bindings/python/test*.py .
&& python3 ./test.py
&& python3 ./testcallbacks.py
&& python3 ./testconvergent.py
&& python3 ./testinstance.py
&& python3 ./testmapfromstr.py
&& python3 ./testreverse.py
&& python3 ./testvector.py