83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
version: 2
|
|
|
|
before:
|
|
hooks:
|
|
- go mod tidy
|
|
- go get golang.org/x/tools/cmd/stringer@latest
|
|
- go generate
|
|
|
|
builds:
|
|
- id: linux-arm64
|
|
main: ./
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- arm64
|
|
env:
|
|
- CGO_ENABLED=1
|
|
- CC=aarch64-linux-gnu-gcc
|
|
- CXX=aarch64-linux-gnu-g++
|
|
- CGO_CFLAGS=--sysroot=/sysroot/linux_arm64
|
|
- CGO_LDFLAGS=--sysroot=/sysroot/linux_arm64 -lresolv
|
|
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux_arm64
|
|
- PKG_CONFIG_PATH=/sysroot/linux_arm64/opt/vc/lib/pkgconfig:/sysroot/linux_arm64/usr/lib/aarch64-linux-gnu/pkgconfig:/sysroot/linux_arm64/usr/lib/pkgconfig:/sysroot/linux_arm64/usr/local/lib/pkgconfig
|
|
flags:
|
|
- -mod=readonly
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}}
|
|
- id: linux-amd64
|
|
main: ./
|
|
goos:
|
|
- linux
|
|
goarch:
|
|
- amd64
|
|
env:
|
|
- CGO_ENABLED=1
|
|
- CC=x86_64-linux-gnu-gcc
|
|
- CXX=x86_64-linux-gnu-g++
|
|
- CGO_CFLAGS=--sysroot=/sysroot/linux_amd64
|
|
- CGO_LDFLAGS=--sysroot=/sysroot/linux_amd64 -lresolv
|
|
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux_amd64
|
|
- PKG_CONFIG_PATH=/sysroot/linux_amd64/opt/vc/lib/pkgconfig:/sysroot/linux_amd64/usr/lib/x86_64-linux-gnu/pkgconfig:/sysroot/linux_amd64/usr/lib/pkgconfig:/sysroot/linux_amd64/usr/local/lib/pkgconfig
|
|
flags:
|
|
- -mod=readonly
|
|
ldflags:
|
|
- -s -w -X main.version={{.Version}}
|
|
- id: windows-x64
|
|
main: ./
|
|
goos:
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
ldflags: -buildmode=exe
|
|
env:
|
|
- CGO_ENABLED=1
|
|
- CC=x86_64-w64-mingw32-gcc
|
|
- CXX=x86_64-w64-mingw32-g++
|
|
|
|
archives:
|
|
- id: standard
|
|
format: tar.gz
|
|
builds:
|
|
- linux-arm64
|
|
- linux-amd64
|
|
name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
|
|
wrap_in_directory: true
|
|
- id: windows-x64
|
|
format: zip
|
|
builds:
|
|
- windows-x64
|
|
name_template: "{{ .ProjectName }}-{{ .Version }}.{{ .Os }}-{{ .Arch }}"
|
|
wrap_in_directory: false
|
|
files:
|
|
- LICENSE.txt
|
|
- README.md
|
|
- src: wintun/bin/amd64/wintun.dll
|
|
dst: wintun.dll
|
|
- src: wintun/LICENSE.txt
|
|
dst: wintun-LICENSE.txt
|
|
|
|
|
|
checksum:
|
|
name_template: "checksums.txt"
|