Skip to content

Commit 3e5cb90

Browse files
committed
build and test netbsd
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent a2ee706 commit 3e5cb90

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ jobs:
243243
matrix:
244244
os:
245245
- freebsd
246+
- netbsd
246247
- openbsd
247248
steps:
248249
-
@@ -280,7 +281,7 @@ jobs:
280281
-
281282
name: Test
282283
run: |
283-
vagrant ssh -- "cd /vagrant; SKIP_INTEGRATION_TESTS=1 go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ${{ env.TESTFLAGS }} ./..."
284+
vagrant ssh -- "env|sort; df -h; cd /vagrant; SKIP_INTEGRATION_TESTS=1 go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ${{ env.TESTFLAGS }} ./..."
284285
vagrant ssh -c "sudo cat /vagrant/coverage.txt" > coverage.txt
285286
-
286287
name: Upload coverage

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ COPY --link --from=buildx-build /usr/bin/docker-buildx /buildx
102102
FROM binaries-unix AS binaries-darwin
103103
FROM binaries-unix AS binaries-freebsd
104104
FROM binaries-unix AS binaries-linux
105+
FROM binaries-unix AS binaries-netbsd
105106
FROM binaries-unix AS binaries-openbsd
106107

107108
FROM scratch AS binaries-windows

docker-bake.hcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ target "lint" {
4848
"linux/s390x",
4949
"linux/ppc64le",
5050
"linux/riscv64",
51+
"netbsd/amd64",
52+
"netbsd/arm64",
5153
"openbsd/amd64",
5254
"openbsd/arm64",
5355
"windows/amd64",
@@ -167,6 +169,8 @@ target "binaries-cross" {
167169
"linux/ppc64le",
168170
"linux/riscv64",
169171
"linux/s390x",
172+
"netbsd/amd64",
173+
"netbsd/arm64",
170174
"openbsd/amd64",
171175
"openbsd/arm64",
172176
"windows/amd64",

hack/Vagrantfile.netbsd

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.configure("2") do |config|
5+
config.vm.box = "generic/netbsd9"
6+
config.vm.boot_timeout = 900
7+
config.vm.synced_folder ".", "/vagrant", type: "rsync"
8+
config.ssh.keep_alive = true
9+
10+
config.vm.provision "init", type: "shell", run: "once" do |sh|
11+
sh.inline = <<~SHELL
12+
pkgin -y install git mozilla-rootcerts
13+
mozilla-rootcerts install
14+
15+
ftp https://go.dev/dl/go1.23.3.netbsd-amd64.tar.gz
16+
tar -C /tmp -xzf go1.23.3.netbsd-amd64.tar.gz
17+
ln -s /tmp/go/bin/go /usr/bin/go
18+
SHELL
19+
end
20+
end

0 commit comments

Comments
 (0)