2021-02-28 23:08:33 +00:00
|
|
|
language: go
|
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
- windows
|
|
|
|
|
|
|
|
arch:
|
|
|
|
- amd64
|
|
|
|
- arm64
|
|
|
|
|
|
|
|
go:
|
|
|
|
- 1.13.x
|
|
|
|
- 1.14.x
|
|
|
|
- 1.15.x
|
|
|
|
- 1.16.x
|
|
|
|
- master
|
|
|
|
|
2021-06-10 14:44:25 +00:00
|
|
|
env:
|
|
|
|
- CGO_ENABLED=0
|
|
|
|
|
2021-02-28 23:08:33 +00:00
|
|
|
script:
|
|
|
|
- go vet ./...
|
|
|
|
- go test -test.v -test.run ^TestCPUID$
|
2021-06-10 14:44:25 +00:00
|
|
|
- CGO_ENABLED=1 go test -race ./...
|
|
|
|
- go test -tags=nounsafe -test.v -test.run ^TestCPUID$
|
2021-02-28 23:08:33 +00:00
|
|
|
- go test -tags=noasm ./...
|
2021-06-10 14:44:25 +00:00
|
|
|
- go run ./cmd/cpuid/main.go
|
|
|
|
- go run ./cmd/cpuid/main.go -json
|
2021-02-28 23:08:33 +00:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
allow_failures:
|
|
|
|
- go: 'master'
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
2021-06-10 14:44:25 +00:00
|
|
|
- stage: other
|
|
|
|
go: 1.16.x
|
2021-02-28 23:08:33 +00:00
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
script:
|
|
|
|
- diff <(gofmt -d .) <(printf "")
|
|
|
|
- diff <(gofmt -d ./private) <(printf "")
|
2021-06-10 14:44:25 +00:00
|
|
|
- curl -sfL https://git.io/goreleaser | VERSION=v0.157.0 sh -s -- check # check goreleaser config for deprecations
|
|
|
|
- curl -sL https://git.io/goreleaser | VERSION=v0.157.0 sh -s -- --snapshot --skip-publish --rm-dist
|
|
|
|
- go get github.com/klauspost/asmfmt&&go install github.com/klauspost/asmfmt/cmd/asmfmt
|
2021-02-28 23:08:33 +00:00
|
|
|
- diff <(asmfmt -d .) <(printf "")
|
|
|
|
- GOOS=linux GOARCH=386 go test .
|
2021-06-10 14:44:25 +00:00
|
|
|
- ./test-architectures.sh
|
|
|
|
- stage: other
|
2021-02-28 23:08:33 +00:00
|
|
|
go: 1.15.x
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
script:
|
|
|
|
- ./test-architectures.sh
|
2021-06-10 14:44:25 +00:00
|
|
|
|
|
|
|
deploy:
|
|
|
|
- provider: script
|
|
|
|
skip_cleanup: true
|
|
|
|
script: curl -sL https://git.io/goreleaser | VERSION=v0.157.0 bash || true
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
condition: ($TRAVIS_OS_NAME = linux) && ($TRAVIS_CPU_ARCH = amd64)
|
2021-02-28 23:08:33 +00:00
|
|
|
go: 1.16.x
|
2021-06-10 14:44:25 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|