|
|
@@ -36,6 +36,8 @@ jobs:
|
|
|
goos: dragonfly
|
|
|
- goarch: 386
|
|
|
goos: darwin
|
|
|
+ - goarch: amd64
|
|
|
+ goos: linux
|
|
|
include:
|
|
|
# BEGIN Linux ARM 5 6 7
|
|
|
- goos: linux
|
|
|
@@ -95,6 +97,15 @@ jobs:
|
|
|
goarch: mipsle
|
|
|
- goos: linux
|
|
|
goarch: mips
|
|
|
+ - goos: linux
|
|
|
+ goarch: arm64
|
|
|
+ pie: pie
|
|
|
+ - goos: linux
|
|
|
+ goarch: amd64
|
|
|
+ pie: pie
|
|
|
+ - goos: linux
|
|
|
+ goarch: amd64
|
|
|
+ pie:
|
|
|
# END MIPS
|
|
|
# END Other architectures
|
|
|
fail-fast: false
|
|
|
@@ -104,6 +115,7 @@ jobs:
|
|
|
GOOS: ${{ matrix.goos }}
|
|
|
GOARCH: ${{ matrix.goarch }}
|
|
|
GOARM: ${{ matrix.goarm }}
|
|
|
+ PIE_ENABLED: ${{ matrix.pie }}
|
|
|
CGO_ENABLED: 0
|
|
|
|
|
|
steps:
|
|
|
@@ -133,15 +145,16 @@ jobs:
|
|
|
mkdir -p build_assets
|
|
|
EXTRA_ARG=""
|
|
|
case "$GOOS-$GOARCH" in
|
|
|
- "linux-386")
|
|
|
- ;&
|
|
|
"linux-amd64")
|
|
|
;&
|
|
|
"linux-arm64")
|
|
|
- EXTRA_ARG=EXTRA_ARG+"-buildmode=pie"
|
|
|
+ if [ -z $PIE_ENABLED ]
|
|
|
+ then
|
|
|
+ EXTRA_ARG=$EXTRA_ARG" -buildmode=pie"
|
|
|
+ fi
|
|
|
;;
|
|
|
esac
|
|
|
- go build -v -o build_assets/v2ray -trimpath -ldflags "-s -w -buildid=" ./main
|
|
|
+ go build $EXTRA_ARG -v -o build_assets/v2ray -trimpath -ldflags "-s -w -buildid=" ./main
|
|
|
|
|
|
- name: Rename Windows V2Ray
|
|
|
if: matrix.goos == 'windows'
|