forked from musescore/MuseScore
-
-
Notifications
You must be signed in to change notification settings - Fork 5
268 lines (252 loc) · 10.4 KB
/
ci_windows.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
name: CI_Windows
on:
push:
branches:
- 3.x
pull_request:
branches:
- 3.x
schedule:
- cron: '0 4 */1 * *' # At 04:00 on every day-of-month
workflow_dispatch:
inputs:
build_mode:
description: 'Build mode: devel_build, nightly_build, testing_build, stable_build'
required: true
default: 'devel_build'
publish:
description: 'Publish to FTP: on - publish'
required: false
default: 'off'
jobs:
build_x64:
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: "Configure workflow"
shell: bash
run: |
bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }}
BUILD_MODE=$(cat ./build.artifacts/env/build_mode.env)
DO_PUBLISH='false'
if [[ "${{ github.event.inputs.publish }}" == "on" || "$BUILD_MODE" == "nightly_build" ]]; then
DO_PUBLISH='true'
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
DO_CHECKSUM='true'
if [ "$BUILD_MODE" == "devel_build" ]; then DO_CHECKSUM='false'; fi
DO_APPCAST='true'
if [ "$BUILD_MODE" == "devel_build" ]; then DO_APPCAST='false'; fi
DO_BUILD='true'
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV
echo "BUILD_MODE: $BUILD_MODE"
echo "DO_BUILD=$DO_BUILD" >> $GITHUB_ENV
echo "DO_BUILD: $DO_BUILD"
echo "DO_PUBLISH=$DO_PUBLISH" >> $GITHUB_ENV
echo "DO_PUBLISH: $DO_PUBLISH"
echo "DO_CHECKSUM=$DO_CHECKSUM" >> $GITHUB_ENV
echo "DO_CHECKSUM: $DO_CHECKSUM"
echo "DO_APPCAST=$DO_APPCAST" >> $GITHUB_ENV
echo "DO_APPCAST: $DO_APPCAST"
- name: Setup environment
if: env.DO_BUILD == 'true'
run: |
build\ci\windows\setup.bat
- name: Build
if: env.DO_BUILD == 'true'
shell: cmd
run: |
IF ${{ secrets.TELEMETRY_TRACK_ID != 0 }} == true ( SET T_ID=${{ secrets.TELEMETRY_TRACK_ID }} ) ELSE ( SET T_ID="''" )
IF ${{ secrets.SENTRY_SERVER_MU3_KEY != 0 }} == true ( SET C_KEY=${{ secrets.SENTRY_SERVER_MU3_KEY }} ) ELSE ( SET C_KEY="''" )
build\ci\windows\build.bat -n ${{ github.run_id }} --telemetry %T_ID% --sentrykey %C_KEY%
- name: Package
if: env.DO_BUILD == 'true'
shell: cmd
run: |
IF ${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET != 0 }} == true ( SET S_S=${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET }} ) ELSE ( SET S_S="''" )
IF ${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD != 0 }} == true ( SET S_P=${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD }} ) ELSE ( SET S_P="''" )
IF ${{ env.BUILD_MODE }} == stable_build ( SET GUID=${{ secrets.WIN_MSI_STABLE_GUID }} ) ELSE ( SET GUID=${{ secrets.WIN_MSI_TESTING_GUID }} )
build\ci\windows\package.bat --signsecret %S_S% --signpass %S_P% --guid %GUID%
- name: Checksum
if: env.DO_CHECKSUM == 'true'
run: |
bash ./build/ci/tools/checksum.sh
- name: Publish package
if: env.DO_PUBLISH == 'true'
shell: bash
run: |
bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os windows -v 3
- name: AppCast
if: env.DO_APPCAST == 'true'
shell: bash
run: |
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: MuseScore_x64_${{ github.run_id }}
path: build.artifacts\
build_x32:
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Fetch submodules
run: |
git submodule update --init --recursive
- name: "Configure workflow"
shell: bash
run: |
bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }}
BUILD_MODE=$(cat ./build.artifacts/env/build_mode.env)
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV
DO_BUILD='false'
if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
DO_BUILD='true'
fi
DO_BUILD='true'
echo "!! ATTENTION !! Windows x32 build run only for 'testing_build' and 'stable_build', and SKIP for 'pull requests' and nightly"
echo "DO_BUILD=$DO_BUILD" >> $GITHUB_ENV
echo "DO_BUILD: $DO_BUILD"
DO_PUBLISH='false'
if [ "${{ github.event.inputs.publish }}" == "on" ]; then
DO_PUBLISH='true'
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
echo "DO_PUBLISH=$DO_PUBLISH" >> $GITHUB_ENV
echo "DO_PUBLISH: $DO_PUBLISH"
- name: Setup environment
if: env.DO_BUILD == 'true'
run: |
build\ci\windows\setup.bat -b 32
- name: Build
if: env.DO_BUILD == 'true'
shell: cmd
run: |
IF ${{ secrets.TELEMETRY_TRACK_ID != 0 }} == true ( SET T_ID=${{ secrets.TELEMETRY_TRACK_ID }} ) ELSE ( SET T_ID="''" )
IF ${{ secrets.SENTRY_SERVER_MU3_KEY != 0 }} == true ( SET C_KEY=${{ secrets.SENTRY_SERVER_MU3_KEY }} ) ELSE ( SET C_KEY="''" )
build\ci\windows\build.bat -b 32 -n ${{ github.run_id }} --telemetry %T_ID% --sentrykey %C_KEY%
- name: Package
if: env.DO_BUILD == 'true'
shell: cmd
run: |
IF ${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET != 0 }} == true ( SET S_S=${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET }} ) ELSE ( SET S_S="''" )
IF ${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD != 0 }} == true ( SET S_P=${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD }} ) ELSE ( SET S_P="''" )
IF ${{ env.BUILD_MODE }} == stable_build ( SET GUID=${{ secrets.WIN_MSI_STABLE_GUID }} ) ELSE ( SET GUID=${{ secrets.WIN_MSI_TESTING_GUID }} )
build\ci\windows\package.bat -b 32 --signsecret %S_S% --signpass %S_P% --guid %GUID%
- name: Checksum
if: env.DO_BUILD == 'true'
run: |
bash ./build/ci/tools/checksum.sh
- name: Publish package
if: env.DO_PUBLISH == 'true'
shell: bash
run: |
bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os windows -v 3
- name: AppCast
if: env.DO_BUILD == 'true'
shell: bash
run: |
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v3
with:
name: MuseScore_x86_${{ github.run_id }}
path: build.artifacts\
build_portable:
runs-on: windows-2022
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Clone repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Fetch submodules
run: |
git submodule update --init --recursive
- name: "Configure workflow"
shell: bash
run: |
bash ./build/ci/tools/make_build_mode_env.sh -e ${{ github.event_name }} -m ${{ github.event.inputs.build_mode }}
BUILD_MODE=$(cat ./build.artifacts/env/build_mode.env)
echo "BUILD_MODE=$BUILD_MODE" >> $GITHUB_ENV
DO_BUILD='false'
if [[ "$BUILD_MODE" == "testing_build" || "$BUILD_MODE" == "stable_build" ]]; then
DO_BUILD='true'
fi
echo "!! ATTENTION !! Windows portable build run only for 'testing_build' and 'stable_build', and SKIP for 'pull requests' and nightly"
echo "DO_BUILD=$DO_BUILD" >> $GITHUB_ENV
echo "DO_BUILD: $DO_BUILD"
DO_PUBLISH='false'
if [ "${{ github.event.inputs.publish }}" == "on" ]; then
DO_PUBLISH='true'
if [ -z "${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }}" ]; then
echo "warning: not set OSUOSL_SSH_ENCRYPT_SECRET, publish disabled"
DO_PUBLISH='false'
fi
fi
echo "DO_PUBLISH=$DO_PUBLISH" >> $GITHUB_ENV
echo "DO_PUBLISH: $DO_PUBLISH"
- name: Setup environment
if: env.DO_BUILD == 'true'
run: |
build\ci\windows\setup.bat -b 32 --portable ON
- name: Build
if: env.DO_BUILD == 'true'
shell: cmd
run: |
IF ${{ secrets.TELEMETRY_TRACK_ID != 0 }} == true ( SET T_ID=${{ secrets.TELEMETRY_TRACK_ID }} ) ELSE ( SET T_ID="''" )
IF ${{ secrets.SENTRY_SERVER_MU3_KEY != 0 }} == true ( SET C_KEY=${{ secrets.SENTRY_SERVER_MU3_KEY }} ) ELSE ( SET C_KEY="''" )
build\ci\windows\build.bat -b 32 --portable ON -n ${{ github.run_id }} --telemetry %T_ID% --sentrykey %C_KEY%
- name: Package
if: env.DO_BUILD == 'true'
shell: cmd
run: |
IF ${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET != 0 }} == true ( SET S_S=${{ secrets.WIN_SIGN_CERTIFICATE_ENCRYPT_SECRET }} ) ELSE ( SET S_S="''" )
IF ${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD != 0 }} == true ( SET S_P=${{ secrets.WIN_SIGN_CERTIFICATE_PASSWORD }} ) ELSE ( SET S_P="''" )
build\ci\windows\package.bat -b 32 --portable ON --signsecret %S_S% --signpass %S_P%
- name: Checksum
shell: bash
if: env.DO_BUILD == 'true'
run: |
bash ./build/ci/tools/checksum.sh
- name: Publish package
if: env.DO_PUBLISH == 'true'
shell: bash
run: |
bash ./build/ci/tools/osuosl/publish.sh -s ${{ secrets.OSUOSL_SSH_ENCRYPT_SECRET }} --os windows -v 3
- name: AppCast
if: env.DO_BUILD == 'true'
shell: bash
run: |
bash ./build/ci/tools/sparkle_appcast_gen.sh -p windows
- name: Upload artifacts on GitHub
if: env.DO_BUILD == 'true'
uses: actions/upload-artifact@v3
with:
name: MuseScore_Portable_${{ github.run_id }}
path: build.artifacts\