tqcq e898ecc701
Some checks failed
catsync-build / simple-build (amd64, linux, 1.23.1) (push) Has been cancelled
catsync-build / simple-build (amd64, linux, oldstable) (push) Has been cancelled
catsync-build / simple-build (amd64, windows, 1.23.1) (push) Has been cancelled
catsync-build / simple-build (amd64, windows, oldstable) (push) Has been cancelled
catsync-build / simple-build (arm64, linux, 1.23.1) (push) Has started running
catsync-build / simple-build (arm64, linux, oldstable) (push) Has been cancelled
Add workflows.
2024-12-22 21:36:57 +08:00

54 lines
1.2 KiB
YAML

---
name: catsync-build
on:
push:
paths:
- '.gitea/workflows/build.yml'
- 'go.mod'
- 'go.sum'
- 'main.go'
- 'assets/**'
- 'pb/**'
pull_request:
paths:
- '.gitea/workflows/build.yml'
- 'go.mod'
- 'go.sum'
- 'main.go'
- 'assets/**'
- 'pb/**'
concurrency:
group: ${{ github.workflow_ref }}
cancel-in-progress: true
jobs:
build:
name: simple-build
runs-on: ubuntu-20.04
strategy:
matrix:
goos: [linux, windows]
goarch: [amd64, arm64]
gover: ['1.23.1', 'oldstable']
exclude:
- goarch: arm64
goos: windows
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.gover }}
- name: install-tools
run: |
apt-get update -y
apt-get install -y protobuf-compiler
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.0
- name: protobuf-gen
run: |
protoc --go_out=. ./assets/protobuf/*.proto
- name: build
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -x .