1
1
name : Build
2
2
3
3
on :
4
- workflow_dispatch :
5
- inputs :
6
- release_run :
7
- type : boolean
8
- description : Do a release of this build
9
- default : false
10
4
pull_request :
11
5
push :
12
6
branches : ["main", "release/*", "project/*"]
13
7
tags : ["Second_Life*"]
14
8
15
9
jobs :
16
- # The whole point of the setvar job is that we want to set a variable once
17
- # that will be consumed by multiple subsequent jobs. We tried setting it in
18
- # the global env, but a job.env can't directly reference the global env
19
- # context.
20
- setvar :
10
+ # The whole point of the setup job is that we want to set variables once
11
+ # that will be consumed by multiple subsequent jobs.
12
+ setup :
21
13
runs-on : ubuntu-latest
22
14
outputs :
23
15
release_run : ${{ steps.setvar.outputs.release_run }}
16
+ configurations : ${{ steps.setvar.outputs.configurations }}
17
+ bugsplat_db : ${{ steps.setvar.outputs.bugsplat_db }}
24
18
env :
25
19
# Build with a tag like "Second_Life#abcdef0" to generate a release page
26
20
# (used for builds we are planning to deploy).
27
21
# When you want to use a string variable as a workflow YAML boolean, it's
28
22
# important to ensure it's the empty string when false. If you omit || '',
29
23
# its value when false is "false", which is interpreted as true.
30
24
RELEASE_RUN : ${{ (github.event.inputs.release_run || github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')) && 'Y' || '' }}
25
+ FROM_FORK : ${{ github.event.pull_request.head.repo.fork }}
31
26
steps :
32
- - name : Set Variable
27
+ - name : Set Variables
33
28
id : setvar
34
29
shell : bash
35
30
run : |
36
31
echo "release_run=$RELEASE_RUN" >> "$GITHUB_OUTPUT"
37
32
33
+ if [[ "$FROM_FORK" == "true" ]]; then
34
+ # PR from fork; don't build with Bugsplat, proprietary libs
35
+ echo 'configurations=["ReleaseOS"]' >> $GITHUB_OUTPUT
36
+ echo "bugsplat_db=" >> $GITHUB_OUTPUT
37
+ else
38
+ echo 'configurations=["Release"]' >> $GITHUB_OUTPUT
39
+ echo "bugsplat_db=SecondLife_Viewer_2018" >> $GITHUB_OUTPUT
40
+ fi
38
41
build :
39
- needs : setvar
42
+ needs : setup
40
43
strategy :
41
44
matrix :
42
45
runner : [windows-large, macos-12-xl]
43
- configuration : [Release]
44
- Linden : [true]
45
- include :
46
- - runner : macos-12-xl
47
- developer_dir : " /Applications/Xcode_14.0.1.app/Contents/Developer"
48
- - runner : windows-large
49
- configuration : ReleaseOS
50
- Linden : false
46
+ configuration : ${{ fromJSON(needs.setup.outputs.configurations) }}
51
47
runs-on : ${{ matrix.runner }}
52
48
outputs :
53
49
viewer_channel : ${{ steps.build.outputs.viewer_channel }}
54
50
viewer_version : ${{ steps.build.outputs.viewer_version }}
55
51
viewer_branch : ${{ steps.which-branch.outputs.branch }}
56
52
relnotes : ${{ steps.which-branch.outputs.relnotes }}
57
- imagename : ${{ steps.build.outputs.imagename }}
53
+ imagename : ${{ steps.build.outputs.imagename }}
54
+ configuration : ${{ matrix.configuration }}
58
55
env :
59
56
AUTOBUILD_ADDRSIZE : 64
60
57
AUTOBUILD_BUILD_ID : ${{ github.run_id }}
67
64
# autobuild-package.xml.
68
65
AUTOBUILD_VCS_INFO : " true"
69
66
AUTOBUILD_VSVER : " 170"
70
- DEVELOPER_DIR : ${{ matrix.developer_dir }}
67
+ DEVELOPER_DIR : " /Applications/Xcode_14.0.1.app/Contents/Developer "
71
68
# Ensure that Linden viewer builds engage Bugsplat.
72
- BUGSPLAT_DB : ${{ matrix.Linden && 'SecondLife_Viewer_2018' || '' }}
73
- # Run BUILD steps for Release configuration.
74
- # Run BUILD steps for ReleaseOS configuration only for release runs.
75
- BUILD : ${{ (matrix.Linden || needs.setvar.outputs.release_run) && 'Y' || '' }}
69
+ BUGSPLAT_DB : ${{ needs.setup.outputs.bugsplat_db }}
76
70
build_coverity : false
77
71
build_log_dir : ${{ github.workspace }}/.logs
78
72
build_viewer : true
@@ -91,39 +85,33 @@ jobs:
91
85
variants : ${{ matrix.configuration }}
92
86
steps :
93
87
- name : Checkout code
94
- if : env.BUILD
95
88
uses : actions/checkout@v4
96
89
with :
97
90
ref : ${{ github.event.pull_request.head.sha || github.sha }}
98
91
99
92
- name : Setup python
100
- if : env.BUILD
101
93
uses : actions/setup-python@v5
102
94
with :
103
95
python-version : " 3.11"
104
96
105
97
- name : Checkout build variables
106
- if : env.BUILD
107
98
uses : actions/checkout@v4
108
99
with :
109
100
repository : secondlife/build-variables
110
101
ref : master
111
102
path : .build-variables
112
103
113
104
- name : Checkout master-message-template
114
- if : env.BUILD
115
105
uses : actions/checkout@v4
116
106
with :
117
107
repository : secondlife/master-message-template
118
108
path : .master-message-template
119
109
120
110
- name : Install autobuild and python dependencies
121
- if : env.BUILD
122
111
run : pip3 install autobuild llsd
123
112
124
113
- name : Cache autobuild packages
125
114
id : cache-installables
126
- if : env.BUILD
127
115
uses : actions/cache@v4
128
116
with :
129
117
path : .autobuild-installables
@@ -132,20 +120,14 @@ jobs:
132
120
${{ runner.os }}-64-${{ matrix.configuration }}-
133
121
${{ runner.os }}-64-
134
122
135
- - name : Install windows dependencies
136
- if : env.BUILD && runner.os == 'Windows'
137
- run : choco install nsis-unicode
138
-
139
123
- name : Determine source branch
140
124
id : which-branch
141
- if : env.BUILD
142
125
uses : secondlife/viewer-build-util/which-branch@v2
143
126
with :
144
127
token : ${{ github.token }}
145
128
146
129
- name : Build
147
130
id : build
148
- if : env.BUILD
149
131
shell : bash
150
132
env :
151
133
AUTOBUILD_VCS_BRANCH : ${{ steps.which-branch.outputs.branch }}
@@ -227,6 +209,9 @@ jobs:
227
209
if [[ "$edu" == "true" ]]
228
210
then
229
211
export viewer_channel="Second Life Release edu"
212
+ elif [[ "$branch" == "develop" ]];
213
+ then
214
+ export viewer_channel="Second Life Develop"
230
215
else
231
216
branch=$AUTOBUILD_VCS_BRANCH
232
217
IFS='/' read -ra ba <<< "$branch"
@@ -277,7 +262,7 @@ jobs:
277
262
echo "artifact=$RUNNER_OS$cfg_suffix" >> $GITHUB_OUTPUT
278
263
279
264
- name : Upload executable
280
- if : matrix.Linden && steps.build.outputs.viewer_app
265
+ if : steps.build.outputs.viewer_app
281
266
uses : actions/upload-artifact@v4
282
267
with :
283
268
name : " ${{ steps.build.outputs.artifact }}-app"
@@ -287,15 +272,12 @@ jobs:
287
272
# The other upload of nontrivial size is the symbol file. Use a distinct
288
273
# artifact for that too.
289
274
- name : Upload symbol file
290
- if : matrix.Linden
291
275
uses : actions/upload-artifact@v4
292
276
with :
293
277
name : " ${{ steps.build.outputs.artifact }}-symbols"
294
- path : |
295
- ${{ steps.build.outputs.symbolfile }}
278
+ path : ${{ steps.build.outputs.symbolfile }}
296
279
297
280
- name : Upload metadata
298
- if : matrix.Linden
299
281
uses : actions/upload-artifact@v4
300
282
with :
301
283
name : " ${{ steps.build.outputs.artifact }}-metadata"
@@ -306,7 +288,7 @@ jobs:
306
288
- name : Upload physics package
307
289
uses : actions/upload-artifact@v4
308
290
# should only be set for viewer-private
309
- if : matrix.Linden && steps.build.outputs.physicstpv
291
+ if : matrix.configuration == 'Release' && steps.build.outputs.physicstpv
310
292
with :
311
293
name : " ${{ steps.build.outputs.artifact }}-physics"
312
294
# emitted by build.sh, zero or one lines
@@ -382,37 +364,62 @@ jobs:
382
364
needs : build
383
365
runs-on : ubuntu-latest
384
366
steps :
367
+ - name : Download viewer exe
368
+ uses : actions/download-artifact@v4
369
+ with :
370
+ name : Windows-app
371
+ path : _artifacts
372
+ - name : Download Windows Symbols
373
+ if : env.BUGSPLAT_USER && env.BUGSPLAT_PASS
374
+ uses : actions/download-artifact@v4
375
+ with :
376
+ name : Windows-symbols
377
+ - name : Extract viewer pdb
378
+ if : env.BUGSPLAT_USER && env.BUGSPLAT_PASS
379
+ shell : bash
380
+ run : |
381
+ tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts
385
382
- name : Post Windows symbols
386
383
if : env.BUGSPLAT_USER && env.BUGSPLAT_PASS
387
- uses : secondlife/viewer-build-util/post-bugsplat-windows@v2
384
+ uses : secondlife-3p/symbol-upload@v10
388
385
with :
389
386
username : ${{ env.BUGSPLAT_USER }}
390
387
password : ${{ env.BUGSPLAT_PASS }}
391
388
database : " SecondLife_Viewer_2018"
392
- channel : ${{ needs.build.outputs.viewer_channel }}
389
+ application : ${{ needs.build.outputs.viewer_channel }}
393
390
version : ${{ needs.build.outputs.viewer_version }}
391
+ directory : _artifacts
392
+ files : " **/{SecondLifeViewer.exe,llwebrtc.dll,*.pdb}"
394
393
395
394
post-mac-symbols :
396
395
env :
397
396
BUGSPLAT_USER : ${{ secrets.BUGSPLAT_USER }}
398
397
BUGSPLAT_PASS : ${{ secrets.BUGSPLAT_PASS }}
399
398
needs : build
399
+ if : needs.build.outputs.configuration == 'Release'
400
400
runs-on : ubuntu-latest
401
401
steps :
402
+ - name : Download Mac Symbols
403
+ if : env.BUGSPLAT_USER && env.BUGSPLAT_PASS
404
+ uses : actions/download-artifact@v4
405
+ with :
406
+ name : macOS-symbols
402
407
- name : Post Mac symbols
403
408
if : env.BUGSPLAT_USER && env.BUGSPLAT_PASS
404
- uses : secondlife/viewer-build-util/post-bugsplat-mac@v2
409
+ uses : secondlife-3p/symbol-upload@v10
405
410
with :
406
411
username : ${{ env.BUGSPLAT_USER }}
407
412
password : ${{ env.BUGSPLAT_PASS }}
408
413
database : " SecondLife_Viewer_2018"
409
- channel : ${{ needs.build.outputs.viewer_channel }}
410
- version : ${{ needs.build.outputs.viewer_version }}
414
+ application : ${{ needs.build.outputs.viewer_channel }}
415
+ version : ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }})
416
+ directory : .
417
+ files : " **/*.xcarchive.zip"
411
418
412
419
release :
413
- needs : [setvar , build, sign-and-package-windows, sign-and-package-mac]
420
+ needs : [setup , build, sign-and-package-windows, sign-and-package-mac]
414
421
runs-on : ubuntu-latest
415
- if : needs.setvar .outputs.release_run
422
+ if : needs.setup .outputs.release_run
416
423
steps :
417
424
- uses : actions/download-artifact@v4
418
425
with :
0 commit comments