Skip to content

Commit ade2937

Browse files
committed
ci(session-e2e): build Windows arm with zig cgo compiler
windows-latest's default mingw GCC can't compile pkg/apm/webrtc's MSVC SEH (__try/__except). The repo only builds Windows via zig/clang (.goreleaser.yaml), so install zig and point CC/CXX at it for the Windows arm.
1 parent 38775be commit ade2937

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/session-e2e.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ jobs:
5858
if: matrix.os == 'ubuntu-latest'
5959
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
6060

61+
# pkg/apm/webrtc's C++ uses MSVC SEH (__try/__except), which the runner's
62+
# default mingw GCC can't compile. The repo only ever builds Windows with
63+
# zig (clang) -- see .goreleaser.yaml -- so use it as the cgo compiler here
64+
# too. Version pinned to match build.yaml's cross-build job.
65+
- name: Set up Zig (Windows)
66+
if: matrix.os == 'windows-latest'
67+
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2
68+
with:
69+
version: 0.14.1
70+
71+
- name: Use Zig as cgo compiler (Windows)
72+
if: matrix.os == 'windows-latest'
73+
shell: bash
74+
run: |
75+
echo "CC=zig cc -target x86_64-windows-gnu" >> "$GITHUB_ENV"
76+
echo "CXX=zig c++ -target x86_64-windows-gnu" >> "$GITHUB_ENV"
77+
6178
- name: Set up Go
6279
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
6380
with:

0 commit comments

Comments
 (0)