Skip to content

Commit 2047683

Browse files
committed
Use tar.xz on Linux and macOS for artifacts
1 parent fa2126c commit 2047683

5 files changed

Lines changed: 15 additions & 19 deletions

File tree

‎.github/actions/initialize-build-environment/action.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ runs:
3434
HOMEBREW_NO_INSTALL_CLEANUP: '1'
3535
run: |
3636
brew update
37-
brew install ninja ccache autoconf autoconf-archive automake libtool pkgconf bison flex libmagic
37+
brew install ninja ccache autoconf autoconf-archive automake libtool pkgconf bison flex libmagic xz
3838
echo "$(brew --prefix bison)/bin" >> "$GITHUB_PATH"
3939
echo "$(brew --prefix flex)/bin" >> "$GITHUB_PATH"
4040
@@ -44,7 +44,7 @@ runs:
4444
run: |
4545
sudo apt-get update
4646
sudo apt-get install -y \
47-
build-essential gcc-14 g++-14 ninja-build ccache patchelf zip unzip curl tar file binutils \
47+
build-essential gcc-14 g++-14 ninja-build ccache patchelf zip unzip curl tar xz-utils file binutils \
4848
autoconf autoconf-archive automake libtool libltdl-dev pkg-config \
4949
bison flex libmagic-dev
5050
echo 'CC=gcc-14' >> "$GITHUB_ENV"

‎.github/scripts/nightly.cjs‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ function expectedAssets(applicationName, semver) {
161161
return [
162162
['_Windows_amd64_portable.zip', 'windows', 'amd64', 'zip', 'portable'],
163163
['_Windows_amd64_debug_symbols.zip', 'windows', 'amd64', 'zip', 'debug_symbols'],
164-
// Enable each platform's entries with its matrix entry in build.yml.
165-
// ['_macOS_arm64_portable.zip', 'macos', 'arm64', 'zip', 'portable'],
166-
// ['_macOS_arm64_debug_symbols.zip', 'macos', 'arm64', 'zip', 'debug_symbols'],
167-
// ['_Linux_amd64_portable.zip', 'linux', 'amd64', 'zip', 'portable'],
168-
// ['_Linux_amd64_debug_symbols.zip', 'linux', 'amd64', 'zip', 'debug_symbols'],
164+
['_macOS_arm64_portable.tar.xz', 'macos', 'arm64', 'tar.xz', 'portable'],
165+
['_macOS_arm64_debug_symbols.tar.xz', 'macos', 'arm64', 'tar.xz', 'debug_symbols'],
166+
['_Linux_amd64_portable.tar.xz', 'linux', 'amd64', 'tar.xz', 'portable'],
167+
['_Linux_amd64_debug_symbols.tar.xz', 'linux', 'amd64', 'tar.xz', 'debug_symbols'],
169168
].map(([suffix, platform, arch, format, variant]) => ({ name: base + suffix, platform, arch, format, variant }));
170169
}
171170

‎.github/workflows/build.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
EXPECTED_SEMVER: ${{ needs.Prepare.outputs.semver }}
8585
ARTIFACT_PLATFORM: ${{ matrix.platform }}
8686
ARTIFACT_ARCH: ${{ matrix.arch }}
87+
ARCHIVE_EXTENSION: ${{ matrix.platform == 'Windows' && 'zip' || 'tar.xz' }}
8788
USE_CCACHE: ${{ inputs.build_type != 'nightly' && inputs.use_cache && inputs.use_ccache }}
8889
steps:
8990
- name: Checkout repository
@@ -145,15 +146,15 @@ jobs:
145146
$output = & ./scripts/ci/Collect-Symbol-Files.ps1 `
146147
-VcpkgRootDir $env:VCPKG_ROOT_DIR `
147148
-InstallDir $env:INSTALL_DIR `
148-
-ArchivePath "$($env:ARTIFACT_NAME)_debug_symbols.zip"
149+
-ArchivePath "$($env:ARTIFACT_NAME)_debug_symbols.$($env:ARCHIVE_EXTENSION)"
149150
"SYMBOL_FILES_PATH=$output" >> $env:GITHUB_ENV
150151
151-
- name: Create portable ZIP
152+
- name: Create portable archive
152153
run: |
153154
$archive = & ./scripts/ci/Create-Portable.ps1 `
154155
-InstallDir $env:INSTALL_DIR `
155156
-ApplicationName $env:APPLICATION_NAME `
156-
-ArchivePath "$($env:ARTIFACT_NAME)_portable.zip"
157+
-ArchivePath "$($env:ARTIFACT_NAME)_portable.$($env:ARCHIVE_EXTENSION)"
157158
"PORTABLE_PATH=$archive" >> $env:GITHUB_ENV
158159
159160
- name: Upload symbol files
@@ -165,7 +166,7 @@ jobs:
165166
overwrite: true
166167
compression-level: 0
167168

168-
- name: Upload portable ZIP
169+
- name: Upload portable archive
169170
uses: actions/upload-artifact@v4
170171
with:
171172
name: ${{ env.ARTIFACT_NAME }}_portable

‎scripts/ci/Collect-Symbol-Files.ps1‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,11 @@ try {
129129
try {
130130
if ($IsWindows) {
131131
& 7z a -tzip -mx=9 $archiveFullPath debug_symbols | Out-Host
132-
} elseif ($IsMacOS) {
133-
& /usr/bin/ditto -c -k --keepParent --norsrc debug_symbols $archiveFullPath | Out-Host
134132
} else {
135-
& /usr/bin/zip -9 -r -y $archiveFullPath debug_symbols | Out-Host
133+
& /usr/bin/tar -cJf $archiveFullPath debug_symbols | Out-Host
136134
}
137135
if ($LASTEXITCODE -ne 0 -or -not (Test-Path -LiteralPath $archiveFullPath -PathType Leaf)) {
138-
throw 'Symbol ZIP creation failed'
136+
throw 'Symbol archive creation failed'
139137
}
140138
} finally {
141139
Pop-Location

‎scripts/ci/Create-Portable.ps1‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ Push-Location $stagingRoot
3737
try {
3838
if ($IsWindows) {
3939
& 7z a -tzip -mx=9 $archiveFullPath $ApplicationName | Out-Host
40-
} elseif ($IsMacOS) {
41-
& /usr/bin/ditto -c -k --keepParent --norsrc $ApplicationName $archiveFullPath | Out-Host
4240
} else {
43-
& /usr/bin/zip -9 -r -y $archiveFullPath $ApplicationName | Out-Host
41+
& /usr/bin/tar -cJf $archiveFullPath $ApplicationName | Out-Host
4442
}
4543
if ($LASTEXITCODE -ne 0 -or -not (Test-Path -LiteralPath $archiveFullPath -PathType Leaf)) {
46-
throw 'Portable ZIP creation failed'
44+
throw 'Portable archive creation failed'
4745
}
4846
} finally {
4947
Pop-Location

0 commit comments

Comments
 (0)