From 8fa56c752b1a3ba4d04491982553b5ae9313c695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Cortier?= Date: Tue, 20 Aug 2024 09:22:48 -0400 Subject: [PATCH] ci(agent): zip all debug symbol files together (#989) --- .github/workflows/package.yml | 13 +++++++++++++ .github/workflows/release.yml | 9 ++------- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 82a9d6127..44fabd8d3 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -424,6 +424,19 @@ jobs: } } + - name: Zip debug symbol files + if: matrix.project == 'devolutions-agent' && matrix.os == 'windows' + shell: pwsh + run: | + $PackageRoot = Join-Path ${{ runner.temp }} ${{ matrix.project}} + + Get-ChildItem -Path $PackageRoot -Recurse + + Compress-Archive "$PackageRoot\windows\x86_64\*.pdb" "$PackageRoot\windows\x86_64\DevolutionsAgent-x86_64-${{ needs.preflight.outputs.version }}.symbols.zip" -CompressionLevel Optimal + Remove-Item "$PackageRoot\windows\x86_64\*.pdb" | Out-Null + + Get-ChildItem -Path $PackageRoot -Recurse + - name: Upload artifacts uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e8a22d10..9e2c37d75 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -235,7 +235,7 @@ jobs: run: | $Version = "${{ needs.preflight.outputs.version }}" $HashPath = 'checksums' - $Files = Get-ChildItem -Recurse -File -Exclude 'CHANGELOG.md','*.pdb' | % { Get-FileHash -Algorithm SHA256 $_.FullName } + $Files = Get-ChildItem -Recurse -File -Exclude 'CHANGELOG.md' | % { Get-FileHash -Algorithm SHA256 $_.FullName } $Files | % { "$($_.Hash) $(Split-Path $_.Path -leaf)" } | Out-File -FilePath $HashPath -Append -Encoding ASCII echo "::group::checksums" @@ -405,12 +405,7 @@ jobs: New-Item -Path "$destinationFolder" -ItemType "directory" Move-Item -Path "./windows/x86_64/DevolutionsAgent-x86_64-${version}.msi" -Destination "$destinationFolder/DevolutionsAgent-x86_64-${versionFull}.msi" - - Move-Item -Path "./windows/x86_64/DevolutionsAgent_Windows_${version}_x86_64.pdb" -Destination "$destinationFolder/DevolutionsAgent-x86_64-${versionFull}.pdb" - Move-Item -Path "./windows/x86_64/devolutions_pedm_contextmenu_shell.pdb" -Destination "$destinationFolder/devolutions_pedm_contextmenu_shell.pdb" - Move-Item -Path "./windows/x86_64/devolutions_pedm_contextmenu.pdb" -Destination "$destinationFolder/devolutions_pedm_contextmenu.pdb" - Move-Item -Path "./windows/x86_64/devolutions_pedm_hook.pdb" -Destination "$destinationFolder/devolutions_pedm_hook.pdb" - Move-Item -Path "./windows/x86_64/DevolutionsPedmDesktop.pdb" -Destination "$destinationFolder/DevolutionsPedmDesktop.pdb" + Move-Item -Path "./windows/x86_64/DevolutionsAgent-x86_64-${version}.symbols.zip" -Destination "$destinationFolder/DevolutionsAgent-x86_64-${versionFull}.symbols.zip" # Note that at this point the deb package is already named using the ".0" suffix. Move-Item -Path "./linux/x86_64/devolutions-agent_${versionFull}_amd64.deb" -Destination "$destinationFolder/devolutions-agent_${versionFull}_amd64.deb"