Skip to content
Myr

Add FreeBSD and NetBSD CI (#3600)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Add a BSD workflow with FreeBSD and NetBSD jobs that run the same build and tests as the linux job, each inside a VM booted under QEMU on an ubuntu-latest runner. The tests/shtest $NO_COLOR pty checks are now skipped on NetBSD, as they already are on SunOS.

authored by neil · committed by GitHub · parent e001deb · Browse files · 2 files+92 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+92 added−0 removed

  • tests:+6 added−0 removed
  • other:+86 added−0 removed

2 files+92 added−0 removed

added:.github/workflows/bsd.yml+86 added
1name: BSD23on:4 push:5 branches:6 - master7 tags:8 - "jq-*"9 pull_request:1011jobs:12 freebsd:13 runs-on: ubuntu-latest14 timeout-minutes: 6015 steps:16 - name: Clone repository17 uses: actions/checkout@v718 with:19 submodules: true20 - name: Build and test21 uses: vmactions/freebsd-vm@v122 with:23 usesh: true24 cache-after-prepare: true25 prepare: |26 pkg install -y autoconf automake libtool gmake git27 run: |28 set -e29 # The VM runs as root over a checkout owned by another uid, so git30 # rejects the repository and scripts/version -- which AC_INIT calls31 # through m4_esyscmd_s -- exits 128, leaving JQ_VERSION undefined.32 git config --global --add safe.directory "$PWD"33 git config --global --add safe.directory "$PWD/vendor/oniguruma"34 autoreconf -i35 ./configure --disable-docs --with-oniguruma=builtin --enable-static36 gmake -j"$(sysctl -n hw.ncpu)"37 gmake check VERBOSE=yes38 - name: Upload Test Logs39 if: ${{ failure() }}40 uses: actions/upload-artifact@v741 with:42 name: test-logs-freebsd43 retention-days: 744 path: |45 test-suite.log46 tests/*.log4748 netbsd:49 runs-on: ubuntu-latest50 timeout-minutes: 6051 steps:52 - name: Clone repository53 uses: actions/checkout@v754 with:55 submodules: true56 - name: Build and test57 uses: vmactions/netbsd-vm@v158 with:59 usesh: true60 cache-after-prepare: true61 prepare: |62 # The image's default PKG_PATH falls back to a 9.0 package set;63 # point it at the running release instead.64 PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -m)/$(uname -r)/All/"65 export PKG_PATH66 pkg_add autoconf automake libtool gmake git67 run: |68 set -e69 # The VM runs as root over a checkout owned by another uid, so git70 # rejects the repository and scripts/version -- which AC_INIT calls71 # through m4_esyscmd_s -- exits 128, leaving JQ_VERSION undefined.72 git config --global --add safe.directory "$PWD"73 git config --global --add safe.directory "$PWD/vendor/oniguruma"74 autoreconf -i75 ./configure --disable-docs --with-oniguruma=builtin --enable-static76 gmake -j"$(sysctl -n hw.ncpu)"77 gmake check VERBOSE=yes78 - name: Upload Test Logs79 if: ${{ failure() }}80 uses: actions/upload-artifact@v781 with:82 name: test-logs-netbsd83 retention-days: 784 path: |85 test-suite.log86 tests/*.log
modified:tests/shtest+6 added
3 unmodified lines
45msys=false6mingw=false7sunos=false8netbsd=false9case "$(uname -s)" in10MSYS*) msys=true;;11MINGW*) mingw=true;;12SunOS*) sunos=true;;13NetBSD*) netbsd=true;;14esac1516JQ_NO_B=$JQ17JQ="$JQ -b"
660 unmodified lines
678test_no_color=true679$msys && test_no_color=false680$mingw && test_no_color=false681$sunos && test_no_color=false682# NetBSD's script(1) intermittently loses the whole session output (the683# output file comes back empty for fast commands about half the time), so684# the pty checks cannot run reliably there.685$netbsd && test_no_color=false686if $test_no_color && command -v script >/dev/null 2>&1; then687 if script -qc echo /dev/null >/dev/null 2>&1; then688 faketty() { script -qec "$*" /dev/null; }689 else # macOS
287 unmodified lines