-
Notifications
You must be signed in to change notification settings - Fork 2.4k
218 lines (200 loc) · 6.95 KB
/
bsd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: bsd
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
env:
GNU_TAR_VERSION: "1.35"
GO_VERSION_DRAGONFLY: "1.23.3"
GO_VERSION_FREEBSD: "123"
GO_VERSION_NETBSD: "123"
GO_VERSION_OPENBSD: "1.23.1"
GO_VERSION_SOLARIS: "1.23.3"
# To spin up one of the VMs below, see the "Debug Shell" section here: https://github.com/vmactions
jobs:
test_freebsd:
name: Run end-to-end tests on FreeBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: test-e2e
uses: vmactions/freebsd-vm@v1
with:
copyback: false
envs: 'GO_VERSION_FREEBSD GNU_TAR_VERSION'
usesh: true
prepare: |
pkg update -f
pkg install -y bash wget gtar git gmake gsed gnugrep go${GO_VERSION_FREEBSD} python
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
ln -s $(which go${GO_VERSION_FREEBSD}) $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
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::"
test_openbsd:
name: Run end-to-end tests on OpenBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: test-e2e
uses: vmactions/openbsd-vm@v1
with:
copyback: false
envs: 'GO_VERSION_OPENBSD GNU_TAR_VERSION'
usesh: true
prepare: |
pkg_add -u
pkg_add bash wget gtar-${GNU_TAR_VERSION}p0-static git gmake gsed ggrep go-${GO_VERSION_OPENBSD} python
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
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)
make test-e2e
echo "::endgroup::"
test_netbsd:
name: Run end-to-end tests on NetBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: test-e2e
uses: vmactions/netbsd-vm@v1
with:
copyback: false
envs: 'GO_VERSION_NETBSD GNU_TAR_VERSION'
usesh: true
prepare: |
/usr/sbin/pkg_add -u
/usr/sbin/pkg_add wget gtar-base-${GNU_TAR_VERSION} git gmake gsed grep go${GO_VERSION_NETBSD} python312
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
ln -s $(which go${GO_VERSION_NETBSD}) $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
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)
make test-e2e
echo "::endgroup::"
test_dragonfly:
name: Run end-to-end tests on DragonFly
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: test-e2e
uses: vmactions/dragonflybsd-vm@v1
with:
copyback: false
envs: 'GO_VERSION_DRAGONFLY'
usesh: true
prepare: |
pkg update && pkg upgrade -y
pkg install -y bash wget gtar git gmake gsed gnugrep python3
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
export PATH=$(pwd)/bin:$PATH
GOGZ="go${GO_VERSION_DRAGONFLY}.dragonfly-amd64.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
ln -s $(which python3) $(pwd)/bin/python
echo "::endgroup::"
echo "::group::Print environment information"
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::"
test_solaris:
name: Run end-to-end tests on Solaris
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: test-e2e
uses: vmactions/solaris-vm@v1
with:
copyback: false
envs: 'GO_VERSION_SOLARIS'
usesh: true
prepare: |
pkg update
pkg install curl gnu-tar git gnu-make gnu-sed gnu-grep # python (build 11.4.42.0.0.111.0 ships with 3.7.10)
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
export PATH=$(pwd)/bin:$PATH
GOGZ="go${GO_VERSION_DRAGONFLY}.solaris-amd64.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
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)
make test-e2e
echo "::endgroup::"