-
Notifications
You must be signed in to change notification settings - Fork 1
253 lines (211 loc) · 7.62 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
name: CI
on:
push:
branches:
- develop
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
env:
VYBE_DEBUG: true
jobs:
build-windows:
runs-on: windows-latest
timeout-minutes: 30
strategy:
fail-fast: true
env:
VYBE_VERSION_SUFFIX: win-x64
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0 # fetch the whole repo history
- uses: ilammy/msvc-dev-cmd@v1
- name: Populate submodules
run: |
git submodule update --init --recursive
- uses: mlugg/setup-zig@v1
- name: Get CMake
uses: lukka/[email protected]
- name: Configure win-x64
working-directory: JoltPhysicsSharp
run: |
cmake -S "." -B "build_win_64" -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE:String=Distribution
- name: Build win-x64
working-directory: JoltPhysicsSharp
run: |
cmake --build build_win_64 --config Distribution
bash -c "cp build_win_64/bin/Distribution/joltc.dll ../resources/vybe/native/joltc_zig.dll"
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '22'
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: latest
- name: install tools
run: |
curl -o jextract.tar.gz https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_windows-x64_bin.tar.gz
tar -xvzf jextract.tar.gz
- name: install bake
run: |
git clone https://github.com/SanderMertens/bake
cd bake\build-Windows
nmake
cd ..
./bake setup --local
# - name: Add scsynth
# shell: powershell
# run: |
# Add-Content $env:GITHUB_PATH "${{github.workspace}}\native\windows\x64"
- name: Add scsynth
shell: powershell
run: |
Add-Content $env:GITHUB_PATH "${{github.workspace}}\sonic-pi\prebuilt\windows\x64"
- name: API Tests Windows - Install Scream Audio Device
shell: powershell
run: |
Start-Service audio*
Invoke-WebRequest https://github.com/duncanthrax/scream/releases/download/3.6/Scream3.6.zip -OutFile C:\Scream3.6.zip
Expand-7ZipArchive -Path C:\Scream3.6.zip -DestinationPath C:\Scream
$cert = (Get-AuthenticodeSignature C:\Scream\Install\driver\Scream.sys).SignerCertificate
$store = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher", "LocalMachine")
$store.Open("ReadWrite")
$store.Add($cert)
$store.Close()
cd C:\Scream\Install\driver
C:\Scream\Install\helpers\devcon install Scream.inf *Scream
- name: compile and jextract native modules
run: |
bash -c "bin/ci_windows.sh"
clojure -T:build compile-app
dir resources/vybe/native
- name: run tests
run: |
clojure -M:dev:win -m vybe.native.loader && clojure -M:test:win
- name: build
run: |
bash -c "rm -rf resources/vybe/native/macos"
bash -c "rm -rf resources/vybe/native/windows"
clojure -T:build jar
bash -c "bin/ci_windows_build.sh"
- name: deploy
run: |
mvn deploy
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
DEPLOY_USERNAME: ${{ secrets.DEPLOY_USERNAME }}
build-linux:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: true
env:
VYBE_VERSION_SUFFIX: linux-x64
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0 # fetch the whole repo history
- uses: mlugg/setup-zig@v1
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '22'
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: latest
- name: install tools
run: |
wget -O jextract.tar.gz https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_linux-x64_bin.tar.gz
tar -xvzf jextract.tar.gz
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
- name: install bake
run: |
git clone https://github.com/SanderMertens/bake
make -C bake/build-$(uname)
bake/bake setup
- name: Sonic PI dependency
run: |
sudo apt-get install -y pulseaudio dbus-x11 libssl-dev supercollider-server sc3-plugins-server alsa-base alsa-utils jackd2 libjack-jackd2-dev libjack-jackd2-0 libasound2-dev librtmidi-dev pulseaudio-module-jack
- name: compile and jextract native modules
run: |
bin/ci.sh
ls resources/vybe/native
- name: run tests
run: |
jackd -rd dummy &
bin/kaocha
- name: build
run: |
rm -rf resources/vybe/native/macos
rm -rf resources/vybe/native/windows
bin/ci_build.sh
ls -lh target
- name: deploy
run: |
mvn deploy
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
DEPLOY_USERNAME: ${{ secrets.DEPLOY_USERNAME }}
build-macos:
runs-on: macos-14
timeout-minutes: 30
strategy:
fail-fast: true
env:
VYBE_VERSION_SUFFIX: macos-universal
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # checkout the correct branch name
fetch-depth: 0 # fetch the whole repo history
- uses: mlugg/setup-zig@v1
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '22'
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
cli: latest
- name: install tools
run: |
wget -O jextract.tar.gz https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_macos-aarch64_bin.tar.gz
tar -xvzf jextract.tar.gz
- name: install bake
run: |
git clone https://github.com/SanderMertens/bake
make -C bake/build-$(uname)
bake/bake setup
- name: Grant microphone access for macos
run: |
# Temporary fix to fix microphone permission issues for macos when playing sound.
# From https://github.com/actions/runner-images/issues/9330
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
- name: compile and jextract native modules
run: |
bin/ci.sh
ls resources/vybe/native
- name: run tests
run: |
bin/kaocha
- name: build
run: |
rm -rf resources/vybe/native/macos
rm -rf resources/vybe/native/windows
bin/ci_build.sh
ls -lh target
- name: deploy
run: |
echo $DEPLOY_USERNAME
mvn deploy
env:
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
DEPLOY_USERNAME: ${{ secrets.DEPLOY_USERNAME }}