Skip to content

serial_unix.go: Keep writing until complete #182

serial_unix.go: Keep writing until complete

serial_unix.go: Keep writing until complete #182

Workflow file for this run

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@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Setup CGO Environment
run: |
if [ ${{ matrix.os }} == 'macOS-latest' ] ; then
echo "CGO_ENABLED=1" >> "$GITHUB_ENV"
fi
shell: bash
- name: Build AMD64
run: GOARCH=amd64 go build -v ./...
shell: bash
- name: Build ARM64
run: GOARCH=arm64 go build -v ./...
shell: bash
- name: Install socat
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install socat
shell: bash
- name: Run unit tests
run: go test -v -race ./...
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
cross-os-build:
strategy:
matrix:
go-os-pairs:
- "freebsd amd64"
- "openbsd amd64"
- "openbsd 386"
- "openbsd arm"
- "linux ppc64le"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Cross-build
run: |
set ${{ matrix.go-os-pairs }}
GOOS=$1 GOARCH=$2 go build -v ./...
shell: bash