From f672a23ccec0df521c0dc1867c0ee976daa52e7d Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 1 Jul 2024 16:35:51 +0200 Subject: [PATCH] build: Add GitHub CI support for tests on ports Add jobs for FreeBSD, NetBSD, OpenBSD, OmniOS (illumos) and macOS. On NetBSD we install gsed, as the BSD sed does not like the utf8toman.sed script. We cannot enable Solaris, as the packages are very outdated, and autopoint cannot find the archive.dir.tar.xz and fails to even autoreconf. But the community based OmniOS based on illumos is a better and more up-to-date replacement. This uses the actions from . --- .github/workflows/freebsd.yml | 26 ++++++++++++++++++++++++++ .github/workflows/macos.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/netbsd.yml | 26 ++++++++++++++++++++++++++ .github/workflows/omnios.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/openbsd.yml | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 147 insertions(+) create mode 100644 .github/workflows/freebsd.yml create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/netbsd.yml create mode 100644 .github/workflows/omnios.yml create mode 100644 .github/workflows/openbsd.yml diff --git a/.github/workflows/freebsd.yml b/.github/workflows/freebsd.yml new file mode 100644 index 000000000..bc13ca49a --- /dev/null +++ b/.github/workflows/freebsd.yml @@ -0,0 +1,26 @@ +name: FreeBSD test + +on: + push: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + name: Test dpkg on FreeBSD + steps: + - uses: actions/checkout@v4 + - name: Test in FreeBSD + id: test + uses: vmactions/freebsd-vm@v1 + with: + usesh: true + copyback: false + prepare: | + pkg install -y pkgconf libtool autoconf automake gettext-tools gettext-runtime gtar patch gmake + + run: | + echo "1.22.x" >.dist-version + echo "$GITHUB_SHA" >.dist-vcs-id + ./autogen && ./configure + gmake -j4 check TEST_PARALLEL=4 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..637be576b --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,32 @@ +name: macOS test + +on: + push: + workflow_dispatch: + +jobs: + test: + runs-on: macos-latest + name: Test dpkg on macOS + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Get build dependencies + run: | + brew update + brew install libtool autoconf automake gpatch libmd make + + - name: Configure + env: + CPPFLAGS: -I/opt/homebrew/include + LDFLAGS: -L/opt/homebrew/lib + run: | + echo "1.22.x" >.dist-version + echo "$GITHUB_SHA" >.dist-vcs-id + ./autogen && ./configure + + - name: Test + run: | + gmake -j4 check TEST_PARALLEL=4 diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml new file mode 100644 index 000000000..3e89051d4 --- /dev/null +++ b/.github/workflows/netbsd.yml @@ -0,0 +1,26 @@ +name: NetBSD test + +on: + push: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + name: Test dpkg on NetBSD + steps: + - uses: actions/checkout@v4 + - name: Test in NetBSD + id: test + uses: vmactions/netbsd-vm@v1 + with: + usesh: true + copyback: false + prepare: | + /usr/sbin/pkg_add pkgconf libtool autoconf automake gettext gtar gsed gcc13 patch gmake + + run: | + echo "1.22.x" >.dist-version + echo "$GITHUB_SHA" >.dist-vcs-id + ./autogen && ./configure + gmake -j4 check TEST_PARALLEL=4 diff --git a/.github/workflows/omnios.yml b/.github/workflows/omnios.yml new file mode 100644 index 000000000..21bbe02fa --- /dev/null +++ b/.github/workflows/omnios.yml @@ -0,0 +1,30 @@ +name: OmniOS (illumos) test + +on: + push: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + name: Test dpkg on OmniOS (illumos) + steps: + - uses: actions/checkout@v4 + - name: Test in OmniOS (illumos) + id: test + uses: vmactions/omnios-vm@v1 + env: + MAKE: gmake + with: + envs: 'MAKE' + usesh: true + copyback: false + prepare: | + pkg refresh + pkg install pkg-config libtool autoconf automake gnu-gettext gnu-tar gnu-patch gcc13 gnu-make + + run: | + echo "1.22.x" >.dist-version + echo "$GITHUB_SHA" >.dist-vcs-id + ./autogen && ./configure + gmake -j4 check TEST_PARALLEL=4 diff --git a/.github/workflows/openbsd.yml b/.github/workflows/openbsd.yml new file mode 100644 index 000000000..e332a71f6 --- /dev/null +++ b/.github/workflows/openbsd.yml @@ -0,0 +1,33 @@ +name: OpenBSD test + +on: + push: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + name: Test dpkg on OpenBSD + steps: + - uses: actions/checkout@v4 + - name: Test in OpenBSD + id: test + uses: vmactions/openbsd-vm@v1 + env: + AUTOCONF_VERSION: 2.72 + AUTOMAKE_VERSION: 1.16 + MAKE: gmake + LDFLAGS: -L/usr/local/lib + CPPFLAGS: -isystem /usr/local/include + with: + envs: 'AUTOCONF_VERSION AUTOMAKE_VERSION MAKE LDFLAGS CPPFLAGS' + usesh: true + copyback: false + prepare: | + pkg_add pkgconf libtool autoconf-2.72p0 automake-1.16.5 gettext-tools gettext-runtime gtar-1.35p0 gpatch gmake + + run: | + echo "1.22.x" >.dist-version + echo "$GITHUB_SHA" >.dist-vcs-id + ./autogen && ./configure + gmake -j4 check TEST_PARALLEL=4