Switch to gh-actions (WIP 1/2) (#67)
This commit is contained in:
36
.github/workflows/test.yaml
vendored
Normal file
36
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
native-os-build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-go@v1
|
||||||
|
with:
|
||||||
|
go-version: "1.13"
|
||||||
|
- name: Build native
|
||||||
|
run: GOARCH=amd64 go build -v ./...
|
||||||
|
shell: bash
|
||||||
|
- name: Run unit tests
|
||||||
|
run: go test -v ./...
|
||||||
|
shell: bash
|
||||||
|
- name: Cross-build for 386
|
||||||
|
if: matrix.os != 'macOS-latest'
|
||||||
|
run: GOARCH=386 go build -v ./...
|
||||||
|
shell: bash
|
||||||
|
- name: Cross-build for arm
|
||||||
|
if: matrix.os != 'macOS-latest'
|
||||||
|
run: GOARCH=arm go build -v ./...
|
||||||
|
shell: bash
|
||||||
|
|
||||||
70
.travis.yml
70
.travis.yml
@@ -1,70 +0,0 @@
|
|||||||
language: go
|
|
||||||
|
|
||||||
os:
|
|
||||||
- linux
|
|
||||||
- osx
|
|
||||||
|
|
||||||
go:
|
|
||||||
- 1.7.x
|
|
||||||
- 1.8.x
|
|
||||||
- 1.9.x
|
|
||||||
- 1.10.x
|
|
||||||
- 1.11.x
|
|
||||||
|
|
||||||
go_import_path: go.bug.st/serial
|
|
||||||
|
|
||||||
env:
|
|
||||||
- TEST_OS=linux TEST_ARCH=386
|
|
||||||
- TEST_OS=linux TEST_ARCH=amd64
|
|
||||||
- TEST_OS=linux TEST_ARCH=arm
|
|
||||||
- TEST_OS=windows TEST_ARCH=386
|
|
||||||
- TEST_OS=windows TEST_ARCH=amd64
|
|
||||||
- TEST_OS=darwin TEST_ARCH=386
|
|
||||||
- TEST_OS=darwin TEST_ARCH=amd64
|
|
||||||
- TEST_OS=freebsd TEST_ARCH=amd64
|
|
||||||
- TEST_OS=openbsd TEST_ARCH=amd64
|
|
||||||
- TEST_OS=openbsd TEST_ARCH=386
|
|
||||||
- TEST_OS=openbsd TEST_ARCH=arm
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
exclude:
|
|
||||||
- os: linux
|
|
||||||
env: TEST_OS=darwin TEST_ARCH=386
|
|
||||||
- os: linux
|
|
||||||
env: TEST_OS=darwin TEST_ARCH=amd64
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=linux TEST_ARCH=386
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=linux TEST_ARCH=amd64
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=linux TEST_ARCH=arm
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=windows TEST_ARCH=386
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=windows TEST_ARCH=amd64
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=freebsd TEST_ARCH=amd64
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=openbsd TEST_ARCH=amd64
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=openbsd TEST_ARCH=386
|
|
||||||
- os: osx
|
|
||||||
env: TEST_OS=openbsd TEST_ARCH=arm
|
|
||||||
allow_failures:
|
|
||||||
- env: TEST_OS=openbsd TEST_ARCH=arm
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
|
|
||||||
script:
|
|
||||||
- GOARM=5 GO386=387 GOOS=$TEST_OS GOARCH=$TEST_ARCH go get github.com/stretchr/testify/require
|
|
||||||
- GOARM=5 GO386=387 GOOS=$TEST_OS GOARCH=$TEST_ARCH go get golang.org/x/sys/windows
|
|
||||||
- GOARM=5 GO386=387 GOOS=$TEST_OS GOARCH=$TEST_ARCH go build -v go.bug.st/serial
|
|
||||||
- GOARM=5 GO386=387 GOOS=$TEST_OS GOARCH=$TEST_ARCH go test -c -v go.bug.st/serial
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
recipients:
|
|
||||||
- c.maglie@bug.st
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user