| 1 |
name: build |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- master |
| 7 |
pull_request: |
| 8 |
|
| 9 |
jobs: |
| 10 |
build: |
| 11 |
strategy: |
| 12 |
matrix: |
| 13 |
go-version: ["^1", "stable", "oldstable", "gomod"] |
| 14 |
os: [ubuntu-latest, macos-latest] |
| 15 |
runs-on: ${{ matrix.os }} |
| 16 |
steps: |
| 17 |
- uses: actions/checkout@v6 |
| 18 |
- uses: actions/setup-go@v6 |
| 19 |
if: matrix.go-version != 'gomod' |
| 20 |
with: |
| 21 |
go-version: ${{ matrix.go-version }} |
| 22 |
- uses: actions/setup-go@v6 |
| 23 |
if: matrix.go-version == 'gomod' |
| 24 |
with: |
| 25 |
go-version-file: go.mod |
| 26 |
- run: | |
| 27 |
diff --version |
| 28 |
patch --version |
| 29 |
- if: "${{ matrix.os == 'windows-latest' }}" |
| 30 |
run: | |
| 31 |
git config --global core.autocrlf input |
| 32 |
git config --global core.eol lf |
| 33 |
- run: go build -v ./... |
| 34 |
- run: go test -v ./... |
| 35 |
- run: go test -v -fuzz=FuzzRoundTrip -fuzztime=1m . |
| 36 |
|