-
Notifications
You must be signed in to change notification settings - Fork 184
383 lines (315 loc) · 12.6 KB
/
csound_builds.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
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
name: csound_builds
env:
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
CSOUND_VERSION: 7.0.0
on:
push:
branches:
- master
- develop
pull_request:
branches:
- develop
jobs:
linux_build:
name: Linux/Ubuntu build (apt-get)
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install cmake libsndfile1-dev libasound2-dev libjack-dev portaudio19-dev libportmidi-dev libpulse-dev swig liblua5.1-0-dev default-jdk libfltk1.1-dev libfluidsynth-dev liblo-dev fluid ladspa-sdk libpng-dev dssi-dev libstk0-dev libgmm++-dev bison flex libportsmf-dev libeigen3-dev libcunit1-dev gettext
- name: Configure build
run: |
mkdir build
cd build
cmake .. -DUSE_MP3=0
- name: Build Csound
run: |
cd build
make
- name: Run tests
run: |
cd build
make test csdtests
linux_build_vcpkg:
name: Linux/Ubuntu build (vcpkg)
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- uses: lukka/get-cmake@v3.29.0
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Bootstrap VCPKG
run: ./vcpkg/bootstrap-vcpkg.sh
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install cmake libjack-dev libpulse-dev ladspa-sdk dssi-dev autoconf libtool
- name: Configure Build
run: cmake -B build -S . -DUSE_VCPKG=1 -DCUSTOM_CMAKE="./platform/linux/custom.cmake"
- name: Build Csound
run: cmake --build build --config Release
- name: Run integration and unit tests
run: cmake --build build --target test csdtests
iOS_build:
name: iOS build
runs-on: macos-latest
steps:
- name: update bison
run: brew install bison && echo 'export PATH="/usr/local/opt/bison/bin:$PATH"' >> /Users/runner/.bash_profile
- name: Checkout Source Code
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Build libsndfile xcframework
run: cd iOS && chmod +x build_libsndfile.sh && ./build_libsndfile.sh
- name: Build Csound iOS xcframework
run: cd iOS && ./build.sh
- name: Create package zip
run: cd iOS && ./release.sh
- uses: actions/upload-artifact@v4
with:
name: iOS-builds
path: iOS/csound-iOS-7.0.0 # or path/to/artifact
macos_build_brew:
name: MacOS build (brew)
runs-on: macos-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install dependencies
run: |
brew install --only-dependencies csound
brew install bison flex asio jack googletest
- name: Configure build
run: cmake -B build -DCUSTOM_CMAKE="./platform/osx/custom-osx.cmake"
- name: Build Csound
run: cmake --build build --config Release
- name: Run integration and unit tests
run: cmake --build build --target test csdtests
macos_build_vcpkg:
name: MacOS build (vcpkg)
runs-on: macos-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- uses: lukka/get-cmake@v3.29.0
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Bootstrap VCPKG
run: ./vcpkg/bootstrap-vcpkg.sh
- name: Install dependencies
run: brew install bison flex asio jack
- name: Configure build
run: cmake -B build -S . -DUSE_VCPKG=1 -DCUSTOM_CMAKE="./platform/osx/custom-osx.cmake"
- name: Build Csound
run: cmake --build build --config Release
- name: Run integration and unit tests
run: cmake --build build --target test csdtests
macos_build_osxcross:
name: MacOS build (osxcross/vcpkg)
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- uses: lukka/get-cmake@v3.29.0
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Bootstrap VCPKG
run: ./vcpkg/bootstrap-vcpkg.sh
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install build-essential liblzma-dev libxml2-dev libz-dev libbz2-dev cpio ninja-build
- name: Download osxcross
run: |
curl -L "https://drive.usercontent.google.com/download?id=1TKmFGbKE_F4ZF9f6m5VxuZ7yEHbDzQy5&confirm=xxx" | tar xvz
- name: Configure Build
run: |
$(eval /home/runner/work/csound/csound/osxcross/tools/osxcross_conf.sh)
for ARCH in x86_64 arm64; do
cmake -B build/$ARCH -S . -DUSE_VCPKG=1 -DCUSTOM_CMAKE=./platform/osxcross/custom-osx.cmake \
-DCMAKE_SYSTEM_NAME=Darwin \
-DOSXCROSS_TARGET_DIR=${OSXCROSS_TARGET_DIR} \
-DOSXCROSS_SDK=${OSXCROSS_SDK} \
-DOSXCROSS_TARGET=${OSXCROSS_TARGET} \
-DCMAKE_OSX_ARCHITECTURES=${ARCH}
done
- name: Build Csound
run: |
$(eval /home/runner/work/csound/csound/osxcross/tools/osxcross_conf.sh)
for ARCH in x86_64 arm64; do
cmake --build build/$ARCH --config Release
done
windows_build:
name: Windows build
runs-on: windows-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- uses: lukka/get-cmake@v3.29.0
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install system dependencies
run: |
choco install -y winflexbison3 innosetup
- name: Bootstrap VCPKG
run: .\vcpkg\bootstrap-vcpkg.bat
- name: Configure build
run: cmake -B build -S . -DUSE_VCPKG=1 -DCUSTOM_CMAKE="./platform/windows/Custom-vs.cmake"
- name: Build Csound
run: cmake --build build --config Release
- name: Run tests
run: cmake --build build --target csdtests
- name: Run unit test framework
run: cmake --build build --target RUN_TESTS --config Release
- name: Acquire Csound manual
shell: powershell
run: |
Invoke-WebRequest -Uri "https://github.com/csound/manual/releases/download/6.18.0/Csound6.18.0_manual_html.zip" -OutFile "./manual.zip"
7z x manual.zip
- name: Build installer
shell: powershell
run: |
$Env:RedistVersion=Get-Content "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\Microsoft.VCRedistVersion.default.txt"
$Env:VCREDIST_CRT_DIR="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\${Env:RedistVersion}\x64\Microsoft.VC143.CRT"
$Env:VCREDIST_CXXAMP_DIR="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\${Env:RedistVersion}\x64\Microsoft.VC143.CXXAMP"
$Env:VCREDIST_OPENMP_DIR="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\${Env:RedistVersion}\x64\Microsoft.VC143.OpenMP"
iscc /o. installer\\windows\\csound6_x64_github.iss
- name: Upload installer
uses: actions/upload-artifact@v2
with:
name: Csound_x64-${{env.CSOUND_VERSION}}.${{github.run_number}}-windows-x64-installer
path: ./csound-windows_x86_64-*.exe
if-no-files-found: error
- name: Upload zip
uses: actions/upload-artifact@v2
with:
name: csound-${{env.CSOUND_VERSION}}-${{github.run_number}}-windows-x64-binaries
path: |
./build/Release/*.exe
./build/Release/*.dll
./build/Release/*.pyd
./build/Release/csound64.lib
./build/*.jar
./build/*.py
./include/
if-no-files-found: error
windows_build_mingw:
name: Windows build (mingw/vcpkg)
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- uses: lukka/get-cmake@v3.29.0
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Bootstrap VCPKG
run: ./vcpkg/bootstrap-vcpkg.sh
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install mingw-w64-x86-64-dev gcc-mingw-w64 g++-mingw-w64 mingw-w64-tools wine
- name: Use posix mingw
run: |
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
- name: Configure Build
run: cmake -B build -S . -DUSE_VCPKG=1 -DCUSTOM_CMAKE="./platform/mingw64-linux/Custom.cmake" -DCMAKE_SYSTEM_NAME=MinGW
- name: Build Csound
run: cmake --build build --config Release
- name: Run integration and unit tests
run: cmake --build build --target test csdtests
wasm_build:
name: Wasm build (emscripten/vcpkg)
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Export GitHub Actions cache environment variables
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Bootstrap VCPKG
run: ./vcpkg/bootstrap-vcpkg.sh
- name: Install dependencies
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install 3.1.39
./emsdk activate 3.1.39
- name: Configure Build
run: |
source /home/runner/work/csound/csound/emsdk/emsdk_env.sh
cmake -B build -S . -DUSE_VCPKG=1 -DCUSTOM_CMAKE="./platform/wasm/Custom-wasm.cmake" -DCMAKE_SYSTEM_NAME=Emscripten -DEMSDK=$EMSDK -DEMSDK_NODE=$EMSDK_NODE
- name: Build Csound
run: cmake --build build --config Release
- name: Run integration and unit tests
run: cmake --build build --target test csdtests
#android_build:
# name: Android build
# runs-on: ubuntu-latest
# steps:
# - name: run the Docker image
# run: docker run --name csound_test_run -i sjamble/csound_android
# - name: copying build out of container
# run: docker cp csound_test_run:/csound/Android/csound-android-6.18.0.zip .
# - uses: actions/upload-artifact@v2
# with:
# name: csound-android-6.18.0.zip
# path: .