Skip to content

Commit

Permalink
build: Add GitHub CI support for tests on ports
Browse files Browse the repository at this point in the history
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 <https://github.com/vmactions>.
  • Loading branch information
guillemj committed Dec 25, 2024
1 parent 9dd7b9d commit f672a23
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions .github/workflows/netbsd.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions .github/workflows/omnios.yml
Original file line number Diff line number Diff line change
@@ -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
33 changes: 33 additions & 0 deletions .github/workflows/openbsd.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f672a23

Please sign in to comment.