mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 20:58:14 -05:00
Add CGO for Mac
This commit is contained in:
parent
868d9d58cc
commit
c8d1080131
2
.github/workflows/agent.yml
vendored
2
.github/workflows/agent.yml
vendored
@ -8,6 +8,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: goreleaser/goreleaser-cross
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
with:
|
with:
|
||||||
|
@ -2,14 +2,14 @@ before:
|
|||||||
hooks:
|
hooks:
|
||||||
- go mod tidy -v
|
- go mod tidy -v
|
||||||
builds:
|
builds:
|
||||||
- env:
|
- id: universal
|
||||||
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
ldflags:
|
ldflags:
|
||||||
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}}
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}}
|
||||||
goos:
|
goos:
|
||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
- darwin
|
|
||||||
goarch:
|
goarch:
|
||||||
- arm
|
- arm
|
||||||
- arm64
|
- arm64
|
||||||
@ -28,6 +28,32 @@ builds:
|
|||||||
goarch: arm64
|
goarch: arm64
|
||||||
main: ./cmd/agent
|
main: ./cmd/agent
|
||||||
binary: nezha-agent
|
binary: nezha-agent
|
||||||
|
- id: darwin-amd64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=o64-clang
|
||||||
|
- CXX=o64-clang++
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}}
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
main: ./cmd/agent
|
||||||
|
binary: nezha-agent
|
||||||
|
- id: darwin-arm64
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
- CC=oa64-clang
|
||||||
|
- CXX=oa64-clang++
|
||||||
|
ldflags:
|
||||||
|
- -s -w -X main.version={{.Version}} -X main.arch={{.Arch}}
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- arm64
|
||||||
|
main: ./cmd/agent
|
||||||
|
binary: nezha-agent
|
||||||
universal_binaries:
|
universal_binaries:
|
||||||
- name_template: "nezha-agent"
|
- name_template: "nezha-agent"
|
||||||
replace: false
|
replace: false
|
||||||
|
Loading…
Reference in New Issue
Block a user