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.

49 lines
1.2 KiB

5 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
4 years ago
  1. name: Go
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. name: Build
  10. runs-on: ubuntu-latest
  11. steps:
  12. - name: Set up Go 1.x
  13. uses: actions/setup-go@v2
  14. with:
  15. go-version: ^1.15
  16. id: go
  17. - name: Check out code into the Go module directory
  18. uses: actions/checkout@v2
  19. - name: Get dependencies
  20. run: |
  21. cd weed; go get -v -t -d ./...
  22. if [ -f Gopkg.toml ]; then
  23. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  24. dep ensure
  25. fi
  26. - name: Build
  27. run: cd weed; go build -v .
  28. - name: Test
  29. run: cd weed; go test -v ./...
  30. - name: Go Release Binaries
  31. uses: wangyoucao577/go-release-action@v1.8
  32. with:
  33. github_token: ${{ secrets.GITHUB_TOKEN }}
  34. goos: linux # default is
  35. goarch: amd64 # default is
  36. build_flags: -tags 5BytesOffset # optional, default is
  37. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  38. # Where to run `go build .`
  39. project_path: weed
  40. binary_name: weed-large-disk