Some checks failed
Go / build (.exe, 386, windows, windows-386) (push) Has been cancelled
Go / build (.exe, amd64, windows, windows-amd64) (push) Has been cancelled
Go / build (.exe, arm64, windows, windows-arm64) (push) Has been cancelled
Go / build (386, freebsd, freebsd-386) (push) Has been cancelled
Go / build (386, linux, linux-386) (push) Has been cancelled
Go / build (386, netbsd, netbsd-386) (push) Has been cancelled
Go / build (386, openbsd, openbsd-386) (push) Has been cancelled
Go / build (386, plan9, plan9-386) (push) Has been cancelled
Go / build (amd64, darwin, darwin-amd64) (push) Has been cancelled
Go / build (amd64, dragonfly, dragonfly-amd64) (push) Has been cancelled
Go / build (amd64, freebsd, freebsd-amd64) (push) Has been cancelled
Go / build (amd64, illumos, illumos-amd64) (push) Has been cancelled
Go / build (amd64, linux, linux-amd64) (push) Has been cancelled
Go / build (amd64, netbsd, netbsd-amd64) (push) Has been cancelled
Go / build (amd64, openbsd, openbsd-amd64) (push) Has been cancelled
Go / build (amd64, plan9, plan9-amd64) (push) Has been cancelled
Go / build (amd64, solaris, solaris-amd64) (push) Has been cancelled
Go / build (arm, 6, linux, linux-armv6) (push) Has been cancelled
Go / build (arm, 7, linux, linux-armv7) (push) Has been cancelled
Go / build (arm, freebsd, freebsd-arm) (push) Has been cancelled
Go / build (arm, netbsd, netbsd-arm) (push) Has been cancelled
Go / build (arm, openbsd, openbsd-arm) (push) Has been cancelled
Go / build (arm, plan9, plan9-arm) (push) Has been cancelled
Go / build (arm64, darwin, darwin-arm64) (push) Has been cancelled
Go / build (arm64, freebsd, freebsd-arm64) (push) Has been cancelled
Go / build (arm64, linux, linux-arm64) (push) Has been cancelled
Go / build (arm64, netbsd, netbsd-arm64) (push) Has been cancelled
Go / build (arm64, openbsd, openbsd-arm64) (push) Has been cancelled
Go / build (loong64, linux, linux-loong64) (push) Has been cancelled
Go / build (mips, linux, linux-mips) (push) Has been cancelled
Go / build (mips64, linux, linux-mips64) (push) Has been cancelled
Go / build (mips64le, linux, linux-mips64le) (push) Has been cancelled
Go / build (mipsle, linux, linux-mipsle) (push) Has been cancelled
Go / build (ppc64, aix, aix-ppc64) (push) Has been cancelled
Go / build (ppc64, linux, linux-ppc64) (push) Has been cancelled
Go / build (ppc64, openbsd, openbsd-ppc64) (push) Has been cancelled
Go / build (ppc64le, linux, linux-ppc64le) (push) Has been cancelled
Go / build (riscv64, freebsd, freebsd-riscv64) (push) Has been cancelled
Go / build (riscv64, linux, linux-riscv64) (push) Has been cancelled
Go / build (riscv64, openbsd, openbsd-riscv64) (push) Has been cancelled
Go / build (s390x, linux, linux-s390x) (push) Has been cancelled
Go / merge-artifacts (push) Has been cancelled
214 lines
5.5 KiB
YAML
214 lines
5.5 KiB
YAML
# This workflow will build a golang project
|
|
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
|
|
|
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ "master" ]
|
|
pull_request:
|
|
branches: [ "master" ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
# Linux builds
|
|
- goos: linux
|
|
goarch: amd64
|
|
name: linux-amd64
|
|
- goos: linux
|
|
goarch: arm64
|
|
name: linux-arm64
|
|
- goos: linux
|
|
goarch: arm
|
|
goarm: 7
|
|
name: linux-armv7
|
|
- goos: linux
|
|
goarch: arm
|
|
goarm: 6
|
|
name: linux-armv6
|
|
- goos: linux
|
|
goarch: 386
|
|
name: linux-386
|
|
- goos: linux
|
|
goarch: loong64
|
|
name: linux-loong64
|
|
- goos: linux
|
|
goarch: mips
|
|
name: linux-mips
|
|
- goos: linux
|
|
goarch: mips64
|
|
name: linux-mips64
|
|
- goos: linux
|
|
goarch: mips64le
|
|
name: linux-mips64le
|
|
- goos: linux
|
|
goarch: mipsle
|
|
name: linux-mipsle
|
|
- goos: linux
|
|
goarch: ppc64
|
|
name: linux-ppc64
|
|
- goos: linux
|
|
goarch: ppc64le
|
|
name: linux-ppc64le
|
|
- goos: linux
|
|
goarch: riscv64
|
|
name: linux-riscv64
|
|
- goos: linux
|
|
goarch: s390x
|
|
name: linux-s390x
|
|
|
|
# Windows builds
|
|
- goos: windows
|
|
goarch: amd64
|
|
name: windows-amd64
|
|
ext: .exe
|
|
- goos: windows
|
|
goarch: arm64
|
|
name: windows-arm64
|
|
ext: .exe
|
|
- goos: windows
|
|
goarch: 386
|
|
name: windows-386
|
|
ext: .exe
|
|
|
|
# macOS builds
|
|
- goos: darwin
|
|
goarch: amd64
|
|
name: darwin-amd64
|
|
- goos: darwin
|
|
goarch: arm64
|
|
name: darwin-arm64
|
|
|
|
# FreeBSD builds
|
|
- goos: freebsd
|
|
goarch: amd64
|
|
name: freebsd-amd64
|
|
- goos: freebsd
|
|
goarch: arm64
|
|
name: freebsd-arm64
|
|
- goos: freebsd
|
|
goarch: 386
|
|
name: freebsd-386
|
|
- goos: freebsd
|
|
goarch: arm
|
|
name: freebsd-arm
|
|
- goos: freebsd
|
|
goarch: riscv64
|
|
name: freebsd-riscv64
|
|
|
|
- goos: aix
|
|
goarch: ppc64
|
|
name: aix-ppc64
|
|
- goos: dragonfly
|
|
goarch: amd64
|
|
name: dragonfly-amd64
|
|
- goos: illumos
|
|
goarch: amd64
|
|
name: illumos-amd64
|
|
- goos: netbsd
|
|
goarch: 386
|
|
name: netbsd-386
|
|
- goos: netbsd
|
|
goarch: amd64
|
|
name: netbsd-amd64
|
|
- goos: netbsd
|
|
goarch: arm
|
|
name: netbsd-arm
|
|
- goos: netbsd
|
|
goarch: arm64
|
|
name: netbsd-arm64
|
|
- goos: openbsd
|
|
goarch: 386
|
|
name: openbsd-386
|
|
- goos: openbsd
|
|
goarch: amd64
|
|
name: openbsd-amd64
|
|
- goos: openbsd
|
|
goarch: arm
|
|
name: openbsd-arm
|
|
- goos: openbsd
|
|
goarch: arm64
|
|
name: openbsd-arm64
|
|
- goos: openbsd
|
|
goarch: ppc64
|
|
name: openbsd-ppc64
|
|
- goos: openbsd
|
|
goarch: riscv64
|
|
name: openbsd-riscv64
|
|
- goos: plan9
|
|
goarch: 386
|
|
name: plan9-386
|
|
- goos: plan9
|
|
goarch: amd64
|
|
name: plan9-amd64
|
|
- goos: plan9
|
|
goarch: arm
|
|
name: plan9-arm
|
|
- goos: solaris
|
|
goarch: amd64
|
|
name: solaris-amd64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.23.1'
|
|
|
|
- name: Build Gateway
|
|
run: go build -ldflags="-s -w" -o gateway-${{ matrix.name }}${{ matrix.ext }} ./cmd/gateway
|
|
env:
|
|
GOOS: ${{ matrix.goos }}
|
|
GOARCH: ${{ matrix.goarch }}
|
|
GOARM: ${{ matrix.goarm }}
|
|
|
|
- name: Build KCP
|
|
run: go build -ldflags="-s -w" -o kcp-${{ matrix.name }}${{ matrix.ext }} ./cmd/kcp
|
|
env:
|
|
GOOS: ${{ matrix.goos }}
|
|
GOARCH: ${{ matrix.goarch }}
|
|
GOARM: ${{ matrix.goarm }}
|
|
|
|
- name: Build QUIC
|
|
run: go build -ldflags="-s -w" -o quic-${{ matrix.name }}${{ matrix.ext }} ./cmd/quic
|
|
env:
|
|
GOOS: ${{ matrix.goos }}
|
|
GOARCH: ${{ matrix.goarch }}
|
|
GOARM: ${{ matrix.goarm }}
|
|
|
|
- name: Upload artifacts artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: binaries-${{ matrix.name }}
|
|
path: |
|
|
gateway-${{ matrix.name }}${{ matrix.ext }}
|
|
kcp-${{ matrix.name }}${{ matrix.ext }}
|
|
quic-${{ matrix.name }}${{ matrix.ext }}
|
|
|
|
# 合并所有构建产物
|
|
merge-artifacts:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download all artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
path: ./artifacts
|
|
merge-multiple: true # 合并所有 artifacts
|
|
|
|
- name: Display structure
|
|
run: ls -la ./artifacts
|
|
|
|
- name: Upload merged artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: mc-gateway-all-platforms
|
|
path: ./artifacts/*
|
|
retention-days: 30 |