Skip to content

Commit

Permalink
feat: download debug symbols tool for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcr99 committed Feb 14, 2025
1 parent 920f3b0 commit 10a5229
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions .github/workflows/packages-build-windows-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,19 @@ jobs:
fi
echo "BINARIES_NAME=windows-build-${VERSION}-${{ inputs.revision }}_${COMMIT_HASH}" >> $GITHUB_ENV
- name: Fetch debug symbols tool
run: |
$url = "https://github.com/rainers/cv2pdb/releases/download/v0.53/cv2pdb-0.53.zip"
$zipFile = "C:\tmp\cv2pdb-0.53.zip"
$extractPath = "C:\tmp\cv2pdb"
New-Item -ItemType Directory -Path (Split-Path -Path $zipFile) -Force
Invoke-WebRequest -Uri $url -OutFile $zipFile
Expand-Archive -Path $zipFile -DestinationPath $extractPath -Force
- name: Build MSI for Windows package
run: |
New-Item -ItemType Directory -Path "C:\tmp" -Force
./packages/windows/generate_compiled_windows_agent.ps1 -MSI_NAME ${{ env.PKG_NAME }} -CMAKE_CONFIG RelWithDebInfo -BUILD_TESTS 1
./packages/windows/generate_wazuh_msi.ps1 -MSI_NAME "${{ env.PKG_NAME }}" -CMAKE_CONFIG RelWithDebInfo -DEBUG yes | Out-File -FilePath "C:\tmp\generate_msi.log"
./packages/windows/generate_wazuh_msi.ps1 -MSI_NAME "${{ env.PKG_NAME }}" -CMAKE_CONFIG RelWithDebInfo -DEBUG yes -CV2PDB_PATH C:\tmp\cv2pdb | Out-File -FilePath "C:\tmp\generate_msi.log"
- name: Check MSI for Windows package
run: |
Expand All @@ -106,10 +114,8 @@ jobs:
- name: Install Windows agent
run: |
Start-Process -FilePath './wazuh-agent/packages/windows/${{ env.PKG_NAME }}.msi' -ArgumentList '/l ./installer.log' -wait
installerfile=$("Get-Content ./installer.log")
Write-Output $installerfile
if ($installerfile -like "*Wazuh Agent -- Installation completed successfully*") {
Start-Process -FilePath './packages/windows/${{ env.PKG_NAME }}.msi' -ArgumentList '/quiet /l ./installer.log' -wait
if (Select-String -Path /installer.log -Pattern "Wazuh Agent -- Installation completed successfully") {
Write-Output "Installation successfully."
} else {
Write-Output "The installation could not be completed. The package will not be uploaded."
Expand Down

0 comments on commit 10a5229

Please sign in to comment.