-
-
Notifications
You must be signed in to change notification settings - Fork 34
249 lines (221 loc) · 7.62 KB
/
ossia-max.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
name: ossia-max
on: push
jobs:
build-macos:
runs-on: macos-latest
environment: 'Apple Certificate'
steps:
- uses: actions/checkout@v2
- name: build
run: ./tools/build-ossia-max.sh clean silent release
- name: Code Signing
shell: bash
env:
MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }}
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }}
run: |
# Setup codesigning
# Thanks https://www.update.rocks/blog/osx-signing-with-travis/
(
set +x
KEY_CHAIN=build.keychain
echo "$MAC_CERT_B64" | base64 --decode > ossia-cert.p12
security create-keychain -p azure $KEY_CHAIN
security default-keychain -s $KEY_CHAIN
security unlock-keychain -p azure $KEY_CHAIN
security import ossia-cert.p12 -k $KEY_CHAIN -P "$MAC_CERT_PASSWORD" -T /usr/bin/codesign;
security set-key-partition-list -S apple-tool:,apple: -s -k azure $KEY_CHAIN
rm -rf *.p12
)
security unlock-keychain -p azure build.keychain
echo "Checking codesigning"
find . -name libossia-max.dylib
(
cd artifacts
echo "===== Content of artifacts"
ls
echo "===== Content of artifacts/ossia/support"
ls ossia/support
echo "===== Content of artifacts/ossia/externals"
ls ossia/externals
codesign --force --timestamp --sign "ossia.io" ossia/support/libossia-max.dylib
for mxo in ossia/externals/*.mxo;
do
codesign --force --timestamp --sign "ossia.io" $mxo
done
ditto -c -k --sequesterRsrc --keepParent ossia ossia-max.zip
xcrun altool \
--notarize-app \
-t osx \
-f "ossia-max.zip" \
--primary-bundle-id "io.ossia.ossia-max" \
-u [email protected] -p "@env:MAC_ALTOOL_PASSWORD"
rm ossia-max.zip
)
- name: Archive Max Package
uses: actions/upload-artifact@v2
with:
name: ossia-max
path: artifacts/ossia
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs
path: "*.log"
build-windows:
runs-on: windows-latest
env:
APPVEYOR_BUILD_TYPE: max
configuration: Release
steps:
- uses: actions/checkout@v2
- name: install deps
run: cinst -y ninja
- name : build
shell: cmd
run: |
call ci\msvc.bat
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DOSSIA_MAX_ONLY=1 -DCMAKE_SYSTEM_VERSION=7 -DOSSIA_CI=1 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build
- name: Archive Max Package
uses: actions/upload-artifact@v2
with:
name: ossia-max
path: build/install/ossia-max-package/ossia
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs
path: "*.log"
upload_release:
runs-on: ubuntu-latest
needs: [ build-macos, build-windows ]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
with:
name: ossia-max
path: ossia
- name: Rezip
shell: bash
run: |
ls
SHORT=${GITHUB_REF:11} # remove the 'refs/tags/' prefix
SLUG=${SHORT//\//_} # replace '/' with '_'
zip -r ossia-max-${SLUG}.zip ossia
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ossia-max*.zip
unit-tests-macos:
runs-on: [ self-hosted, macOS ]
needs: [ build-macos ]
if: github.repository == 'ossia/libossia'
steps:
- uses: actions/checkout@v2
- name: Remove Downloaded Package
run: rm -rf "~/Documents/Max 8/Packages/ossia"
- uses: actions/download-artifact@v2
with:
name: ossia-max
path: "~/Documents/Max 8/Packages/ossia-new"
- name: Fix Signature
run: ditto "${HOME}/Documents/Max 8/Packages/ossia-new" "${HOME}/Documents/Max 8/Packages/ossia"
- name: Install Max
shell: bash
run: |
if [ ! -d "/Applications/Max.app" ]; then
wget -q https://akiaj5esl75o5wbdcv2a-maxmspjitter.s3.amazonaws.com/Max822_220208.dmg
hdiutil mount Max822_220208.dmg
mkdir -p /Applications
cp -R /Volumes/Max822/Max.app /Applications/Max.app
# disable first time dialog
xattr -r -d com.apple.quarantine /Applications/Max.app
fi
find "${HOME}/Documents/Max 8/Packages/ossia/" -name "*.mxo" -exec xattr -r -d com.apple.quarantine {} +
find "${HOME}/Documents/Max 8/Packages/ossia/" -name "*.dylib" -exec xattr -r -d com.apple.quarantine {} +
- name: Install node-js
run: |
brew install node
- name: Run Tests
run: |
cd src/ossia-max/unit-test
npm install
node logger-server.js
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test-result
path: "src/ossia-max/unit-test/*.csv"
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs
path: |
"*.log"
"src/ossia-max/unit-test/*.log"
unit-tests-windows:
runs-on: [ self-hosted, Windows ]
if: github.repository == 'ossia/libossia'
needs: [ build-windows ]
steps:
- uses: actions/checkout@v2
- name: Remove Downloaded Package
run: |
$package = "~/Documents/Max 8/Packages/ossia"
if( Test-Path $package ) {
Remove-Item -Recurse $package
}
- uses: actions/download-artifact@v2
with:
name: ossia-max
path: "~/Documents/Max 8/Packages/ossia"
- name: Install Max
run: |
if(-not(Test-path "C:/Program Files/Cycling '74/Max 8/Max.exe" -PathType leaf))
{
Invoke-WebRequest -Uri https://akiaj5esl75o5wbdcv2a-maxmspjitter.s3.amazonaws.com/Max822_220208.zip -OutFile Max822_220208.zip
Expand-Archive -F -LiteralPath Max822_220208.zip -DestinationPath .
$file = Get-Childitem . | where {$_.extension -eq ".msi"}
$DataStamp = get-date -Format yyyyMMddTHHmmss
$logFile = '{0}-{1}.log' -f $file.fullname,$DataStamp
$MSIArguments = @(
"/i"
('"{0}"' -f $file.fullname)
"/qn"
"/norestart"
"/L*v"
$logFile
)
Start-Process "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow
}
- name: Install node-js
run: |
choco install -y nodejs.install
- name: Run Tests
run: |
cd src/ossia-max/unit-test
npm install
# Turn off firewall
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
node logger-server.js
- name: Upload Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test-result
path: "src/ossia-max/unit-test/*.csv"
- name: Upload logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: logs
path: |
"*.log"
"src/ossia-max/unit-test/*.log"