Skip to content

Commit 3f8ad4c

Browse files
steinbeckclaude
andcommitted
fix: statically link zlib on Windows to eliminate zlib1.dll dependency
Windows users reported needing zlib1.dll bundled with surge.exe. CI tests passed because MSYS2 provides the DLL at runtime, but end users without MSYS2 don't have it. Adding -static to CCOPT on Windows produces a self-contained binary with no external DLL dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7881c63 commit 3f8ad4c

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ jobs:
191191
make surge \
192192
NAUTY=$(cygpath -u "$GITHUB_WORKSPACE")/nauty2_9_3 \
193193
NAUTYLIB=$(cygpath -u "$GITHUB_WORKSPACE")/nauty2_9_3 \
194-
CCOPT="-O3"
194+
CCOPT="-O3 -static"
195195
196196
- name: Test surge
197197
working-directory: src

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,15 @@ jobs:
1313
- os: ubuntu-latest
1414
artifact: surge-linux-x86_64
1515
binary: surge
16+
ccopt: "-O3"
1617
- os: macos-14
1718
artifact: surge-macos-arm64
1819
binary: surge
20+
ccopt: "-O3"
1921
- os: windows-latest
2022
artifact: surge-windows-x86_64
2123
binary: surge.exe
24+
ccopt: "-O3 -static"
2225
runs-on: ${{ matrix.os }}
2326
defaults:
2427
run:
@@ -66,7 +69,7 @@ jobs:
6669
make surge \
6770
NAUTY=$(cygpath -u "$GITHUB_WORKSPACE" 2>/dev/null || echo "$GITHUB_WORKSPACE")/nauty2_9_3 \
6871
NAUTYLIB=$(cygpath -u "$GITHUB_WORKSPACE" 2>/dev/null || echo "$GITHUB_WORKSPACE")/nauty2_9_3 \
69-
CCOPT="-O3"
72+
CCOPT="${{ matrix.ccopt }}"
7073
7174
- name: Build surge (macOS)
7275
if: startsWith(matrix.os, 'macos')
@@ -75,7 +78,7 @@ jobs:
7578
make surge \
7679
NAUTY=$(brew --prefix nauty)/include/nauty \
7780
NAUTYLIB=$(brew --prefix nauty)/lib \
78-
CCOPT="-O3"
81+
CCOPT="${{ matrix.ccopt }}"
7982
8083
- name: Upload artifact
8184
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)