
* Add a github actions workflow config (linux + windows build) * Remove Travis config, migrated to Github Actions * Remove AppVeyor configs, migrated to Github Actions
35 lines
1.1 KiB
YAML
35 lines
1.1 KiB
YAML
name: build-and-test
|
|
on: [pull_request, push]
|
|
jobs:
|
|
linux:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
- run: sudo apt-get install libusb-1.0-0-dev
|
|
- run: go install golang.org/x/tools/cmd/cover@latest
|
|
- run: go install golang.org/x/lint/golint@latest
|
|
- run: $HOME/go/bin/golint ./...
|
|
- run: sh ./.github/test-coverage.sh
|
|
- uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
path-to-profile: coverage.merged
|
|
ignore: libusb.go,error.go
|
|
windows:
|
|
runs-on: windows-2022
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.17
|
|
- uses: msys2/setup-msys2@v2
|
|
with:
|
|
install: |-
|
|
mingw64/mingw-w64-x86_64-libusb
|
|
mingw64/mingw-w64-x86_64-pkg-config
|
|
- run: echo "D:\a\_temp\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
- run: go test ./...
|
|
- run: go run ./lsusb
|