diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/binary_test.yml | 50 | ||||
| -rw-r--r-- | .github/workflows/cleanup.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/container_latest.yml | 13 | ||||
| -rw-r--r-- | .github/workflows/container_release.yml | 13 | ||||
| -rw-r--r-- | .github/workflows/container_test.yml | 53 | ||||
| -rw-r--r-- | .github/workflows/go.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 14 | ||||
| -rw-r--r-- | .github/workflows/release_binaries.yml | 16 |
8 files changed, 140 insertions, 27 deletions
diff --git a/.github/workflows/binary_test.yml b/.github/workflows/binary_test.yml new file mode 100644 index 000000000..8468555e3 --- /dev/null +++ b/.github/workflows/binary_test.yml @@ -0,0 +1,50 @@ +name: "go: test building cross-platform binary" + +on: + 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 . diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index 47a677e6d..34e3a481b 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -1,4 +1,4 @@ -name: Cleanup +name: "chore: cleanup" on: push: diff --git a/.github/workflows/container_latest.yml b/.github/workflows/container_latest.yml index e4b3c2a38..1b952ae87 100644 --- a/.github/workflows/container_latest.yml +++ b/.github/workflows/container_latest.yml @@ -1,4 +1,5 @@ -name: Build Latest Containers +name: "docker: build latest containers" + on: push: branches: @@ -8,6 +9,7 @@ on: jobs: build-latest: runs-on: [ubuntu-latest] + steps: - name: Checkout @@ -15,7 +17,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2 + uses: docker/metadata-action@v3 with: images: | chrislusf/seaweedfs @@ -55,12 +57,13 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64, linux/arm, linux/arm64, linux/386 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-dev: runs-on: [ubuntu-latest] + steps: - name: Checkout @@ -68,7 +71,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2 + uses: docker/metadata-action@v3 with: images: | chrislusf/seaweedfs @@ -109,6 +112,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64 + platforms: linux/amd64, linux/arm, linux/arm64, linux/386 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_release.yml b/.github/workflows/container_release.yml index 1ade0878e..789316df8 100644 --- a/.github/workflows/container_release.yml +++ b/.github/workflows/container_release.yml @@ -1,4 +1,5 @@ -name: Build Release Containers +name: "docker: build release containers" + on: push: tags: @@ -8,6 +9,7 @@ on: jobs: build-default: runs-on: [ubuntu-latest] + steps: - name: Checkout @@ -15,7 +17,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2 + uses: docker/metadata-action@v3 with: images: | chrislusf/seaweedfs @@ -58,11 +60,12 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build - platforms: linux/amd64 + platforms: linux/amd64, linux/arm, linux/arm64, linux/386 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} build-large: runs-on: [ubuntu-latest] + steps: - name: Checkout @@ -70,7 +73,7 @@ jobs: - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v2 + uses: docker/metadata-action@v3 with: images: | chrislusf/seaweedfs @@ -113,6 +116,6 @@ jobs: context: ./docker push: ${{ github.event_name != 'pull_request' }} file: ./docker/Dockerfile.go_build_large - platforms: linux/amd64 + platforms: linux/amd64, linux/arm, linux/arm64, linux/386 tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/container_test.yml b/.github/workflows/container_test.yml new file mode 100644 index 000000000..d86392af5 --- /dev/null +++ b/.github/workflows/container_test.yml @@ -0,0 +1,53 @@ +name: "docker: test building container images" + +on: + pull_request: + workflow_dispatch: [] + +concurrency: + group: ${{ github.head_ref }}/container_test + cancel-in-progress: true + +jobs: + build-test: + runs-on: [ubuntu-latest] + strategy: + matrix: + platform: [ linux ] + arch: [ amd64, arm, arm64, 386 ] + + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Docker meta + id: docker_meta + uses: docker/metadata-action@v3 + with: + images: | + chrislusf/seaweedfs + ghcr.io/chrislusf/seaweedfs + tags: | + type=raw,value=latest + labels: | + org.opencontainers.image.title=seaweedfs + org.opencontainers.image.vendor=Chris Lu + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + with: + buildkitd-flags: "--debug" + - + name: Build + uses: docker/build-push-action@v2 + with: + context: ./docker + push: false + file: ./docker/Dockerfile + platforms: ${{ matrix.platform }}/${{ matrix.arch }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index b2948a0b7..39b8347ac 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,4 +1,4 @@ -name: Go +name: "go: test building binary" on: push: @@ -6,6 +6,10 @@ on: pull_request: branches: [ master ] +concurrency: + group: ${{ github.head_ref }}/go + cancel-in-progress: true + jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 41ac40dc2..ac04a85dc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Build Dev Binaries +name: "go: build dev binaries" on: push: @@ -11,17 +11,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goos: [linux, windows, darwin, freebsd, netbsd, openbsd ] + goos: [linux, windows, darwin, freebsd, netbsd, openbsd] goarch: [amd64, arm, arm64, 386] exclude: - goarch: arm goos: darwin - goarch: 386 goos: darwin - - goarch: arm64 - goos: windows - goarch: arm goos: windows + - goarch: arm64 + goos: windows steps: @@ -37,9 +37,8 @@ jobs: run: echo BUILD_TIME=$(date -u +%Y%m%d-%H%M) >> ${GITHUB_ENV} - name: Go Release Binaries - uses: wangyoucao577/go-release-action@v1.17 + uses: wangyoucao577/go-release-action@v1.20 with: - goversion: 1.17 github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -54,9 +53,8 @@ jobs: asset_name: "weed-large-disk-${{ env.BUILD_TIME }}-${{ matrix.goos }}-${{ matrix.goarch }}" - name: Go Release Binaries - uses: wangyoucao577/go-release-action@v1.17 + uses: wangyoucao577/go-release-action@v1.20 with: - goversion: 1.17 github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} diff --git a/.github/workflows/release_binaries.yml b/.github/workflows/release_binaries.yml index ca3457c8b..678f107d4 100644 --- a/.github/workflows/release_binaries.yml +++ b/.github/workflows/release_binaries.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: Build Versioned Releases +name: "go: build versioned binaries" on: release: @@ -15,22 +15,25 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - goos: [linux, windows, darwin, freebsd ] - goarch: [amd64, arm] + 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 # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - name: Go Release Binaries - uses: wangyoucao577/go-release-action@v1.19 + uses: wangyoucao577/go-release-action@v1.20 with: - goversion: 1.17 github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} @@ -43,9 +46,8 @@ jobs: binary_name: weed asset_name: "${{ matrix.goos }}_${{ matrix.goarch }}" - name: Go Release Large Disk Binaries - uses: wangyoucao577/go-release-action@v1.19 + uses: wangyoucao577/go-release-action@v1.20 with: - goversion: 1.17 github_token: ${{ secrets.GITHUB_TOKEN }} goos: ${{ matrix.goos }} goarch: ${{ matrix.goarch }} |
