You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.2 KiB

  1. name: Cross-platform binary build test
  2. on:
  3. push:
  4. pull_request:
  5. workflow_dispatch: []
  6. jobs:
  7. build:
  8. name: Build
  9. runs-on: ubuntu-latest
  10. strategy:
  11. matrix:
  12. goos: [linux, windows, darwin, freebsd, netbsd, openbsd]
  13. goarch: [amd64, arm, arm64, 386]
  14. exclude:
  15. - goarch: arm
  16. goos: darwin
  17. - goarch: 386
  18. goos: darwin
  19. - goarch: arm
  20. goos: windows
  21. - goarch: arm64
  22. goos: windows
  23. concurrency:
  24. group: ${{ github.head_ref }}/binary_test/${{ matrix.goos }}/${{ matrix.goarch }}
  25. cancel-in-progress: true
  26. steps:
  27. - name: Set up Go 1.x
  28. uses: actions/setup-go@v2
  29. with:
  30. go-version: ^1.13
  31. id: go
  32. - name: Check out code into the Go module directory
  33. uses: actions/checkout@v2
  34. - name: Get dependencies
  35. run: |
  36. cd weed; go get -v -t -d ./...
  37. if [ -f Gopkg.toml ]; then
  38. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  39. dep ensure
  40. fi
  41. - name: Build
  42. run: cd weed; GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -v .