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

5 years ago
4 years ago
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: create symlink
  18. run: sudo ln -f -s $GOROOT/bin/* /usr/bin/
  19. - name: Check out code into the Go module directory
  20. uses: actions/checkout@v2
  21. - name: Get dependencies
  22. run: |
  23. cd weed; go get -v -t -d ./...
  24. if [ -f Gopkg.toml ]; then
  25. curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  26. dep ensure
  27. fi
  28. - name: Build
  29. run: cd weed; go build -v .
  30. - name: Test
  31. run: cd weed; go test -v ./...
  32. - name: Go Release Binaries
  33. uses: wangyoucao577/go-release-action@v1.8
  34. with:
  35. github_token: ${{ secrets.GITHUB_TOKEN }}
  36. goos: linux # default is
  37. goarch: amd64 # default is
  38. build_flags: -tags 5BytesOffset # optional, default is
  39. ldflags: -extldflags -static -X github.com/chrislusf/seaweedfs/weed/util.COMMIT=${{github.sha}}
  40. # Where to run `go build .`
  41. project_path: weed
  42. binary_name: weed-large-disk