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.

50 lines
1.2 KiB

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