attempt to use GH actions and xgo to build binaries

pull/604/head
hunterlong 2020-05-20 17:48:16 -07:00
parent 0ad1f82613
commit e25e55bde2
1 changed files with 52 additions and 18 deletions

View File

@ -322,13 +322,33 @@ jobs:
uses: actions/download-artifact@v1
with:
name: static-rice-box
path: /home/runner/work/statping/statping/source
path: ./source
- name: Build Linux Binaries
env:
VERSION: ${{ env.VERSION }}
COMMIT: $GITHUB_SHA
run: make build-linux build-linux-arm
- name: Build Linux XGO
uses: crazy-max/ghaction-xgo@v1
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: statping
targets: linux/386,linux/amd64
v: true
x: false
buildmode: default
ldflags: -s -w -X main.VERSION=$VERSION
- name: Build Linux ARM XGO
uses: crazy-max/ghaction-xgo@v1
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: statping
targets: linux/arm-7,linux/arm64
v: true
x: false
buildmode: default
ldflags: -s -w -extldflags -static -X main.VERSION=$VERSION
- name: Upload Builds
uses: actions/upload-artifact@v1
@ -360,13 +380,20 @@ jobs:
uses: actions/download-artifact@v1
with:
name: static-rice-box
path: /home/runner/work/statping/statping/source
path: ./source
- name: Build Windows Binaries
env:
VERSION: ${{ env.VERSION }}
COMMIT: $GITHUB_SHA
run: make build-win
- name: Build Linux ARM XGO
uses: crazy-max/ghaction-xgo@v1
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: statping
targets: windows-6.0/386,windows-6.0/amd64
v: true
x: false
buildmode: default
ldflags: -s -w -X main.VERSION=$VERSION
- name: Upload Builds
uses: actions/upload-artifact@v1
@ -398,13 +425,20 @@ jobs:
uses: actions/download-artifact@v1
with:
name: static-rice-box
path: /home/runner/work/statping/statping/source
path: ./source
- name: Build MacOSX Binaries
env:
VERSION: ${{ env.VERSION }}
COMMIT: $GITHUB_SHA
run: make build-darwin
- name: Build MacOSX ARM XGO
uses: crazy-max/ghaction-xgo@v1
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: statping
targets: darwin/386,darwin/amd64
v: true
x: false
buildmode: default
ldflags: -s -w -X main.VERSION=$VERSION
- name: Upload Builds
uses: actions/upload-artifact@v1