-
-
Notifications
You must be signed in to change notification settings - Fork 33
206 lines (182 loc) · 6.14 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
name: ossia-max
on: push
jobs:
build-macos:
runs-on: macos-14
environment: 'Apple Certificate'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/latest-mac-toolchain
- name: build
run: ./tools/build-ossia-max.sh clean silent release
- uses: ./.github/actions/mac-codesign
with:
path-to-sign: "artifacts/ossia"
output-name: "ossia-max-macos.zip"
MAC_CERT_B64: ${{ secrets.MAC_CERT_B64 }}
MAC_CERT_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }}
MAC_ALTOOL_PASSWORD: ${{ secrets.MAC_ALTOOL_PASSWORD }}
- 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@v4
- uses: ./.github/actions/latest-msvc-toolchain
- name : build
shell: cmd
run: |
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/[email protected]
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@v4
- name: Remove Downloaded Package
run: rm -rf "~/Documents/Max 8/Packages/ossia"
- uses: actions/[email protected]
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@v4
- name: Remove Downloaded Package
run: |
$package = "~/Documents/Max 8/Packages/ossia"
if( Test-Path $package ) {
Remove-Item -Recurse $package
}
- uses: actions/[email protected]
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"