aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/binary_test.yml
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2021-08-27 20:00:14 -0700
committerGitHub <noreply@github.com>2021-08-27 20:00:14 -0700
commitca80199ccd97aec58580b35fdfb3cdbcb35c91e9 (patch)
treea19b4d296f8fa60c708502350ca2472c6faca87c /.github/workflows/binary_test.yml
parentdded814a6298ede88b7f1eb2e1d630c94934e0b1 (diff)
parent7b56a6400d12ae0f1693d0a0b2d46128544cdca4 (diff)
downloadseaweedfs-ca80199ccd97aec58580b35fdfb3cdbcb35c91e9.tar.xz
seaweedfs-ca80199ccd97aec58580b35fdfb3cdbcb35c91e9.zip
Merge pull request #2288 from logband/master
feature(cross-platform): add multi-arch support to release
Diffstat (limited to '.github/workflows/binary_test.yml')
-rw-r--r--.github/workflows/binary_test.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml
new file mode 100644
index 000000000..288abc848
--- /dev/null
+++ b/.github/workflows/binary_test.yml
@@ -0,0 +1,51 @@
+name: Cross-platform binary build test
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch: []
+
+jobs:
+
+ build:
+ name: Build
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ goos: [linux, windows, darwin, freebsd, netbsd, openbsd]
+ goarch: [amd64, arm, arm64, 386]
+ exclude:
+ - goarch: arm
+ goos: darwin
+ - goarch: 386
+ goos: darwin
+ - goarch: arm
+ goos: windows
+ - goarch: arm64
+ goos: windows
+
+ concurrency:
+ group: ${{ github.head_ref }}/binary_test/${{ matrix.goos }}/${{ matrix.goarch }}
+ cancel-in-progress: true
+
+ steps:
+
+ - name: Set up Go 1.x
+ uses: actions/setup-go@v2
+ with:
+ go-version: ^1.13
+ id: go
+
+ - name: Check out code into the Go module directory
+ uses: actions/checkout@v2
+
+ - name: Get dependencies
+ run: |
+ cd weed; go get -v -t -d ./...
+ if [ -f Gopkg.toml ]; then
+ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+ dep ensure
+ fi
+
+ - name: Build
+ run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v .