new: add macos, x86 build
This commit is contained in:
14
.github/workflows/release.yml
vendored
14
.github/workflows/release.yml
vendored
@@ -14,9 +14,12 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
job:
|
job:
|
||||||
- { os: "ubuntu-latest", target: "android" }
|
- { os: "ubuntu-latest", target: "android"}
|
||||||
- { os: "ubuntu-latest", target: "windows-amd64", aarch: "x64" }
|
- { os: "ubuntu-latest", target: "linux-386", aarch: 'x86'}
|
||||||
- { os: "ubuntu-latest", target: "linux-amd64", aarch: "x64" }
|
- { os: "ubuntu-latest", target: "linux-amd64", aarch: 'x64'}
|
||||||
|
- { os: "ubuntu-latest", target: "windows-386", aarch: 'x86'}
|
||||||
|
- { os: "ubuntu-latest", target: "windows-amd64", aarch: 'x64' }
|
||||||
|
- { os: "macos-11", target: "macos-universal" }
|
||||||
runs-on: ${{ matrix.job.os }}
|
runs-on: ${{ matrix.job.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -63,6 +66,11 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
platform: ${{ matrix.job.aarch }}
|
platform: ${{ matrix.job.aarch }}
|
||||||
|
|
||||||
|
- name: Set up macos
|
||||||
|
if: startsWith(matrix.job.target,'macos')
|
||||||
|
run: |
|
||||||
|
brew install create-dmg tree coreutils
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make -j$(($(nproc) + 1)) ${{ matrix.job.target }}
|
run: make -j$(($(nproc) + 1)) ${{ matrix.job.target }}
|
||||||
|
|
||||||
|
|||||||
16
Makefile
16
Makefile
@@ -17,8 +17,24 @@ android:
|
|||||||
windows-amd64:
|
windows-amd64:
|
||||||
env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.dll ./custom
|
env GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.dll ./custom
|
||||||
|
|
||||||
|
windows-386:
|
||||||
|
env GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.dll ./custom
|
||||||
|
|
||||||
linux-amd64:
|
linux-amd64:
|
||||||
env GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.so ./custom
|
env GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.so ./custom
|
||||||
|
|
||||||
|
linux-386:
|
||||||
|
env GOOS=linux GOARCH=386 $(GOBUILD) -o $(BINDIR)/$(NAME)-$@.so ./custom
|
||||||
|
|
||||||
|
macos-amd64:
|
||||||
|
env GOOS=darwin GOARCH=amd64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags with_gvisor,with_lwip -buildmode=c-shared -o $(BINDIR)/$(NAME)-$@.dylib ./custom
|
||||||
|
macos-arm64:
|
||||||
|
env GOOS=darwin GOARCH=arm64 CGO_CFLAGS="-mmacosx-version-min=10.11" CGO_LDFLAGS="-mmacosx-version-min=10.11" CGO_ENABLED=1 go build -trimpath -tags with_gvisor,with_lwip -buildmode=c-shared -o $(BINDIR)/$(NAME)-$@.dylib ./custom
|
||||||
|
macos-combine:
|
||||||
|
lipo -create $(BINDIR)/$(NAME)-macos-amd64.dylib $(BINDIR)/$(NAME)-macos-arm64.dylib -output $(BINDIR)/$(NAME)-$@.dylib
|
||||||
|
|
||||||
|
macos-universal: macos-amd64 macos-arm64 macos-combine
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm $(BINDIR)/*
|
rm $(BINDIR)/*
|
||||||
Reference in New Issue
Block a user