Files
golsky/.woodpecker/build.yaml

44 lines
1.2 KiB
YAML
Raw Normal View History

2025-11-13 19:50:36 +01:00
matrix:
platform:
- linux/amd64
goversion:
2025-11-13 20:40:16 +01:00
- 1.25.4
2025-11-13 19:50:36 +01:00
labels:
platform: ${platform}
steps:
build:
when:
event: [push]
2025-11-13 20:28:11 +01:00
image: ubuntu:latest
2025-11-13 19:50:36 +01:00
commands:
2025-11-13 20:28:11 +01:00
- apt-get update
2025-11-13 20:41:39 +01:00
- apt-get -y install libasound2-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
- apt-get -y install libasound2 libgl1-mesa libxcursor libxi libxinerama libxrandr libxxf86vm tar
2025-11-13 20:40:16 +01:00
- curl https://go.dev/dl/go${goversion}.linux-amd64.tar.gz -L -o /tmp/go${goversion}.linux-amd64.tar.gz
- tar -C /usr/local -xfz /tmp/go${goversion}.linux-amd64.tar.gz
- export PATH=$PATH:/usr/local/go/bin
- go version
2025-11-13 19:50:36 +01:00
- go get
- go build
linter:
when:
event: [push]
image: golang:${goversion}
commands:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
- golangci-lint --version
- golangci-lint run ./...
depends_on: [build]
test:
when:
event: [push]
image: golang:${goversion}
commands:
- go get
- go test -v -cover
depends_on: [build,linter]