Skip to content

Commit 7507abb

Browse files
authored
Merge pull request #1198 from secondlife/signal/xz
CI: adopt xz compression, actions/*-artifact@v4
2 parents cc8fdf3 + 0f94ea8 commit 7507abb

File tree

4 files changed

+40
-54
lines changed

4 files changed

+40
-54
lines changed

.github/workflows/build.yaml

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ jobs:
1212
strategy:
1313
matrix:
1414
runner: [windows-large, macos-12-xl]
15-
configuration: [Release, ReleaseOS]
15+
configuration: [Release]
1616
include:
1717
- runner: macos-12-xl
1818
developer_dir: "/Applications/Xcode_14.0.1.app/Contents/Developer"
19-
exclude:
20-
- runner: macos-12-xl
21-
configuration: ReleaseOS
2219
runs-on: ${{ matrix.runner }}
2320
outputs:
2421
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
@@ -100,7 +97,7 @@ jobs:
10097

10198
- name: Determine source branch
10299
id: which-branch
103-
uses: secondlife/viewer-build-util/which-branch@v1
100+
uses: secondlife/viewer-build-util/which-branch@v2
104101
with:
105102
token: ${{ github.token }}
106103

@@ -223,7 +220,7 @@ jobs:
223220
224221
- name: Upload executable
225222
if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.viewer_app
226-
uses: actions/upload-artifact@v3
223+
uses: actions/upload-artifact@v4
227224
with:
228225
name: "${{ steps.build.outputs.artifact }}-app"
229226
path: |
@@ -233,23 +230,23 @@ jobs:
233230
# artifact for that too.
234231
- name: Upload symbol file
235232
if: matrix.configuration != 'ReleaseOS'
236-
uses: actions/upload-artifact@v3
233+
uses: actions/upload-artifact@v4
237234
with:
238235
name: "${{ steps.build.outputs.artifact }}-symbols"
239236
path: |
240237
${{ steps.build.outputs.symbolfile }}
241238
242239
- name: Upload metadata
243240
if: matrix.configuration != 'ReleaseOS'
244-
uses: actions/upload-artifact@v3
241+
uses: actions/upload-artifact@v4
245242
with:
246243
name: "${{ steps.build.outputs.artifact }}-metadata"
247244
# emitted by build.sh, possibly multiple lines
248245
path: |
249246
${{ steps.build.outputs.metadata }}
250247
251248
- name: Upload physics package
252-
uses: actions/upload-artifact@v3
249+
uses: actions/upload-artifact@v4
253250
# should only be set for viewer-private
254251
if: matrix.configuration != 'ReleaseOS' && steps.build.outputs.physicstpv
255252
with:
@@ -270,7 +267,7 @@ jobs:
270267
steps:
271268
- name: Sign and package Windows viewer
272269
if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
273-
uses: secondlife/viewer-build-util/sign-pkg-windows@v1
270+
uses: secondlife/viewer-build-util/sign-pkg-windows@v2
274271
with:
275272
vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
276273
cert_name: "${{ env.AZURE_CERT_NAME }}"
@@ -309,7 +306,7 @@ jobs:
309306
310307
- name: Sign and package Mac viewer
311308
if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team
312-
uses: secondlife/viewer-build-util/sign-pkg-mac@v1
309+
uses: secondlife/viewer-build-util/sign-pkg-mac@v2
313310
with:
314311
channel: ${{ needs.build.outputs.viewer_channel }}
315312
imagename: ${{ needs.build.outputs.imagename }}
@@ -329,7 +326,7 @@ jobs:
329326
steps:
330327
- name: Post Windows symbols
331328
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
332-
uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
329+
uses: secondlife/viewer-build-util/post-bugsplat-windows@v2
333330
with:
334331
username: ${{ env.BUGSPLAT_USER }}
335332
password: ${{ env.BUGSPLAT_PASS }}
@@ -346,7 +343,7 @@ jobs:
346343
steps:
347344
- name: Post Mac symbols
348345
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
349-
uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
346+
uses: secondlife/viewer-build-util/post-bugsplat-mac@v2
350347
with:
351348
username: ${{ env.BUGSPLAT_USER }}
352349
password: ${{ env.BUGSPLAT_PASS }}
@@ -359,31 +356,20 @@ jobs:
359356
runs-on: ubuntu-latest
360357
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_')
361358
steps:
362-
- uses: actions/download-artifact@v3
363-
with:
364-
name: Windows-installer
365-
366-
- uses: actions/download-artifact@v3
367-
with:
368-
name: macOS-installer
369-
370-
- uses: actions/download-artifact@v3
359+
- uses: actions/download-artifact@v4
371360
with:
372-
name: Windows-metadata
373-
374-
- name: Rename windows metadata
375-
run: |
376-
mv autobuild-package.xml Windows-autobuild-package.xml
377-
mv newview/viewer_version.txt Windows-viewer_version.txt
361+
pattern: "*-installer"
378362

379-
- uses: actions/download-artifact@v3
363+
- uses: actions/download-artifact@v4
380364
with:
381-
name: macOS-metadata
382-
383-
- name: Rename macOS metadata
365+
pattern: "*-metadata"
366+
367+
- name: Rename metadata
384368
run: |
385-
mv autobuild-package.xml macOS-autobuild-package.xml
386-
mv newview/viewer_version.txt macOS-viewer_version.txt
369+
cp Windows-metadata/autobuild-package.xml Windows-autobuild-package.xml
370+
cp Windows-metadata/newview/viewer_version.txt Windows-viewer_version.txt
371+
cp macOS-metadata/autobuild-package.xml macOS-autobuild-package.xml
372+
cp macOS-metadata/newview/viewer_version.txt macOS-viewer_version.txt
387373
388374
# forked from softprops/action-gh-release
389375
- name: Create GitHub release
@@ -406,8 +392,8 @@ jobs:
406392
append_body: true
407393
fail_on_unmatched_files: true
408394
files: |
409-
*.dmg
410-
*.exe
395+
macOS-installer/*.dmg
396+
Windows-installer/*.exe
411397
*-autobuild-package.xml
412398
*-viewer_version.txt
413399

build.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ installer_Linux()
8282
{
8383
local package_name="$1"
8484
local package_dir="$(build_dir_Linux)/newview/"
85-
local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.bz2\$"
85+
local pattern=".*$(viewer_channel_suffix ${package_name})_[0-9]+_[0-9]+_[0-9]+_[0-9]+_i686\\.tar\\.xz\$"
8686
# since the additional packages are built after the base package,
8787
# sorting oldest first ensures that the unqualified package is returned
8888
# even if someone makes a qualified name that duplicates the last word of the base name
@@ -170,7 +170,7 @@ pre_build()
170170
# This name is consumed by indra/newview/CMakeLists.txt. Make it
171171
# absolute because we've had troubles with relative pathnames.
172172
abs_build_dir="$(cd "$build_dir"; pwd)"
173-
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
173+
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.xz")"
174174
fi
175175

176176
# honor autobuild_configure_parameters same as sling-buildscripts
@@ -414,10 +414,10 @@ do
414414
fi
415415
if [ -d "$build_dir/doxygen/html" ]
416416
then
417-
tar -c -f "$build_dir/viewer-doxygen.tar.bz2" --strip-components 3 "$build_dir/doxygen/html"
418-
python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.bz2" \
417+
tar -cJf "$build_dir/viewer-doxygen.tar.xz" --strip-components 3 "$build_dir/doxygen/html"
418+
python_cmd "$helpers/codeticket.py" addoutput "Doxygen Tarball" "$build_dir/viewer-doxygen.tar.xz" \
419419
|| fatal "Upload of doxygen tarball failed"
420-
metadata+=("$build_dir/viewer-doxygen.tar.bz2")
420+
metadata+=("$build_dir/viewer-doxygen.tar.xz")
421421
fi
422422
;;
423423
*)

indra/newview/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ if (WINDOWS)
18201820

18211821
if (PACKAGE)
18221822
add_custom_command(
1823-
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2
1823+
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz
18241824
COMMAND ${PYTHON_EXECUTABLE}
18251825
ARGS
18261826
${CMAKE_CURRENT_SOURCE_DIR}/event_host_manifest.py
@@ -1864,7 +1864,7 @@ if (WINDOWS)
18641864
)
18651865
# temporarily disable packaging of event_host until hg subrepos get
18661866
# sorted out on the parabuild cluster...
1867-
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.bz2)
1867+
#${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/event_host.tar.xz)
18681868

18691869
endif (PACKAGE)
18701870
elseif (DARWIN)
@@ -1984,7 +1984,7 @@ if (LINUX)
19841984
#endif (NOT USE_BUGSPLAT)
19851985

19861986
add_custom_command(
1987-
OUTPUT ${product}.tar.bz2
1987+
OUTPUT ${product}.tar.xz
19881988
COMMAND ${PYTHON_EXECUTABLE}
19891989
ARGS
19901990
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
@@ -2038,7 +2038,7 @@ if (LINUX)
20382038
add_custom_target(copy_l_viewer_manifest ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.copy_touched)
20392039

20402040
if (PACKAGE)
2041-
add_custom_target(llpackage ALL DEPENDS ${product}.tar.bz2)
2041+
add_custom_target(llpackage ALL DEPENDS ${product}.tar.xz)
20422042
# Make sure we don't run two instances of viewer_manifest.py at the same time.
20432043
add_dependencies(llpackage copy_l_viewer_manifest)
20442044
check_message_template(llpackage)
@@ -2169,12 +2169,12 @@ if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIE
21692169
OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN
21702170
OUTPUT_STRIP_TRAILING_WHITESPACE)
21712171
add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
2172-
# Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.bz2;
2172+
# Use of 'tar ...j' here assumes VIEWER_SYMBOL_FILE endswith .tar.xz;
21732173
# testing a string suffix is painful enough in CMake language that
21742174
# we'll continue assuming it until forced to generalize.
21752175
COMMAND "tar"
21762176
ARGS
2177-
"cjf"
2177+
"cJf"
21782178
"${VIEWER_SYMBOL_FILE_CYGWIN}"
21792179
"-C"
21802180
"${PARENT_DIRECTORY_CYGWIN}"

indra/newview/viewer_manifest.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def construct(self):
525525
'secondlife-bin.*',
526526
'*_Setup.exe',
527527
'*.bat',
528-
'*.tar.bz2')))
528+
'*.tar.xz')))
529529

530530
with self.prefix(src=os.path.join(pkgdir, "VMP")):
531531
# include the compiled launcher scripts so that it gets included in the file_list
@@ -1183,9 +1183,9 @@ def package_finish(self):
11831183
# causes problems, especially with frameworks: a framework's top
11841184
# level must contain symlinks into its Versions/Current, which
11851185
# must itself be a symlink to some specific Versions subdir.
1186-
tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.bz2")
1186+
tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.xz")
11871187
print(f'Creating {tarpath} from {self.get_dst_prefix()}')
1188-
with tarfile.open(tarpath, mode="w:bz2") as tarball:
1188+
with tarfile.open(tarpath, mode="w:xz") as tarball:
11891189
# Store in the tarball as just 'Second Life Mumble.app'
11901190
# instead of 'Users/someone/.../newview/Release/Second...'
11911191
# It's at this point that we rename 'Second Life Release.app'
@@ -1272,7 +1272,7 @@ def package_finish(self):
12721272
self.run_command(['find', self.get_dst_prefix(),
12731273
'-type', 'f', '-perm', old,
12741274
'-exec', 'chmod', new, '{}', ';'])
1275-
self.package_file = installer_name + '.tar.bz2'
1275+
self.package_file = installer_name + '.tar.xz'
12761276

12771277
# temporarily move directory tree so that it has the right
12781278
# name in the tarfile
@@ -1285,10 +1285,10 @@ def package_finish(self):
12851285
# --numeric-owner hides the username of the builder for
12861286
# security etc.
12871287
self.run_command(['tar', '-C', self.get_build_prefix(),
1288-
'--numeric-owner', '-cjf',
1289-
tempname + '.tar.bz2', installer_name])
1288+
'--numeric-owner', '-cJf',
1289+
tempname + '.tar.xz', installer_name])
12901290
else:
1291-
print("Skipping %s.tar.bz2 for non-Release build (%s)" % \
1291+
print("Skipping %s.tar.xz for non-Release build (%s)" % \
12921292
(installer_name, self.args['buildtype']))
12931293
finally:
12941294
self.run_command(["mv", tempname, realname])

0 commit comments

Comments
 (0)