chore: add xBSD pipelines #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: bsd | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: read | |
env: | |
GO_VERSION_FREEBSD: "123" | |
GO_VERSION_OPENBSD: "1.23.1" | |
GO_VERSION_NETBSD: "123" | |
GO_VERSION_DRAGONFLY: "1.23" | |
GO_VERSION_SOLARIS: "1.23.3" | |
GNU_TAR_VERSION: "1.35" | |
jobs: | |
test: | |
name: e2e-tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v4 | |
- name: Run end-to-end tests on FreeBSD | |
uses: vmactions/freebsd-vm@v1 | |
if: false # this already passes, so skip to test other BSDs faster | |
with: | |
envs: 'GO_VERSION_FREEBSD GNU_TAR_VERSION' | |
usesh: true | |
prepare: | | |
pkg update -f | |
pkg install -y bash curl gtar-${GNU_TAR_VERSION}p0-static git gmake gsed ggrep go${GO_VERSION_FREEBSD} python | |
run: | | |
set -eux | |
mkdir bin | |
ln -s $(which go${GO_VERSION_FREEBSD}) bin/go | |
ln -s $(which ggrep) bin/grep | |
ln -s $(which gmake) bin/make | |
ln -s $(which gsed) bin/sed | |
ln -s $(which gtar) bin/tar | |
export PATH=$(pwd)/bin:$PATH | |
echo "::group::Print environment information" | |
freebsd-version | |
uname -a | |
echo "GOOS: $(go env GOOS)" | |
echo "GOARCH: $(go env GOARCH)" | |
echo "::endgroup::" | |
echo "::group::Run End-to-End Tests" | |
git config --global --add safe.directory $(pwd) | |
gmake test-e2e | |
echo "::endgroup::" | |
- name: Run end-to-end tests on OpenBSD | |
uses: vmactions/openbsd-vm@v1 | |
if: false | |
with: | |
envs: 'GO_VERSION_OPENBSD GNU_TAR_VERSION' | |
usesh: true | |
prepare: | | |
pkg_add -u | |
pkg_add bash curl gtar-${GNU_TAR_VERSION}p0-static git gmake gsed ggrep go-${GO_VERSION_OPENBSD} python | |
run: | | |
set -eux | |
mkdir bin | |
ln -s $(which ggrep) bin/grep | |
ln -s $(which gmake) bin/make | |
ln -s $(which gsed) bin/sed | |
ln -s $(which gtar) bin/tar | |
export PATH=$(pwd)/bin:$PATH | |
echo "::group::Print environment information" | |
echo "GOOS: $(go env GOOS)" | |
echo "GOARCH: $(go env GOARCH)" | |
echo "::endgroup::" | |
echo "::group::Run End-to-End Tests" | |
git config --global --add safe.directory $(pwd) | |
make test-e2e | |
echo "::endgroup::" | |
- name: Run end-to-end tests on NetBSD | |
uses: vmactions/netbsd-vm@v1 | |
with: | |
envs: 'GO_VERSION_NETBSD GNU_TAR_VERSION' | |
usesh: true | |
prepare: | | |
/usr/sbin/pkg_add -u | |
/usr/sbin/pkg_add curl gtar-base-${GNU_TAR_VERSION} git gmake gsed grep go${GO_VERSION_NETBSD} python312 | |
run: | | |
set -eux | |
mkdir bin | |
ln -s $(which go${GO_VERSION_NETBSD}) bin/go | |
ln -s $(which ggrep) bin/grep | |
ln -s $(which gmake) bin/make | |
ln -s $(which gsed) bin/sed | |
ln -s $(which gtar) bin/tar | |
export PATH=$(pwd)/bin:$PATH | |
echo "::group::Print environment information" | |
echo "GOOS: $(go env GOOS)" | |
echo "GOARCH: $(go env GOARCH)" | |
echo "::endgroup::" | |
echo "::group::Run End-to-End Tests" | |
git config --global --add safe.directory $(pwd) | |
make test-e2e | |
echo "::endgroup::" | |
- name: Run end-to-end tests on DragonFly | |
uses: vmactions/dragonflybsd-vm@v1 | |
if: false | |
with: | |
envs: 'GO_VERSION_DRAGONFLY GNU_TAR_VERSION' | |
usesh: true | |
prepare: | | |
pkgutil -U | |
pkgutil -y -i bash curl gtar gmake gsed ggrep go python | |
run: | # DragonFly6.4 ships with Go 1.21. | |
set -eux | |
mkdir bin | |
ln -s $(which go${GO_VERSION_FREEBSD}) bin/go | |
ln -s $(which ggrep) bin/grep | |
ln -s $(which gmake) bin/make | |
ln -s $(which gsed) bin/sed | |
ln -s $(which gtar) bin/tar | |
export PATH=$(pwd)/bin:$PATH | |
echo "::group::Print environment information" | |
echo "GOOS: $(go env GOOS)" | |
echo "GOARCH: $(go env GOARCH)" | |
echo "::endgroup::" | |
echo "::group::Run End-to-End Tests" | |
git config --global --add safe.directory $(pwd) | |
gmake test-e2e | |
echo "::endgroup::" | |
- name: Run end-to-end tests on Solaris | |
uses: vmactions/solaris-vm@v1 | |
with: | |
envs: 'GO_VERSION_SOLARIS' | |
usesh: true | |
prepare: | # Solaris 11.4 ships with Go 1.17. | |
pkgutil update -f | |
pkgutil install -y bash curl gnu-tar git gnu-make gnu-sed gnu-grep python-39 | |
run: | | |
set -eux | |
mkdir bin | |
curl -LO https://go.dev/dl/go1.23.3.solaris-amd64.tar.gz | |
tar xvzf go1.23.3.solaris-amd64.tar.gz | |
ln -s go/bin/go bin/go | |
export PATH=$PATH:$(pwd)/bin | |
echo "::group::Print environment information" | |
echo "GOOS: $(go env GOOS)" | |
echo "GOARCH: $(go env GOARCH)" | |
echo "tar --version: $(tar --version)" || true | |
echo "gtar --version: $(gtar --version)" || true | |
echo "make --version: $(make --version)" || true | |
echo "gmake --version: $(gmake --version)" || true | |
echo "sed --version: $(sed --version)" || true | |
echo "gsed --version: $(gsed --version)" || true | |
echo "grep --version: $(grep --version)" || true | |
echo "ggrep --version: $(ggrep --version)" || true | |
echo "::endgroup::" | |
echo "::group::Run End-to-End Tests" | |
git config --global --add safe.directory $(pwd) | |
gmake test-e2e | |
echo "::endgroup::" |