-
Notifications
You must be signed in to change notification settings - Fork 10
31 lines (31 loc) · 1.08 KB
/
go.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Build and Test
on: [push, pull_request]
jobs:
build:
name: Go CI
runs-on: ubuntu-22.04
strategy:
matrix:
go: ['1.19', '1.20']
steps:
- name: Set up Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 #v3.5.0
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c #v3.3.0
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libflint-dev libmpfr-dev
- name: Install linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.1"
- name: Build
run: go build ./...
- name: Lint
run: |
golangci-lint run --disable-all --deadline=10m --enable=gofmt --enable=gosimple --enable=unconvert --enable=ineffassign --enable=govet
- name: Install csppsolver
run: go install ./cmd/csppsolver
- name: Test
run: go test -v ./...