-
Notifications
You must be signed in to change notification settings - Fork 2
211 lines (184 loc) · 8.47 KB
/
all.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
env:
CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM: ${{ secrets.CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM }}
MACOS_CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE_BASE64 }}
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
NOTARIZATION_TEAM_ID: ${{ secrets.NOTARIZATION_TEAM_ID }}
NOTARIZATION_USERNAME: ${{ secrets.NOTARIZATION_USERNAME }}
NOTARIZATION_PASSWORD: ${{ secrets.NOTARIZATION_PASSWORD }}
name: Compile
on:
pull_request: {}
# push:
# branches:
# - main
push:
tags:
- '*'
jobs:
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- { name: "win64", os: "windows-2022", python-version: "3.9", python-major: "39"}
- { name: "win64", os: "windows-2022", python-version: "3.11", python-major: "311"}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Get CMake
uses: lukka/get-cmake@latest
- name: Build TD-Faust
shell: cmd
run: |
python build_tdfaust.py --pythonver=${{ matrix.python-version}}
- name: Build Reverb operator
shell: cmd
run: |
set PATH=%CD%/thirdparty/libfaust/win64/Release/bin;%PATH%
python faust2td.py --dsp reverb.dsp --type "Reverb" --label "Reverb" --icon "Rev" --author "David Braun" --email "github.com/DBraun" --drop-prefix
- name: Make distribution
run: |
Remove-Item -Recurse -Force "Plugins/faustlibraries/.git"
mkdir TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
move ${{ github.workspace }}/Plugins/TD-Faust.dll TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
move ${{ github.workspace }}/Plugins/Reverb.dll TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
move ${{ github.workspace }}/Plugins/sndfile.dll TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
cp -v -r ${{ github.workspace }}/Plugins/faustlibraries TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
7z a TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}.zip ./TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}/* -r
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
path: TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}.zip
if-no-files-found: error
build-macos:
strategy:
fail-fast: false
matrix:
include:
- name: macos-x86_64
arch: x86_64
os: macos-12
python-version: "3.11"
python-major: "311"
- name: macos-arm64
arch: arm64
os: macos-12
python-version: "3.11"
python-major: "311"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Certificate
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
run: |
# create variables
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
echo -n "$MACOS_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
# create temporary keychain
security create-keychain -p "$MACOS_CERTIFICATE_PASSWORD" $KEYCHAIN_PATH
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
security unlock-keychain -p "$MACOS_CERTIFICATE_PASSWORD" $KEYCHAIN_PATH
# import certificate to keychain
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
security set-key-partition-list -S apple-tool:,apple: -k "$MACOS_CERTIFICATE_PASSWORD" $KEYCHAIN_PATH
echo "list-keychain:\n"
security list-keychain -d user -s $KEYCHAIN_PATH
echo "find-identity:\n"
security find-identity -v
echo "find-identity codesigning:\n"
security find-identity -p codesigning -v
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Brew install requirements (arm64)
if: ${{ endsWith( matrix.name, 'macos-arm64') }}
run: |
brew update
PACKAGES=(flac libogg libtool libvorbis opus mpg123 lame)
DEPS=($(brew deps --union --topological $(echo $PACKAGES) | tr '\n' ' '))
PACKAGES=("${DEPS[@]}" "${PACKAGES[@]}")
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALL_UPGRADE=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
for PACKAGE in "${PACKAGES[@]}"
do
echo "Fetching bottle: $PACKAGE"
response=$(brew fetch --bottle-tag=arm64_monterey $PACKAGE 2>&1)
package_path=$(echo $response | sed -n 's/.*\:\ \(.*\.tar\.gz\).*/\1/p')
package_path=$(echo "$package_path" | xargs)
echo "Package Path: $package_path"
brew reinstall --verbose --force-bottle "$package_path" || true
done
brew uninstall --ignore-dependencies curl git || true
- name: Install dependencies macOS
if: ${{ endsWith( matrix.name, 'macos-x86_64') }}
run: |
brew install autoconf autogen automake flac libogg libtool libvorbis opus mpg123 pkg-config
- name: Build Everything
run: |
export PATH=$pythonLocation:$PATH
python build_tdfaust.py --pythonver=3.11 --arch=${{matrix.arch}}
codesign --force --deep --timestamp --verify --verbose=2 --options=runtime --sign "Developer ID Application: David Braun (${{secrets.CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM}})" Plugins/TD-Faust.plugin
codesign --verify --deep --strict --verbose=2 Plugins/TD-Faust.plugin
- name: Build Reverb operator
run: |
export PATH=$PWD/thirdparty/libfaust/darwin-x64/Release/bin:$PATH
python faust2td.py --dsp reverb.dsp --type "Reverb" --label "Reverb" --icon "Rev" --author "David Braun" --email "github.com/DBraun" --drop-prefix --arch=${{matrix.arch}}
codesign --force --deep --timestamp --verify --verbose=2 --options=runtime --sign "Developer ID Application: David Braun (${{secrets.CMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM}})" Plugins/Reverb.plugin
codesign --verify --deep --strict --verbose=2 Plugins/Reverb.plugin
- name: Make distribution
run: |
rm -rf Plugins/faustlibraries
zip -r Plugins.zip Plugins
- name: Notarize
run: |
xcrun notarytool submit "Plugins.zip" \
--team-id "$NOTARIZATION_TEAM_ID" \
--apple-id "$NOTARIZATION_USERNAME" \
--password "$NOTARIZATION_PASSWORD" \
--wait
- name: Staple
# While you can notarize a ZIP archive, you can’t staple to it directly.
# Instead, run stapler against each item that you added to the archive.
# Then create a new ZIP file containing the stapled items for distribution.
# Although tickets are created for standalone binaries, it’s not currently possible to staple tickets to them.
run: |
xcrun stapler staple Plugins/TD-Faust.plugin
xcrun stapler staple Plugins/Reverb.plugin
- name: Make stapled distribution
run: |
zip -r TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}.zip Plugins
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}
path: TD-Faust-${{ matrix.name }}-Python${{ matrix.python-major }}.zip
if-no-files-found: error
create-release:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build-windows, build-macos]
runs-on: ubuntu-latest
name: "Create Release on GitHub"
steps:
- uses: actions/download-artifact@v4
with:
path: "dist"
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: true