Skip to content

Commit b358cf2

Browse files
authored
Add symbols server support for Windows releases (#4784)
1 parent d6b4d6e commit b358cf2

File tree

12 files changed

+780
-36
lines changed

12 files changed

+780
-36
lines changed

.github/actions/install-windows-debug-tools/action.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ runs:
1616
$args = '/quiet /norestart /features OptionId.WindowsDesktopDebuggers /log "{0}"' -f $logPath
1717
$p = Start-Process -FilePath $sdkPath -ArgumentList $args -PassThru -Wait
1818
19+
- name: Add Debug Tools to PATH
20+
shell: pwsh
21+
run: |
22+
$debugToolsPath = "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64"
23+
$srcsrvPath = "$debugToolsPath\srcsrv"
24+
echo "$debugToolsPath" >> $env:GITHUB_PATH
25+
echo "$srcsrvPath" >> $env:GITHUB_PATH
26+
1927
- name: Upload SDK install log
2028
if: failure()
2129
uses: actions/upload-artifact@v4

.github/workflows/build-cpp-nuget-packages.yml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ on:
66
ice_version:
77
required: false
88
type: string
9+
run_id:
10+
description: "The run ID to use for downloading artifacts"
11+
required: true
12+
type: string
913
workflow_dispatch:
1014
inputs:
1115
ice_version:
1216
description: "The Ice version to build"
1317
required: false
18+
run_id:
19+
description: "The run ID to use for downloading artifacts"
20+
required: true
1421

1522
jobs:
1623
build-cpp-nuget-packages:
@@ -22,28 +29,17 @@ jobs:
2229
- name: Setup C++
2330
uses: ./.github/actions/setup-cpp
2431

25-
- name: Setup Java
26-
uses: ./.github/actions/setup-java
27-
28-
- name: Build C++ Binaries
29-
run: msbuild /m ice.proj /t:BuildDist /p:BuildAllConfigurations=yes
30-
working-directory: cpp/msbuild
31-
32-
- name: Sign C++ Binaries with Trusted Signing
33-
uses: azure/trusted-signing-action@v0
34-
with:
35-
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
36-
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
37-
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
38-
endpoint: https://eus.codesigning.azure.net/
39-
trusted-signing-account-name: zeroc
40-
certificate-profile-name: zeroc-ice
41-
files-folder: ./cpp/bin
42-
files-folder-recurse: true
43-
files-folder-filter: exe,dll
44-
file-digest: SHA256
45-
timestamp-rfc3161: http://timestamp.acs.microsoft.com
46-
timestamp-digest: SHA256
32+
- name: Download C++ Binaries
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
run: |
36+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-x64-Release-build --dir cpp
37+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-x64-Debug-build --dir cpp
38+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-Win32-Release-build --dir cpp
39+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-Win32-Debug-build --dir cpp
40+
# Download Slice Tools (We only need the Release x64 build)
41+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-slice-tools `
42+
--dir cpp/tools/ZeroC.Ice.Slice.Tools.Cpp/bin
4743
4844
- name: Ice Package Version
4945
if: ${{ inputs.ice_version != '' }}
@@ -61,10 +57,3 @@ jobs:
6157
name: windows-cpp-nuget-packages
6258
path: |
6359
cpp/msbuild/ZeroC.Ice.Cpp/*.nupkg
64-
65-
- name: Upload C++ Binaries
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: windows-cpp-binaries
69-
path: |
70-
cpp/bin/x64/Release/
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "Build C++ Windows Binaries"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ice_version:
7+
required: false
8+
type: string
9+
workflow_dispatch:
10+
inputs:
11+
ice_version:
12+
description: "The Ice version to build"
13+
required: false
14+
15+
jobs:
16+
build-cpp-windows-binaries:
17+
runs-on: windows-2022
18+
strategy:
19+
matrix:
20+
platform: [x64, Win32]
21+
configuration: [Release, Debug]
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup C++
27+
uses: ./.github/actions/setup-cpp
28+
29+
- name: Build C++ Binaries
30+
run: |
31+
msbuild /m ice.proj /t:BuildDist /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
32+
working-directory: cpp/msbuild
33+
34+
- name: Sign C++ Binaries with Trusted Signing
35+
uses: azure/trusted-signing-action@v0
36+
with:
37+
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
38+
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
39+
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
40+
endpoint: https://eus.codesigning.azure.net/
41+
trusted-signing-account-name: zeroc
42+
certificate-profile-name: zeroc-ice
43+
files-folder: ./cpp/bin/${{ matrix.platform }}/${{ matrix.configuration }}
44+
files-folder-filter: exe,dll
45+
file-digest: SHA256
46+
timestamp-rfc3161: http://timestamp.acs.microsoft.com
47+
timestamp-digest: SHA256
48+
49+
- name: Upload C++ Build
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: windows-cpp-${{ matrix.platform }}-${{ matrix.configuration }}-build
53+
path: |
54+
cpp/bin/${{ matrix.platform }}/${{ matrix.configuration }}/
55+
cpp/lib/${{ matrix.platform }}/${{ matrix.configuration }}/
56+
cpp/include/generated/${{ matrix.platform }}/${{ matrix.configuration }}/
57+
cpp/src/**/msbuild/**/${{ matrix.platform }}/${{ matrix.configuration }}/*.cpp
58+
cpp/src/**/msbuild/**/${{ matrix.platform }}/${{ matrix.configuration }}/*.h
59+
60+
- name: Upload C++ Slice Tools
61+
uses: actions/upload-artifact@v4
62+
# We only need to upload the Slice Tools once (Release x64 build) which are included in the Nuget packages
63+
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }}
64+
with:
65+
name: windows-cpp-slice-tools
66+
path: |
67+
cpp/tools/ZeroC.Ice.Slice.Tools.Cpp/bin

.github/workflows/build-release.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,35 @@ jobs:
159159
ice_version: ${{ needs.set-version.outputs.rpm_version }}
160160
secrets: inherit
161161

162+
build-cpp-windows-binaries:
163+
name: Build C++ Windows Binaries
164+
uses: ./.github/workflows/build-cpp-windows-binaries.yml
165+
needs: set-version
166+
with:
167+
ice_version: ${{ needs.set-version.outputs.semver_version }}
168+
secrets: inherit
169+
170+
build-symbols-sources-store:
171+
name: Build Symbols and Sources Store
172+
uses: ./.github/workflows/build-symbols-sources-store.yml
173+
needs:
174+
- set-version
175+
- build-cpp-windows-binaries
176+
with:
177+
ice_version: ${{ needs.set-version.outputs.semver_version }}
178+
channel: ${{ inputs.channel }}
179+
run_id: ${{ github.run_id }}
180+
secrets: inherit
181+
162182
build-cpp-nuget-packages:
163183
name: Build C++ NuGet Packages
164184
uses: ./.github/workflows/build-cpp-nuget-packages.yml
165-
needs: set-version
185+
needs:
186+
- set-version
187+
- build-cpp-windows-binaries
166188
with:
167189
ice_version: ${{ needs.set-version.outputs.semver_version }}
190+
run_id: ${{ github.run_id }}
168191
secrets: inherit
169192

170193
build-icegridgui-jar:
@@ -180,7 +203,7 @@ jobs:
180203
uses: ./.github/workflows/build-windows-msi.yml
181204
needs:
182205
- set-version
183-
- build-cpp-nuget-packages
206+
- build-cpp-windows-binaries
184207
- build-icegridgui-jar
185208
with:
186209
ice_version: ${{ needs.set-version.outputs.semver_version }}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: "Build Symbols and Sources Store"
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
ice_version:
7+
required: true
8+
type: string
9+
channel:
10+
required: true
11+
type: string
12+
run_id:
13+
description: "The run ID to use for downloading artifacts"
14+
required: true
15+
type: string
16+
workflow_dispatch:
17+
inputs:
18+
ice_version:
19+
description: "The Ice version (e.g., 3.8.0)"
20+
required: true
21+
channel:
22+
description: "Release channel (e.g., 3.8, nightly)"
23+
required: true
24+
default: "nightly"
25+
run_id:
26+
description: "The run ID of a successful build-cpp-windows-binaries workflow run"
27+
required: true
28+
29+
jobs:
30+
build-symbols-sources-store:
31+
runs-on: windows-2022
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Python
37+
uses: ./.github/actions/setup-python
38+
39+
- name: Install Windows Debug Tools
40+
uses: ./.github/actions/install-windows-debug-tools
41+
42+
- name: Download C++ Windows Binaries
43+
env:
44+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: |
46+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-x64-Release-build --dir cpp
47+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-x64-Debug-build --dir cpp
48+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-Win32-Release-build --dir cpp
49+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-Win32-Debug-build --dir cpp
50+
51+
- name: Compute Source Base URL
52+
id: source-url
53+
run: |
54+
if ("${{ inputs.channel }}" -eq "nightly") {
55+
$url = "https://download.zeroc.com/ice/nightly/sources/"
56+
} else {
57+
$url = "https://symbols.zeroc.com/sources/ice/"
58+
}
59+
echo "source_base_url=$url" >> $env:GITHUB_OUTPUT
60+
shell: pwsh
61+
62+
- name: Index PDBs and Sources
63+
run: |
64+
python packaging/release/index-ice-pdb-sources.py `
65+
--source-dir ${{ github.workspace }} `
66+
--version ${{ inputs.ice_version }} `
67+
--source-base-url ${{ steps.source-url.outputs.source_base_url }} `
68+
--output-dir ${{ github.workspace }}/symbols-sources
69+
70+
- name: Create Symbols Store
71+
run: |
72+
symstore add /3 /r /t "Ice for C++" `
73+
/v "${{ inputs.ice_version }}" `
74+
/s "${{ github.workspace }}/symbols-sources/symbols/${{ inputs.ice_version }}/" `
75+
/f "${{ github.workspace }}/symbols-sources/pdbs/${{ inputs.ice_version }}/" `
76+
/compress
77+
78+
- name: Upload Symbols and Sources
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: windows-symbols-sources
82+
path: ${{ github.workspace }}/symbols-sources/

.github/workflows/build-windows-msi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
env:
3434
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3535
run: |
36-
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-binaries --dir cpp/bin/x64/Release
36+
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name windows-cpp-x64-Release-build --dir cpp
3737
gh run download "${{ inputs.run_id }}" --repo ${{ github.repository }} --name icegridgui-jar --dir java/lib
3838
3939
# MSI packaging depends on VCInstallDir to locate The C++ merge modules

.github/workflows/publish-release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ on:
2121
type: string
2222

2323
jobs:
24-
2524
publish-brew-packages:
2625
uses: ./.github/workflows/publish-brew-packages.yml
2726
with:
@@ -106,6 +105,13 @@ jobs:
106105
run_id: ${{ inputs.run_id }}
107106
secrets: inherit
108107

108+
publish-symbols-sources:
109+
uses: ./.github/workflows/publish-symbols-sources.yml
110+
with:
111+
channel: ${{ inputs.channel }}
112+
run_id: ${{ inputs.run_id }}
113+
secrets: inherit
114+
109115
invalidate-cloudfront-cache:
110116
runs-on: ubuntu-24.04
111117
needs:
@@ -121,6 +127,7 @@ jobs:
121127
- publish-rpm-packages
122128
- publish-swift-packages
123129
- publish-xcframework-packages
130+
- publish-symbols-sources
124131
steps:
125132
- name: Invalidate CloudFront Cache
126133
run: |
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Publish Symbols and Sources"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
channel:
7+
description: "The channel to publish to (e.g., 3.8, nightly)"
8+
required: true
9+
run_id:
10+
description: "The run ID to use for downloading artifacts"
11+
required: true
12+
workflow_call:
13+
inputs:
14+
channel:
15+
required: true
16+
type: string
17+
run_id:
18+
required: true
19+
type: string
20+
21+
jobs:
22+
publish-symbols-sources:
23+
name: "Publish Symbols and Sources"
24+
if: ${{ inputs.channel == 'nightly' }}
25+
runs-on: ubuntu-24.04
26+
steps:
27+
- name: Download Symbols and Sources artifacts
28+
env:
29+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
RUN_ID: ${{ inputs.run_id }}
31+
run: |
32+
mkdir -p staging
33+
gh run download "$RUN_ID" --repo zeroc-ice/ice --pattern "windows-symbols-sources" --dir staging
34+
35+
- name: Publish Symbols and Sources
36+
run: |
37+
# Upload sources to S3 (version is already in the directory structure)
38+
aws s3 sync "staging/windows-symbols-sources/sources/" "s3://zeroc-downloads/ice/nightly/sources/"
39+
# Upload symbol store to S3
40+
aws s3 sync "staging/windows-symbols-sources/symbols/" "s3://zeroc-downloads/ice/nightly/symbols/"
41+
env:
42+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
43+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.github/workflows/upload-release-assets.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
gh run download "$RUN_ID" --repo zeroc-ice/ice --pattern "pip-packages-*" --dir staging
6060
gh run download "$RUN_ID" --repo zeroc-ice/ice --pattern "rpm-packages-*" --dir staging
6161
gh run download "$RUN_ID" --repo zeroc-ice/ice --pattern "icegridgui-jar" --dir staging
62+
gh run download "$RUN_ID" --repo zeroc-ice/ice --pattern "windows-symbols-sources" --dir staging
6263
6364
- name: Download artifacts for Homebrew Bottle
6465
# Homebrew bottles are only built for nightly releases

cpp/msbuild/ice.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
</Target>
118118

119119
<!-- Create nuget packages -->
120-
<Target Name="Pack">
120+
<Target Name="Pack" DependsOnTargets="GetNuGet">
121121
<RemoveDir Directories="ZeroC.Ice.Cpp" />
122122

123123
<MSBuild Projects="ice.nuget.targets"

0 commit comments

Comments
 (0)