Skip to content

Merge branch 'master' into cross-arch-test #9

Merge branch 'master' into cross-arch-test

Merge branch 'master' into cross-arch-test #9

name: Lint
on:
push:
paths:
- '**/*.go'
- '**/*.s'
- 'go.mod'
- 'go.sum'
pull_request:
paths:
- '**/*.go'
- '**/*.s'
- 'go.mod'
- 'go.sum'
permissions:
contents: read
pull-requests: read
checks: write
jobs:
golangci-lint:
strategy:
matrix:
go-version:
- '1.15'
- '1.16'
- '1.17'
- '1.18'
- '1.19'
- '1.20'
- '1.21'
- '1.22'
- '1.23'
runs-on:
- ubuntu-latest
- macos-14
#- [ 'macOS', 'self-hosted', 'lint' ]
- windows-latest
exclude:
#- runs-on: [ 'macOS', 'self-hosted', 'lint' ]
- runs-on: macos-14
go-version: '1.15'
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set git to use LF
run: |
git config core.autocrlf false
git rm --cached -r .
git reset --hard
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.1
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.1
args: --build-tags purego
go-test:
needs: golangci-lint
if: github.ref == 'refs/heads/master'
strategy:
matrix:
go-version:
- '1.15'
- '1.16'
- '1.17'
- '1.18'
- '1.19'
- '1.20'
- '1.21'
- '1.22'
- '1.23'
runs-on:
- ubuntu-latest
- [ 'macOS', 'self-hosted' ]
- windows-latest
exclude:
- runs-on: [ 'macOS', 'self-hosted' ]
go-version: '1.15'
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set git to use LF
run: |
git config core.autocrlf false
git rm --cached -r .
git reset --hard
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
cache-dependency-path: go.sum
- name: Install dependencies
run: |
go get .
go get github.com/RyuaNerin/[email protected]
go get github.com/RyuaNerin/[email protected]
- name: Build
run: go build -v ./...
- name: Test (purego)
run: go test --tags=purego ./...
# run: go test -test.short --tags=purego ./...
- name: Test
run: go test ./...
# run: go test -test.short ./...