Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on cross compiling binary #13

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Binary
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
name: Build
strategy:
matrix:
operating-system:
- linux
arch:
- '386'
- 'amd64'
runs-on: ubuntu-latest
steps:
- name: Set up Go ${{ matrix.go-versions }}
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Install 32 bits libaries
if: ${{ matrix.arch }} == '386'
run: |
sudo apt-get update && sudo apt-get install gcc-multilib -y -q
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build Artifacts
run: |
go build -ldflags="-s -w"
env:
CGO_ENABLED: "1"
GOOS: ${{ matrix.operating-system }}
GOARCH: ${{ matrix.arch }}
windows:
name: Build
strategy:
matrix:
operating-system:
- windows
arch:
- '386'
- 'amd64'
runs-on: windows-latest
steps:
- name: Set up Go ${{ matrix.go-versions }}
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build Artifacts
run: |
go build -ldflags="-s -w"
env:
CGO_ENABLED: "1"
GOOS: ${{ matrix.operating-system }}
GOARCH: ${{ matrix.arch }}