Skip to content

Commit f36f803

Browse files
CBenoitCopilot
andcommitted
ci: overhaul artifact naming, organization, and x86_64->x64 migration
- Internal artifacts use simple basenames inside <product>/<os>/<arch>/ folders; version+arch qualifiers are added only at the final upload step - x86_64 replaced with x64 everywhere except Rust target triples, LLVM artifact names, and values that map our x64 label to Rust/Debian/RPM conventions; removes all $PublicArch conversion boilerplate - All PDB files bundled into .symbols.zip per product/arch; no bare .pdb in any release - Pre-release OneDrive upload now includes Agent Linux DEB/RPM/changes and Jetsocat ZIPs for all platforms - Linux gateway binary wrapped in a versioned ZIP for the GitHub release - .changes files (deb-changes(5)) preserved and uploaded; needed for dput/dupload to submit packages to a Debian archive - fpm output renaming to simple basenames is done in the ci.yml Package step call site, not inside tlk.ps1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent fc3b46f commit f36f803

4 files changed

Lines changed: 212 additions & 140 deletions

File tree

.github/workflows/ci.yml

Lines changed: 103 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
id: setup-matrix
4444
run: |
4545
$Jobs = @()
46-
$Archs = @( 'x86_64', 'arm64' )
46+
$Archs = @( 'x64', 'arm64' )
4747
$Platforms = @( 'linux', 'windows' )
4848
4949
$Platforms | ForEach-Object {
@@ -203,7 +203,7 @@ jobs:
203203
runs-on: ${{ matrix.runner }}
204204
strategy:
205205
matrix:
206-
arch: [x86_64]
206+
arch: [x64]
207207
os: [windows, linux]
208208
include:
209209
- os: windows
@@ -325,7 +325,7 @@ jobs:
325325
shell: pwsh
326326

327327
- name: Configure macOS (intel) runner
328-
if: ${{ matrix.os == 'macos' && matrix.arch == 'x86_64' }}
328+
if: ${{ matrix.os == 'macos' && matrix.arch == 'x64' }}
329329
run: |
330330
sudo rm -rf /Library/Developer/CommandLineTools
331331
rustup target add x86_64-apple-darwin
@@ -335,7 +335,7 @@ jobs:
335335
run: |
336336
$StagingPath = Join-Path $Env:RUNNER_TEMP "staging"
337337
$TargetOutputPath = Join-Path $StagingPath ${{ matrix.os }} ${{ matrix.arch }}
338-
$ExecutableFileName = 'jetsocat_${{ runner.os }}_${{ needs.preflight.outputs.version }}_${{ matrix.arch }}'
338+
$ExecutableFileName = 'jetsocat'
339339
340340
if ($Env:RUNNER_OS -eq "Windows") {
341341
$ExecutableFileName = "$($ExecutableFileName).exe"
@@ -344,8 +344,8 @@ jobs:
344344
}
345345
346346
if ($Env:RUNNER_OS -eq "Linux") {
347-
$LinuxArch = @{'x86_64'='amd64';'arm64'='arm64'}['${{ matrix.arch }}']
348-
$RustArch = @{'x86_64'='x86_64';'arm64'='aarch64'}['${{ matrix.arch }}']
347+
$LinuxArch = @{'x64'='amd64';'arm64'='arm64'}['${{ matrix.arch }}']
348+
$RustArch = @{'x64'='x86_64';'arm64'='aarch64'}['${{ matrix.arch }}']
349349
$RustTarget = "$RustArch-unknown-linux-gnu"
350350
$Env:SYSROOT_NAME = "ubuntu-18.04-$LinuxArch"
351351
. "$HOME/.cargo/cbake/${RustTarget}-enter.ps1"
@@ -576,7 +576,7 @@ jobs:
576576
- name: Download Cadeau
577577
run: |
578578
$Platform = @{'windows'='win'; 'linux'='linux'}['${{ matrix.os }}']
579-
$Arch = @{'x86_64'='x64';'arm64'='arm64'}['${{ matrix.arch }}']
579+
$Arch = '${{ matrix.arch }}'
580580
./ci/download-cadeau.ps1 -Platform $Platform -Architecture $Arch
581581
shell: pwsh
582582

@@ -586,11 +586,11 @@ jobs:
586586
$PackageVersion = "${{ needs.preflight.outputs.version }}"
587587
$StagingPath = Join-Path $Env:RUNNER_TEMP "staging"
588588
$TargetOutputPath = Join-Path $StagingPath ${{ matrix.os }} ${{ matrix.arch }}
589-
$ExecutableFileName = "DevolutionsGateway_${{ runner.os }}_${PackageVersion}_${{ matrix.arch }}"
589+
$ExecutableFileName = "DevolutionsGateway"
590590
591591
if ($Env:RUNNER_OS -eq "Windows") {
592592
$ExecutableFileName = "$($ExecutableFileName).exe"
593-
$PackageFileName = "DevolutionsGateway-${{ matrix.arch }}-${PackageVersion}.msi"
593+
$PackageFileName = "DevolutionsGateway.msi"
594594
$DGatewayPackage = Join-Path $TargetOutputPath $PackageFileName
595595
echo "dgateway-package=$DGatewayPackage" >> $Env:GITHUB_OUTPUT
596596
}
@@ -657,8 +657,8 @@ jobs:
657657
- name: Build
658658
run: |
659659
if ($Env:RUNNER_OS -eq "Linux") {
660-
$LinuxArch = @{'x86_64'='amd64';'arm64'='arm64'}['${{ matrix.arch }}']
661-
$RustArch = @{'x86_64'='x86_64';'arm64'='aarch64'}['${{ matrix.arch }}']
660+
$LinuxArch = @{'x64'='amd64';'arm64'='arm64'}['${{ matrix.arch }}']
661+
$RustArch = @{'x64'='x86_64';'arm64'='aarch64'}['${{ matrix.arch }}']
662662
$RustTarget = "$RustArch-unknown-linux-gnu"
663663
$Env:SYSROOT_NAME = "ubuntu-18.04-$LinuxArch"
664664
. "$HOME/.cargo/cbake/${RustTarget}-enter.ps1"
@@ -703,6 +703,14 @@ jobs:
703703
$Env:DGATEWAY_WEBPLAYER_PATH = Join-Path "webapp" "dist" "recording-player" | Resolve-Path
704704
705705
./ci/tlk.ps1 package -Product gateway -Platform ${{ matrix.os }} -Architecture ${{ matrix.arch }} -CargoProfile ${{ needs.preflight.outputs.rust-profile }}
706+
707+
# Rename versioned fpm output to simple basenames for consistent folder-based addressing.
708+
if ($Env:RUNNER_OS -eq "Linux") {
709+
$OutputPath = "${{ steps.load-variables.outputs.target-output-path }}"
710+
Get-ChildItem "$OutputPath/*.deb" | Rename-Item -NewName "devolutions-gateway.deb"
711+
Get-ChildItem "$OutputPath/*.changes" | Rename-Item -NewName "devolutions-gateway.changes"
712+
Get-ChildItem "$OutputPath/*.rpm" | Rename-Item -NewName "devolutions-gateway.rpm"
713+
}
706714
shell: pwsh
707715
env:
708716
DGATEWAY_EXECUTABLE: ${{ steps.load-variables.outputs.dgateway-executable }}
@@ -787,11 +795,11 @@ jobs:
787795
New-Item -ItemType Directory $SymbolsPath
788796
789797
$TargetOutputPath = Join-Path $StagingPath ${{ matrix.os }} ${{ matrix.arch }}
790-
$ExecutableFileName = "DevolutionsAgent_${{ runner.os }}_${PackageVersion}_${{ matrix.arch }}"
798+
$ExecutableFileName = "DevolutionsAgent"
791799
792800
if ($Env:RUNNER_OS -eq "Windows") {
793801
$ExecutableFileName = "$($ExecutableFileName).exe"
794-
$PackageFileName = "DevolutionsAgent-${{ matrix.arch }}-${PackageVersion}.msi"
802+
$PackageFileName = "DevolutionsAgent.msi"
795803
$DAgentPackage = Join-Path $TargetOutputPath $PackageFileName
796804
797805
echo "dagent-package=$DAgentPackage" >> $Env:GITHUB_OUTPUT
@@ -805,7 +813,7 @@ jobs:
805813
$DAgentSessionExecutable = Join-Path $TargetOutputPath "DevolutionsSession.exe"
806814
echo "dagent-session-executable=$DAgentSessionExecutable" >> $Env:GITHUB_OUTPUT
807815
808-
$DAgentUpdaterExecutable = Join-Path $TargetOutputPath "DevolutionsAgentUpdater_${{ runner.os }}_${PackageVersion}_${{ matrix.arch }}.exe"
816+
$DAgentUpdaterExecutable = Join-Path $TargetOutputPath "DevolutionsAgentUpdater.exe"
809817
echo "dagent-updater-executable=$DAgentUpdaterExecutable" >> $Env:GITHUB_OUTPUT
810818
}
811819
@@ -827,7 +835,7 @@ jobs:
827835
id: tun2socks
828836
if: ${{ matrix.os == 'windows' }}
829837
run: |
830-
$Arch = @{'x86_64'='x64';'arm64'='arm64'}['${{ matrix.arch }}']
838+
$Arch = '${{ matrix.arch }}'
831839
$Destination = Join-Path $PWD "tun2socks"
832840
./ci/download-tun2socks.ps1 -Architecture $Arch -Destination $Destination
833841
$Tun2SocksExecutablePath = Join-Path $Destination "tun2socks.exe"
@@ -911,8 +919,8 @@ jobs:
911919
}
912920
913921
if ($Env:RUNNER_OS -eq "Linux") {
914-
$LinuxArch = @{'x86_64'='amd64';'arm64'='arm64'}['${{ matrix.arch }}']
915-
$RustArch = @{'x86_64'='x86_64';'arm64'='aarch64'}['${{ matrix.arch }}']
922+
$LinuxArch = @{'x64'='amd64';'arm64'='arm64'}['${{ matrix.arch }}']
923+
$RustArch = @{'x64'='x86_64';'arm64'='aarch64'}['${{ matrix.arch }}']
916924
$RustTarget = "$RustArch-unknown-linux-gnu"
917925
$Env:SYSROOT_NAME = "ubuntu-18.04-$LinuxArch"
918926
. "$HOME/.cargo/cbake/${RustTarget}-enter.ps1"
@@ -944,6 +952,14 @@ jobs:
944952
}
945953
946954
./ci/tlk.ps1 package -Product agent -Platform ${{ matrix.os }} -Architecture ${{ matrix.arch }} -CargoProfile ${{ needs.preflight.outputs.rust-profile }}
955+
956+
# Rename versioned fpm output to simple basenames for consistent folder-based addressing.
957+
if ($Env:RUNNER_OS -eq "Linux") {
958+
$OutputPath = "${{ steps.load-variables.outputs.target-output-path }}"
959+
Get-ChildItem "$OutputPath/*.deb" | Rename-Item -NewName "devolutions-agent.deb"
960+
Get-ChildItem "$OutputPath/*.changes" | Rename-Item -NewName "devolutions-agent.changes"
961+
Get-ChildItem "$OutputPath/*.rpm" | Rename-Item -NewName "devolutions-agent.rpm"
962+
}
947963
shell: pwsh
948964
env:
949965
DAGENT_EXECUTABLE: ${{ steps.load-variables.outputs.dagent-executable }}
@@ -1290,39 +1306,83 @@ jobs:
12901306
12911307
New-Item -Path "$destinationFolder" -ItemType "directory"
12921308
1293-
$allFiles = Get-ChildItem -Path "$sourceFolder" -Exclude PowerShell | Get-ChildItem -Recurse | Where { -Not $_.Mode.StartsWith('d') }
1294-
1295-
# Exclude some files that are already bundled in installers
1296-
$excludeFiles = @(
1297-
'DevolutionsPedmShellExt.dll',
1298-
'DevolutionsPedmShellExt.msix',
1299-
'DevolutionsSession.exe',
1300-
# NOTE: We may want to include that in the future, but needs to be renamed per platform.
1301-
# TODO(@awakecoding): We could create a zip with the same name as
1302-
# the package except ".symbols" at the end, so we'd end up with arch-specific zips
1303-
# containing the debug symbols. I've done this for MsRdpEx.
1304-
'DevolutionsPedmShellExt.pdb',
1305-
'DevolutionsSession.pdb'
1309+
function CopyArtifact([string]$RelSource, [string]$DestName) {
1310+
$src = Join-Path $sourceFolder $RelSource
1311+
$dst = Join-Path $destinationFolder $DestName
1312+
Write-Host "$src --> $dst"
1313+
Move-Item -Path $src -Destination $dst
1314+
}
1315+
1316+
# Create symbols ZIPs from individual PDBs (package.yml signing hasn't run yet).
1317+
$SymbolProducts = @(
1318+
@{ Dir = 'devolutions-gateway'; Name = 'DevolutionsGateway'; Arches = @('x64') },
1319+
@{ Dir = 'devolutions-agent'; Name = 'DevolutionsAgent'; Arches = @('x64', 'arm64') },
1320+
@{ Dir = 'jetsocat'; Name = 'jetsocat'; Arches = @('x64', 'arm64') }
13061321
)
1322+
foreach ($P in $SymbolProducts) {
1323+
foreach ($Arch in $P.Arches) {
1324+
$ArchDir = Join-Path $sourceFolder $P.Dir windows $Arch
1325+
$Pdbs = Get-ChildItem "$ArchDir\*.pdb" -File -ErrorAction SilentlyContinue
1326+
if ($Pdbs) {
1327+
$Pdbs | Compress-Archive -DestinationPath "$ArchDir\$($P.Name).symbols.zip" -CompressionLevel Optimal
1328+
}
1329+
}
1330+
}
13071331
1308-
Write-Host
1332+
# Gateway Windows MSI + symbols
1333+
CopyArtifact "devolutions-gateway/windows/x64/DevolutionsGateway.msi" "DevolutionsGateway-${version}-x64.msi"
1334+
CopyArtifact "devolutions-gateway/windows/x64/DevolutionsGateway.symbols.zip" "DevolutionsGateway-${version}-x64.symbols.zip"
13091335
1310-
foreach ($file in $allFiles) {
1311-
$dir = $file.Directory
1312-
$name = $file.Name
1313-
$source = "$dir/$name"
1314-
$destination = "$destinationFolder/$name"
1336+
# Gateway Linux DEB/RPM/changes
1337+
foreach ($Arch in @('x64', 'arm64')) {
1338+
CopyArtifact "devolutions-gateway/linux/${Arch}/devolutions-gateway.deb" "devolutions-gateway_${version}_${Arch}.deb"
1339+
CopyArtifact "devolutions-gateway/linux/${Arch}/devolutions-gateway.rpm" "devolutions-gateway_${version}_${Arch}.rpm"
1340+
CopyArtifact "devolutions-gateway/linux/${Arch}/devolutions-gateway.changes" "devolutions-gateway_${version}_${Arch}.changes"
1341+
}
13151342
1316-
# Skip architecture-specific files that are part of installers
1317-
if ($name -in $excludeFiles) {
1318-
Write-Host "Skipping $source"
1319-
continue
1320-
}
1343+
# Agent Windows MSI + symbols.zip
1344+
foreach ($Arch in @('x64', 'arm64')) {
1345+
CopyArtifact "devolutions-agent/windows/${Arch}/DevolutionsAgent.msi" "DevolutionsAgent-${version}-${Arch}.msi"
1346+
CopyArtifact "devolutions-agent/windows/${Arch}/DevolutionsAgent.symbols.zip" "DevolutionsAgent-${version}-${Arch}.symbols.zip"
1347+
}
13211348
1322-
Write-Host "$source --> $destination"
1349+
# Agent Linux DEB/RPM/changes
1350+
foreach ($Arch in @('x64', 'arm64')) {
1351+
CopyArtifact "devolutions-agent/linux/${Arch}/devolutions-agent.deb" "devolutions-agent_${version}_${Arch}.deb"
1352+
CopyArtifact "devolutions-agent/linux/${Arch}/devolutions-agent.rpm" "devolutions-agent_${version}_${Arch}.rpm"
1353+
CopyArtifact "devolutions-agent/linux/${Arch}/devolutions-agent.changes" "devolutions-agent_${version}_${Arch}.changes"
1354+
}
1355+
1356+
# Jetsocat ZIPs
1357+
$Platforms = @(
1358+
@{ OS = "windows"; Arch = "x64"; Ext = ".exe" },
1359+
@{ OS = "windows"; Arch = "arm64"; Ext = ".exe" },
1360+
@{ OS = "linux"; Arch = "x64"; Ext = "" },
1361+
@{ OS = "linux"; Arch = "arm64"; Ext = "" },
1362+
@{ OS = "macos"; Arch = "x64"; Ext = "" },
1363+
@{ OS = "macos"; Arch = "arm64"; Ext = "" },
1364+
@{ OS = "macos"; Arch = "universal"; Ext = "" }
1365+
)
13231366
1324-
Move-Item -Path "$source" -Destination "$destination"
1367+
foreach ($P in $Platforms) {
1368+
$BinaryPath = Join-Path $sourceFolder jetsocat $P.OS $P.Arch "jetsocat$($P.Ext)"
1369+
if (Test-Path $BinaryPath) {
1370+
$ZipDst = Join-Path $destinationFolder "jetsocat-${version}-$($P.OS)-$($P.Arch).zip"
1371+
Compress-Archive -Path $BinaryPath -DestinationPath $ZipDst -Force
1372+
Write-Host "$BinaryPath --> $ZipDst"
1373+
}
13251374
}
1375+
1376+
# Jetsocat Windows symbols
1377+
foreach ($Arch in @('x64', 'arm64')) {
1378+
$SymPath = Join-Path $sourceFolder jetsocat windows $Arch jetsocat.symbols.zip
1379+
if (Test-Path $SymPath) {
1380+
CopyArtifact "jetsocat/windows/${Arch}/jetsocat.symbols.zip" "jetsocat-${version}-windows-${Arch}.symbols.zip"
1381+
}
1382+
}
1383+
1384+
# git-log
1385+
CopyArtifact "git-log/git-log.txt" "git-log.txt"
13261386
shell: pwsh
13271387

13281388
- name: Upload to OneDrive

0 commit comments

Comments
 (0)