-
-
Notifications
You must be signed in to change notification settings - Fork 20
289 lines (285 loc) · 12.5 KB
/
release.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
on:
create:
ref_type: tag
ref: 'v*'
name: Create release
jobs:
build-release-artifacts:
name: Build artifact
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- artifact: windows-x86_64
os: windows-latest
toolchain-suffix: x86_64-pc-windows-msvc
lib-file-name: helgobox.dll
extension-file-name: reaper_helgobox.dll
target: x86_64-pc-windows-msvc
use-cross: false
profile: release
features: "playtime,egui,licensing"
- artifact: windows-i686
os: windows-latest
toolchain-suffix: i686-pc-windows-msvc
lib-file-name: helgobox.dll
extension-file-name: reaper_helgobox.dll
target: i686-pc-windows-msvc
use-cross: false
profile: release-llvm-out-of-memory-fix
features: "egui"
- artifact: macos-x86_64
os: macos-latest
toolchain-suffix: x86_64-apple-darwin
lib-file-name: libhelgobox.dylib
extension-file-name: libreaper_helgobox.dylib
target: x86_64-apple-darwin
use-cross: false
profile: release
features: "playtime,egui,licensing"
- artifact: macos-aarch64
os: macos-latest
toolchain-suffix: x86_64-apple-darwin
lib-file-name: libhelgobox.dylib
extension-file-name: libreaper_helgobox.dylib
target: aarch64-apple-darwin
use-cross: false
profile: release
features: "playtime,egui,licensing"
- artifact: linux-x86_64
os: ubuntu-20.04
toolchain-suffix: x86_64-unknown-linux-gnu
lib-file-name: libhelgobox.so
extension-file-name: "not-yet-supported"
target: x86_64-unknown-linux-gnu
use-cross: false
strip-cmd: strip
profile: release
features: ""
# - artifact: linux-aarch64
# os: ubuntu-22.04
# toolchain-suffix: x86_64-unknown-linux-gnu
# lib-file-name: libhelgobox.so
# extension-file-name: ""
# target: aarch64-unknown-linux-gnu
# use-cross: true
# strip-cmd: aarch64-linux-gnu-strip
# profile: release
# features: ""
# - artifact: linux-armv7
# os: ubuntu-22.04
# toolchain-suffix: x86_64-unknown-linux-gnu
# lib-file-name: libhelgobox.so
# extension-file-name: ""
# target: armv7-unknown-linux-gnueabihf
# use-cross: true
# strip-cmd: arm-linux-gnueabihf-strip
# profile: release
# features: ""
env:
# This is relevant for macOS builds only (and only if not overridden).
# TODO-high This is temporarily 10.9 (should be 10.7) until https://github.com/rust-lang/cc-rs/issues/902 is fixed
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
# Prepare (all)
- name: Checkout
uses: actions/checkout@v2
- uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.PRIVATE_PLAYTIME_CLIP_ENGINE_DEPLOY_KEY }}
${{ secrets.PRIVATE_HELGOBOSS_LICENSE_PROCESSOR_DEPLOY_KEY }}
- name: Update submodules
run: |
git submodule update --init
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0-${{ matrix.toolchain-suffix }}
target: ${{ matrix.target }}
override: true
# Install OS dependencies (Linux/macOS only)
- name: Install native Linux dependencies
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get update
sudo apt-get install nasm php binutils-arm-linux-gnueabihf binutils-aarch64-linux-gnu libxdo-dev libx11-dev libxcursor-dev libxcb-dri2-0-dev libxcb-icccm4-dev libx11-xcb-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libspeechd-dev libgtk-3-dev
- run: brew install php
if: matrix.os == 'macos-latest'
# Override SDK root and deployment target (macOS aarch64 only)
- name: Set SDKROOT
if: matrix.target == 'aarch64-apple-darwin'
run: echo "SDKROOT=$(xcrun -sdk macosx11.1 --show-sdk-path)" >> $GITHUB_ENV
- name: Set MACOSX_DEPLOYMENT_TARGET
if: matrix.target == 'aarch64-apple-darwin'
run: echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.1 --show-sdk-platform-version)" >> $GITHUB_ENV
# Generate dialogs outside of Docker containers in cross builds because PHP is not available in container.
# TODO-high-performance Update: Actually, now it is ... I added it to Cross.toml. So I guess we can remove this.
- name: cargo test (for generating dialogs with php)
if: matrix.use-cross == true
uses: actions-rs/cargo@v1
env:
RUST_MIN_STACK: 5242880
with:
command: test
args: --features "${{ matrix.features }}"
# Build (all)
- name: Build release
uses: actions-rs/cargo@v1
env:
PLAYTIME_AUTHENTICITY_SIGNING_KEY: "${{ secrets.PLAYTIME_AUTHENTICITY_SIGNING_KEY }}"
PLAYTIME_LICENSE_VERIFYING_KEY: "${{ secrets.PLAYTIME_LICENSE_VERIFYING_KEY }}"
PLAYTIME_PRESET_VERIFYING_KEY: "${{ secrets.PLAYTIME_PRESET_VERIFYING_KEY }}"
with:
command: build
args: --features "${{ matrix.features }}" --profile ${{ matrix.profile }} --target ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}
# Strip debug symbols (Linux and macOS)
# TODO-medium We could replace this with Cargo's recent built-in strip function
- name: Strip debug symbols from Linux binary
if: startsWith(matrix.os, 'ubuntu-')
run: |
cp target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.lib-file-name }} target/${{ matrix.target }}/${{ matrix.profile }}/libhelgobox-debug.so
${{ matrix.strip-cmd }} target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.lib-file-name }}
- name: Strip debug symbols from macOS binary
if: matrix.os == 'macos-latest'
run: |
strip -u -r target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.lib-file-name }}
# Upload
- name: Upload plug-in and extension to artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: |
target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.lib-file-name }}
target/${{ matrix.target }}/${{ matrix.profile }}/${{ matrix.extension-file-name }}
target/${{ matrix.target }}/${{ matrix.profile }}/helgobox.pdb
target/${{ matrix.target }}/${{ matrix.profile }}/deps/libhelgobox.dylib.dSYM/
target/${{ matrix.target }}/${{ matrix.profile }}/libhelgobox-debug.so
create-release:
name: Publish release
needs: build-release-artifacts
runs-on: ubuntu-22.04
steps:
- name: Get tag name
id: get_tag_name
run: echo ::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//}
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.get_tag_name.outputs.TAG_NAME }}
release_name: ${{ steps.get_tag_name.outputs.TAG_NAME }}
draft: true
prerelease: ${{ contains(github.ref, 'pre') }}
- name: Download artifacts from build job
uses: actions/download-artifact@v4
# Upload Windows x86_64 artifacts
- name: Upload windows-x86_64 release artifact 1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows-x86_64/helgobox.dll
asset_name: helgobox-windows-x86_64.dll
asset_content_type: application/octet-stream
- name: Upload windows-x86_64 release artifact 2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows-x86_64/reaper_helgobox.dll
asset_name: reaper_helgobox-windows-x86_64.dll
asset_content_type: application/octet-stream
# Upload Windows i686 artifacts
- name: Upload windows-i686 release artifact 1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows-i686/helgobox.dll
asset_name: helgobox-windows-i686.dll
asset_content_type: application/octet-stream
- name: Upload windows-i686 release artifact 2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./windows-i686/reaper_helgobox.dll
asset_name: reaper_helgobox-windows-i686.dll
asset_content_type: application/octet-stream
# Upload macOS x86_64 artifacts
- name: Upload macos-x86_64 release artifact 1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos-x86_64/libhelgobox.dylib
asset_name: helgobox-macos-x86_64.vst.dylib
asset_content_type: application/octet-stream
- name: Upload macos-x86_64 release artifact 2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos-x86_64/libreaper_helgobox.dylib
asset_name: reaper_helgobox-macos-x86_64.dylib
asset_content_type: application/octet-stream
# Upload macOS aarch64 artifacts
- name: Upload macos-aarch64 release artifact 1
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos-aarch64/libhelgobox.dylib
asset_name: helgobox-macos-aarch64.vst.dylib
asset_content_type: application/octet-stream
- name: Upload macos-aarch64 release artifact 2
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./macos-aarch64/libreaper_helgobox.dylib
asset_name: reaper_helgobox-macos-aarch64.dylib
asset_content_type: application/octet-stream
# Upload Linux x86_64 artifacts
- name: Upload linux-x86_64 release artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./linux-x86_64/libhelgobox.so
asset_name: helgobox-linux-x86_64.so
asset_content_type: application/octet-stream
# Upload Linux aarch64 artifacts
# - name: Upload linux-aarch64 release artifact
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./linux-aarch64/libhelgobox.so
# asset_name: helgobox-linux-aarch64.so
# asset_content_type: application/octet-stream
# Upload Linux armv7 artifacts
# - name: Upload linux-armv7 release artifact
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./linux-armv7/libhelgobox.so
# asset_name: helgobox-linux-armv7.so
# asset_content_type: application/octet-stream