Skip to content

Commit ac732af

Browse files
committed
build: try fix CGO_ENABLE on macOS
1 parent 2c09373 commit ac732af

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
if: ${{ matrix.os == 'ubuntu-latest' && matrix.GOARCH == 'amd64' }}
9797
env:
9898
GOARCH: ${{ matrix.GOARCH }}
99+
CGO_ENABLE: 1
99100
run: |
100101
go build -buildmode=c-shared -o go-judge.so ./cmd/go-judge-ffi
101102
- name: Upload go-judge on linux
@@ -127,12 +128,14 @@ jobs:
127128
if: ${{ matrix.os == 'windows-latest' }}
128129
env:
129130
GOARCH: ${{ matrix.GOARCH }}
131+
CGO_ENABLE: 0
130132
run: |
131133
go build -tags grpcnotrace,nomsgpack -o go-judge.exe ./cmd/go-judge
132134
- name: Build shared object on Windows
133135
if: ${{ matrix.os == 'windows-latest' }}
134136
env:
135137
GOARCH: ${{ matrix.GOARCH }}
138+
CGO_ENABLE: 1
136139
run: |
137140
go build -buildmode=c-shared -o go-judge.dll ./cmd/go-judge-ffi
138141
- name: Upload go-judge.exe on Windows
@@ -152,13 +155,15 @@ jobs:
152155
if: ${{ matrix.os == 'macos-latest' }}
153156
env:
154157
GOARCH: ${{ matrix.GOARCH }}
158+
CGO_ENABLE: 0
155159
run: |
156160
go build -tags grpcnotrace,nomsgpack -o go-judge ./cmd/go-judge
157161
go build -o go-judge-shell ./cmd/go-judge-shell
158162
- name: Build shared object on macOS
159163
if: ${{ matrix.os == 'macos-latest' && matrix.GOARCH == 'amd64' }}
160164
env:
161165
GOARCH: ${{ matrix.GOARCH }}
166+
CGO_ENABLE: 1
162167
run: |
163168
go build -buildmode=c-shared -o go-judge.dylib ./cmd/go-judge-ffi
164169
- name: Upload go-judge on macOS

0 commit comments

Comments
 (0)