Use matrix strategy for building on multiple platforms
This commit is contained in:
parent
5e791f7f1a
commit
3917bbe234
2 changed files with 12 additions and 2 deletions
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
|
@ -3,17 +3,24 @@ on: [push, pull_request]
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: '^1.17'
|
||||
|
||||
- name: Format
|
||||
run: gofmt -d -e -s .
|
||||
run: make fmt
|
||||
|
||||
- name: Build
|
||||
run: make build
|
||||
|
||||
- name: Test
|
||||
run: make test
|
||||
|
|
|
|||
3
Makefile
3
Makefile
|
|
@ -4,5 +4,8 @@ build:
|
|||
test:
|
||||
go test -v ./...
|
||||
|
||||
fmt:
|
||||
gofmt -d -e -s .
|
||||
|
||||
clean:
|
||||
go clean
|
||||
Loading…
Add table
Reference in a new issue