build: remove dynamic library on macOS

This commit is contained in:
criyle 2024-05-04 01:41:34 +00:00
parent ac732af3c9
commit a8d50dba48

View File

@ -159,13 +159,13 @@ jobs:
run: | run: |
go build -tags grpcnotrace,nomsgpack -o go-judge ./cmd/go-judge go build -tags grpcnotrace,nomsgpack -o go-judge ./cmd/go-judge
go build -o go-judge-shell ./cmd/go-judge-shell go build -o go-judge-shell ./cmd/go-judge-shell
- name: Build shared object on macOS # - name: Build shared object on macOS
if: ${{ matrix.os == 'macos-latest' && matrix.GOARCH == 'amd64' }} # if: ${{ matrix.os == 'macos-latest' && matrix.GOARCH == 'amd64' }}
env: # env:
GOARCH: ${{ matrix.GOARCH }} # GOARCH: ${{ matrix.GOARCH }}
CGO_ENABLE: 1 # CGO_ENABLE: 1
run: | # run: |
go build -buildmode=c-shared -o go-judge.dylib ./cmd/go-judge-ffi # go build -buildmode=c-shared -o go-judge.dylib ./cmd/go-judge-ffi
- name: Upload go-judge on macOS - name: Upload go-judge on macOS
if: ${{ matrix.os == 'macos-latest' }} if: ${{ matrix.os == 'macos-latest' }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@ -178,9 +178,9 @@ jobs:
with: with:
name: go-judge-shell-MacOS-${{ matrix.GOARCH }} name: go-judge-shell-MacOS-${{ matrix.GOARCH }}
path: go-judge-shell path: go-judge-shell
- name: Upload go-judge.dylib on macOS # - name: Upload go-judge.dylib on macOS
if: ${{ matrix.os == 'macos-latest' && matrix.GOARCH == 'amd64' }} # if: ${{ matrix.os == 'macos-latest' && matrix.GOARCH == 'amd64' }}
uses: actions/upload-artifact@v4 # uses: actions/upload-artifact@v4
with: # with:
name: go-judge-${{ matrix.GOARCH }}.dylib # name: go-judge-${{ matrix.GOARCH }}.dylib
path: go-judge.dylib # path: go-judge.dylib