|
| 1 | +name: bsd |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - master |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +env: |
| 15 | + GNU_TAR_VERSION: "1.35" |
| 16 | + GO_VERSION_DRAGONFLY: "1.23.3" |
| 17 | + GO_VERSION_FREEBSD: "123" |
| 18 | + GO_VERSION_NETBSD: "1.23.3" |
| 19 | + GO_VERSION_OPENBSD: "1.23.1" |
| 20 | + GO_VERSION_SOLARIS: "1.23.3" |
| 21 | + |
| 22 | +# To spin up one of the VMs below, see the "Debug Shell" section here: https://github.com/vmactions |
| 23 | +jobs: |
| 24 | + test_freebsd: |
| 25 | + name: Run end-to-end tests on FreeBSD |
| 26 | + runs-on: ubuntu-latest |
| 27 | + steps: |
| 28 | + - name: Checkout the repository |
| 29 | + uses: actions/checkout@v4 |
| 30 | + - name: test-e2e |
| 31 | + uses: vmactions/freebsd-vm@v1 |
| 32 | + with: |
| 33 | + copyback: false |
| 34 | + envs: 'GO_VERSION_FREEBSD GNU_TAR_VERSION' |
| 35 | + usesh: true |
| 36 | + prepare: | |
| 37 | + pkg update -f |
| 38 | + pkg install -y \ |
| 39 | + bash \ |
| 40 | + git \ |
| 41 | + gmake \ |
| 42 | + gnugrep \ |
| 43 | + go${GO_VERSION_FREEBSD} \ |
| 44 | + gsed \ |
| 45 | + gtar \ |
| 46 | + python \ |
| 47 | + wget |
| 48 | + run: | |
| 49 | + echo "::group::Setup prerequisites" |
| 50 | + set -eu |
| 51 | + mkdir bin |
| 52 | + ln -s $(which go${GO_VERSION_FREEBSD}) $(pwd)/bin/go |
| 53 | + ln -s $(which ggrep) $(pwd)/bin/grep |
| 54 | + ln -s $(which gmake) $(pwd)/bin/make |
| 55 | + ln -s $(which gsed) $(pwd)/bin/sed |
| 56 | + ln -s $(which gtar) $(pwd)/bin/tar |
| 57 | + export PATH=$(pwd)/bin:$PATH |
| 58 | + echo "::endgroup::" |
| 59 | +
|
| 60 | + echo "::group::Print environment information" |
| 61 | + uname -a |
| 62 | + echo "GOOS: $(go env GOOS)" |
| 63 | + echo "GOARCH: $(go env GOARCH)" |
| 64 | + echo "::endgroup::" |
| 65 | +
|
| 66 | + echo "::group::Run End-to-End Tests" |
| 67 | + git config --global --add safe.directory $(pwd) |
| 68 | + gmake test-e2e |
| 69 | + echo "::endgroup::" |
| 70 | +
|
| 71 | + test_openbsd: |
| 72 | + name: Run end-to-end tests on OpenBSD |
| 73 | + runs-on: ubuntu-latest |
| 74 | + steps: |
| 75 | + - name: Checkout the repository |
| 76 | + uses: actions/checkout@v4 |
| 77 | + - name: test-e2e |
| 78 | + uses: vmactions/openbsd-vm@v1 |
| 79 | + with: |
| 80 | + copyback: false |
| 81 | + envs: 'GO_VERSION_OPENBSD GNU_TAR_VERSION' |
| 82 | + usesh: true |
| 83 | + prepare: | |
| 84 | + pkg_add -u |
| 85 | + pkg_add \ |
| 86 | + bash \ |
| 87 | + ggrep \ |
| 88 | + git \ |
| 89 | + gmake \ |
| 90 | + go-${GO_VERSION_OPENBSD} \ |
| 91 | + gsed \ |
| 92 | + gtar-${GNU_TAR_VERSION}p0-static \ |
| 93 | + python \ |
| 94 | + wget |
| 95 | + run: | |
| 96 | + echo "::group::Setup prerequisites" |
| 97 | + set -eu |
| 98 | + mkdir bin |
| 99 | + ln -s $(which ggrep) $(pwd)/bin/grep |
| 100 | + ln -s $(which gmake) $(pwd)/bin/make |
| 101 | + ln -s $(which gsed) $(pwd)/bin/sed |
| 102 | + ln -s $(which gtar) $(pwd)/bin/tar |
| 103 | + export PATH=$(pwd)/bin:$PATH |
| 104 | + echo "::endgroup::" |
| 105 | +
|
| 106 | + echo "::group::Print environment information" |
| 107 | + uname -a |
| 108 | + echo "GOOS: $(go env GOOS)" |
| 109 | + echo "GOARCH: $(go env GOARCH)" |
| 110 | + echo "::endgroup::" |
| 111 | +
|
| 112 | + echo "::group::Run End-to-End Tests" |
| 113 | + git config --global --add safe.directory $(pwd) |
| 114 | + make test-e2e |
| 115 | + echo "::endgroup::" |
| 116 | +
|
| 117 | + test_netbsd: |
| 118 | + name: Run end-to-end tests on NetBSD |
| 119 | + runs-on: ubuntu-latest |
| 120 | + steps: |
| 121 | + - name: Checkout the repository |
| 122 | + uses: actions/checkout@v4 |
| 123 | + - name: test-e2e |
| 124 | + uses: vmactions/netbsd-vm@v1 |
| 125 | + with: |
| 126 | + copyback: false |
| 127 | + envs: 'GO_VERSION_NETBSD GNU_TAR_VERSION' |
| 128 | + usesh: true |
| 129 | + prepare: | |
| 130 | + /usr/sbin/pkg_add -u |
| 131 | + /usr/sbin/pkg_add \ |
| 132 | + git \ |
| 133 | + gmake \ |
| 134 | + grep \ |
| 135 | + gsed \ |
| 136 | + gtar-base-${GNU_TAR_VERSION}\ |
| 137 | + python312 \ |
| 138 | + wget |
| 139 | + run: | |
| 140 | + echo "::group::Setup prerequisites" |
| 141 | + set -eu |
| 142 | + mkdir bin |
| 143 | + GOGZ="go${GO_VERSION_NETBSD}.netbsd-amd64.tar.gz" |
| 144 | + wget https://go.dev/dl/${GOGZ} |
| 145 | + gtar xzf ${GOGZ} |
| 146 | + ln -s $(pwd)/go/bin/go $(pwd)/bin/go |
| 147 | + ln -s $(which ggrep) $(pwd)/bin/grep |
| 148 | + ln -s $(which gmake) $(pwd)/bin/make |
| 149 | + ln -s $(which gsed) $(pwd)/bin/sed |
| 150 | + ln -s $(which gtar) $(pwd)/bin/tar |
| 151 | + export PATH=$(pwd)/bin:$PATH |
| 152 | + echo "::endgroup::" |
| 153 | +
|
| 154 | + echo "::group::Print environment information" |
| 155 | + uname -a |
| 156 | + echo "GOOS: $(go env GOOS)" |
| 157 | + echo "GOARCH: $(go env GOARCH)" |
| 158 | + echo "::endgroup::" |
| 159 | +
|
| 160 | + echo "::group::Run End-to-End Tests" |
| 161 | + git config --global --add safe.directory $(pwd) |
| 162 | + make test-e2e |
| 163 | + echo "::endgroup::" |
| 164 | +
|
| 165 | + test_dragonfly: |
| 166 | + name: Run end-to-end tests on DragonFly |
| 167 | + runs-on: ubuntu-latest |
| 168 | + steps: |
| 169 | + - name: Checkout the repository |
| 170 | + uses: actions/checkout@v4 |
| 171 | + - name: test-e2e |
| 172 | + uses: vmactions/dragonflybsd-vm@v1 |
| 173 | + with: |
| 174 | + copyback: false |
| 175 | + envs: 'GO_VERSION_DRAGONFLY' |
| 176 | + usesh: true |
| 177 | + prepare: | |
| 178 | + pkg update && pkg upgrade -y |
| 179 | + pkg install -y \ |
| 180 | + bash \ |
| 181 | + git \ |
| 182 | + gmake \ |
| 183 | + gnugrep \ |
| 184 | + gsed \ |
| 185 | + gtar \ |
| 186 | + python3 \ |
| 187 | + wget |
| 188 | + run: | |
| 189 | + echo "::group::Setup prerequisites" |
| 190 | + set -eu |
| 191 | + mkdir bin |
| 192 | + GOGZ="go${GO_VERSION_DRAGONFLY}.dragonfly-amd64.tar.gz" |
| 193 | + wget https://go.dev/dl/${GOGZ} |
| 194 | + gtar xzf ${GOGZ} |
| 195 | + ln -s $(pwd)/go/bin/go $(pwd)/bin/go |
| 196 | + ln -s $(which ggrep) $(pwd)/bin/grep |
| 197 | + ln -s $(which gmake) $(pwd)/bin/make |
| 198 | + ln -s $(which gsed) $(pwd)/bin/sed |
| 199 | + ln -s $(which gtar) $(pwd)/bin/tar |
| 200 | + ln -s $(which python3) $(pwd)/bin/python |
| 201 | + export PATH=$(pwd)/bin:$PATH |
| 202 | + echo "::endgroup::" |
| 203 | +
|
| 204 | + echo "::group::Print environment information" |
| 205 | + uname -a |
| 206 | + echo "GOOS: $(go env GOOS)" |
| 207 | + echo "GOARCH: $(go env GOARCH)" |
| 208 | + echo "::endgroup::" |
| 209 | +
|
| 210 | + echo "::group::Run End-to-End Tests" |
| 211 | + git config --global --add safe.directory $(pwd) |
| 212 | + gmake test-e2e |
| 213 | + echo "::endgroup::" |
| 214 | +
|
| 215 | + test_solaris: |
| 216 | + name: Run end-to-end tests on Solaris |
| 217 | + runs-on: ubuntu-latest |
| 218 | + steps: |
| 219 | + - name: Checkout the repository |
| 220 | + uses: actions/checkout@v4 |
| 221 | + - name: test-e2e |
| 222 | + uses: vmactions/solaris-vm@v1 |
| 223 | + with: |
| 224 | + copyback: false |
| 225 | + envs: 'GO_VERSION_SOLARIS' |
| 226 | + usesh: true |
| 227 | + prepare: | |
| 228 | + pkg update |
| 229 | + pkg install \ |
| 230 | + bash \ |
| 231 | + curl \ |
| 232 | + gcc \ |
| 233 | + git \ |
| 234 | + gnu-grep \ |
| 235 | + gnu-make \ |
| 236 | + gnu-sed \ |
| 237 | + gnu-tar |
| 238 | + run: | |
| 239 | + echo "::group::Setup prerequisites" |
| 240 | + set -eu |
| 241 | + mkdir bin |
| 242 | + GOGZ="go${GO_VERSION_SOLARIS}.solaris-amd64.tar.gz" |
| 243 | + wget https://go.dev/dl/${GOGZ} |
| 244 | + gtar xzf ${GOGZ} |
| 245 | + ln -s $(pwd)/go/bin/go $(pwd)/bin/go |
| 246 | + ln -s $(which ggrep) $(pwd)/bin/grep |
| 247 | + ln -s $(which gmake) $(pwd)/bin/make |
| 248 | + ln -s $(which gsed) $(pwd)/bin/sed |
| 249 | + ln -s $(which gtar) $(pwd)/bin/tar |
| 250 | + export PATH=$(pwd)/bin:$PATH |
| 251 | + |
| 252 | + echo ">> building promu as it is not shipped for Solaris" |
| 253 | + git clone https://github.com/prometheus/promu.git |
| 254 | + cd promu |
| 255 | + go build . |
| 256 | + cd - |
| 257 | + |
| 258 | + mkdir -p $(go env GOPATH)/bin |
| 259 | + ln -s $(pwd)/promu/promu $(go env GOPATH)/bin/promu |
| 260 | + export PATH=$(go env GOPATH)/bin:$PATH |
| 261 | + echo "::endgroup::" |
| 262 | +
|
| 263 | + echo "::group::Print environment information" |
| 264 | + uname -a |
| 265 | + echo "GOOS: $(go env GOOS)" |
| 266 | + echo "GOARCH: $(go env GOARCH)" |
| 267 | + echo "::endgroup::" |
| 268 | +
|
| 269 | + echo "::group::Run End-to-End Tests" |
| 270 | + git config --global --add safe.directory $(pwd) |
| 271 | + make test-e2e |
| 272 | + echo "::endgroup::" |
| 273 | +
|
| 274 | + test_macos: |
| 275 | + name: Run end-to-end tests on macOS |
| 276 | + runs-on: macos-latest |
| 277 | + steps: |
| 278 | + - name: Checkout the repository |
| 279 | + uses: actions/checkout@v4 |
| 280 | + - name: Install dependencies |
| 281 | + run: | |
| 282 | + brew install \ |
| 283 | + bash \ |
| 284 | + curl \ |
| 285 | + git \ |
| 286 | + grep \ |
| 287 | + make \ |
| 288 | + gnu-sed \ |
| 289 | + gnu-tar \ |
| 290 | + go \ |
| 291 | + python3 |
| 292 | + - name: test-e2e |
| 293 | + run: | |
| 294 | + echo "::group::Setup prerequisites" |
| 295 | + set -eu |
| 296 | + mkdir bin |
| 297 | + ln -s $(which ggrep) $(pwd)/bin/grep |
| 298 | + ln -s $(which gmake) $(pwd)/bin/make |
| 299 | + ln -s $(which gsed) $(pwd)/bin/sed |
| 300 | + ln -s $(which gtar) $(pwd)/bin/tar |
| 301 | + export PATH=$(pwd)/bin:$PATH |
| 302 | + echo "::endgroup::" |
| 303 | +
|
| 304 | + echo "::group::Print environment information" |
| 305 | + uname -a |
| 306 | + echo "GOOS: $(go env GOOS)" |
| 307 | + echo "GOARCH: $(go env GOARCH)" |
| 308 | + echo "::endgroup::" |
| 309 | +
|
| 310 | + echo "::group::Run End-to-End Tests" |
| 311 | + git config --global --add safe.directory $(pwd) |
| 312 | + make test-e2e |
| 313 | + echo "::endgroup::" |
0 commit comments