Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD on x86-64 support #29

Merged
merged 8 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, workflow_dispatch]

jobs:
build:
name: Test on ${{ matrix.os }}/${{ matrix.arch }}
name: Test on ${{ matrix.os }} / ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -56,3 +56,20 @@ jobs:
gist_id: "5bfca1854a183da5294ad00cb41ace31"
file_name: "coverage.svg"
content: ${{ steps.gen_badge.outputs.BADGE }}

freebsd:
name: Test on freebsd / amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test
uses: vmactions/freebsd-vm@v1
with:
release: 14.1
usesh: true
copyback: false
prepare: |
pkg install -y go
run: |
go test -v -gcflags="all=-N -l" ./examples/...
go test -v -gcflags="all=-N -l" -coverprofile coverage.out .
3 changes: 3 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ OS/arch combinations:
| Linux | Supported | Supported |
| Windows | Supported | Supported |
| macOS | Supported | Supported |
| BSD[^1] | Supported | Planned |

[^1]: This package was tested on FreeBSD but it should work on other BSD flavours, such as NetBSD, OpenBSD and DragonFly BSD

## Command line options

Expand Down
2 changes: 1 addition & 1 deletion equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (linux || darwin || windows) && (amd64 || arm64)
//go:build (unix || windows) && (amd64 || arm64)

package testaroli

Expand Down
2 changes: 1 addition & 1 deletion expect.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (linux || darwin || windows) && (amd64 || arm64)
//go:build (unix || windows) && (amd64 || arm64)

package testaroli

Expand Down
2 changes: 2 additions & 0 deletions mem_linux.go → mem_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build unix && !darwin

package testaroli

import (
Expand Down
2 changes: 2 additions & 0 deletions mem_linux_test.go → mem_unix_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build unix && !darwin

package testaroli

import (
Expand Down
3 changes: 2 additions & 1 deletion override.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build (linux || darwin || windows) && (amd64 || arm64)
//go:build (unix || windows) && (amd64 || arm64)

/*
Package testaroli allows to monkey patch Go test binary, e.g. override functions
Expand All @@ -28,6 +28,7 @@ Supported OS/arch combinations:
- Windows / ARM64
- macOS / x86-64
- macOS / ARM64
- FreeBSD / x86-64 (tested on FreeBSD but other BSD flavours should also be ok)

# The concept

Expand Down
Loading