Skip to content

Commit

Permalink
Add GHA workflow to run test_crosscompile and go test (#141)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Frassle authored Mar 27, 2022
1 parent edfd13d commit 7de28ce
Show file tree
Hide file tree
Showing 37 changed files with 95 additions and 39 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/crosscompile.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 39 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ioctl.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows && !solaris
//+build !windows,!solaris
// +build !windows,!solaris

package pty

Expand Down
4 changes: 2 additions & 2 deletions ioctl_bsd.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion ioctl_solaris.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build solaris
//+build solaris
// +build solaris

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_darwin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build darwin
//+build darwin
// +build darwin

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_dragonfly.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build dragonfly
//+build dragonfly
// +build dragonfly

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build freebsd
//+build freebsd
// +build freebsd

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build linux
//+build linux
// +build linux

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_netbsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build netbsd
//+build netbsd
// +build netbsd

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_openbsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build openbsd
//+build openbsd
// +build openbsd

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_solaris.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build solaris
//+build solaris
// +build solaris

package pty

Expand Down
2 changes: 1 addition & 1 deletion pty_unsupported.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion run.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
//+build !windows
// +build !windows

package pty

Expand Down
2 changes: 1 addition & 1 deletion types.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore

package pty

Expand Down
2 changes: 1 addition & 1 deletion types_dragonfly.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore

package pty

Expand Down
2 changes: 1 addition & 1 deletion types_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore

package pty

Expand Down
2 changes: 1 addition & 1 deletion types_netbsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore

package pty

Expand Down
2 changes: 1 addition & 1 deletion types_openbsd.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ignore
//+build ignore
// +build ignore

package pty

Expand Down
2 changes: 1 addition & 1 deletion winsize_unix.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !windows
//+build !windows
// +build !windows

package pty

Expand Down
2 changes: 1 addition & 1 deletion winsize_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build windows
//+build windows
// +build windows

package pty

Expand Down
2 changes: 1 addition & 1 deletion ztypes_386.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build 386
//+build 386
// +build 386

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down
2 changes: 1 addition & 1 deletion ztypes_amd64.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build amd64
//+build amd64
// +build amd64

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down
2 changes: 1 addition & 1 deletion ztypes_arm.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build arm
//+build arm
// +build arm

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down
2 changes: 1 addition & 1 deletion ztypes_arm64.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build arm64
//+build arm64
// +build arm64

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down
2 changes: 1 addition & 1 deletion ztypes_dragonfly_amd64.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ztypes_freebsd_386.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ztypes_freebsd_amd64.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ztypes_freebsd_arm.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ztypes_freebsd_arm64.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ztypes_mipsx.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions ztypes_netbsd_32bit_int.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions ztypes_openbsd_32bit_int.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion ztypes_ppc64.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ppc64
//+build ppc64
// +build ppc64

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down
2 changes: 1 addition & 1 deletion ztypes_ppc64le.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build ppc64le
//+build ppc64le
// +build ppc64le

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down
2 changes: 1 addition & 1 deletion ztypes_riscvx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ztypes_s390x.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build s390x
//+build s390x
// +build s390x

// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
Expand Down

0 comments on commit 7de28ce

Please sign in to comment.