Add GHA workflow to run test_crosscompile and go test (#141)

* Add GHA workflow to run test_crosscompile and go test
* crosscompile job doesn't need setup-go
* Test more go versions
* Test 1.6
* Remove 1.13 and add comment of testing strategy
This commit is contained in:
Fraser Waters
2022-03-27 13:14:20 +01:00
committed by GitHub
parent edfd13da2a
commit 7de28cee0d
37 changed files with 95 additions and 39 deletions

17
.github/workflows/crosscompile.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Crosscompile
on:
push:
branches:
- master
jobs:
test:
name: Run ./test_crosscompile.sh
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run ./test_crosscompile.sh
run: ./test_crosscompile.sh

39
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Test go ${{ matrix.go_version }} on ${{ matrix.platform }}"
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform:
- ubuntu-latest
- macos-latest
go_version:
# Test the oldest release we targeted and the two currently supported releases (https://go.dev/doc/devel/release#policy)
- 1.6.x
- 1.17.x
- 1.18.x
steps:
- name: Set up Go ${{ matrix.go_version }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
check-latest: true
- name: Checkout repo
uses: actions/checkout@v2
- name: Build
run: go build -v
- name: Test
run: go test -v

View File

@@ -1,5 +1,5 @@
//go:build !windows && !solaris
//+build !windows,!solaris
// +build !windows,!solaris
package pty

View File

@@ -1,5 +1,5 @@
//go:build (darwin || dragonfly || freebsd || netbsd || openbsd)
//+build darwin dragonfly freebsd netbsd openbsd
//go:build darwin || dragonfly || freebsd || netbsd || openbsd
// +build darwin dragonfly freebsd netbsd openbsd
package pty

View File

@@ -1,5 +1,5 @@
//go:build solaris
//+build solaris
// +build solaris
package pty

View File

@@ -1,5 +1,5 @@
//go:build darwin
//+build darwin
// +build darwin
package pty

View File

@@ -1,5 +1,5 @@
//go:build dragonfly
//+build dragonfly
// +build dragonfly
package pty

View File

@@ -1,5 +1,5 @@
//go:build freebsd
//+build freebsd
// +build freebsd
package pty

View File

@@ -1,5 +1,5 @@
//go:build linux
//+build linux
// +build linux
package pty

View File

@@ -1,5 +1,5 @@
//go:build netbsd
//+build netbsd
// +build netbsd
package pty

View File

@@ -1,5 +1,5 @@
//go:build openbsd
//+build openbsd
// +build openbsd
package pty

View File

@@ -1,5 +1,5 @@
//go:build solaris
//+build solaris
// +build solaris
package pty

View File

@@ -1,5 +1,5 @@
//go:build !linux && !darwin && !freebsd && !dragonfly && !netbsd && !openbsd && !solaris
//+build !linux,!darwin,!freebsd,!dragonfly,!netbsd,!openbsd,!solaris
// +build !linux,!darwin,!freebsd,!dragonfly,!netbsd,!openbsd,!solaris
package pty

2
run.go
View File

@@ -1,5 +1,5 @@
//go:build !windows
//+build !windows
// +build !windows
package pty

View File

@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore
package pty

View File

@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore
package pty

View File

@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore
package pty

View File

@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore
package pty

View File

@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore
package pty

View File

@@ -1,5 +1,5 @@
//go:build !windows
//+build !windows
// +build !windows
package pty

View File

@@ -1,5 +1,5 @@
//go:build windows
//+build windows
// +build windows
package pty

View File

@@ -1,5 +1,5 @@
//go:build 386
//+build 386
// +build 386
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build amd64
//+build amd64
// +build amd64
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build arm
//+build arm
// +build arm
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build arm64
//+build arm64
// +build arm64
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build amd64 && dragonfly
//+build amd64,dragonfly
// +build amd64,dragonfly
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_dragonfly.go

View File

@@ -1,5 +1,5 @@
//go:build 386 && freebsd
//+build 386,freebsd
// +build 386,freebsd
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go

View File

@@ -1,5 +1,5 @@
//go:build amd64 && freebsd
//+build amd64,freebsd
// +build amd64,freebsd
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go

View File

@@ -1,5 +1,5 @@
//go:build arm && freebsd
//+build arm,freebsd
// +build arm,freebsd
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go

View File

@@ -1,5 +1,5 @@
//go:build arm64 && freebsd
//+build arm64,freebsd
// +build arm64,freebsd
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs types_freebsd.go

View File

@@ -1,6 +1,6 @@
//go:build (mips || mipsle || mips64 || mips64le) && linux
//+build linux
//+build mips mipsle mips64 mips64le
// +build mips mipsle mips64 mips64le
// +build linux
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,6 +1,6 @@
//go:build (386 || amd64 || arm || arm64) && netbsd
//+build netbsd
//+build 386 amd64 arm arm64
// +build 386 amd64 arm arm64
// +build netbsd
package pty

View File

@@ -1,6 +1,6 @@
//go:build (386 || amd64 || arm || arm64 || mips64) && openbsd
//+build openbsd
//+build 386 amd64 arm arm64 mips64
// +build 386 amd64 arm arm64 mips64
// +build openbsd
package pty

View File

@@ -1,5 +1,5 @@
//go:build ppc64
//+build ppc64
// +build ppc64
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build ppc64le
//+build ppc64le
// +build ppc64le
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build riscv || riscv64
//+build riscv riscv64
// +build riscv riscv64
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs types.go

View File

@@ -1,5 +1,5 @@
//go:build s390x
//+build s390x
// +build s390x
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go