Skip to content

Commit dfd6431

Browse files
committed
build: Add GitHub CI support for tests on ports
Add jobs for FreeBSD, NetBSD, OpenBSD, DragonFlyBSD, OmniOS (illumos), Solaris and macOS. On NetBSD we install gsed, as the BSD sed does not like the utf8toman.sed script. This uses the actions from <https://github.com/vmactions>.
1 parent 9cff110 commit dfd6431

File tree

10 files changed

+211
-0
lines changed

10 files changed

+211
-0
lines changed

.github/actions/ci-configure

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
git config --global --add safe.directory $(pwd)
6+
7+
build-aux/run-script build-aux/get-version-ci >.dist-version
8+
echo "$GITHUB_SHA" >.dist-vcs-id
9+
10+
./autogen && ./configure

.github/actions/ci-test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
gmake -j4 check TEST_PARALLEL=4

.github/workflows/dragonflybsd.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: DragonFlyBSD test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: Test dpkg on DragonFlyBSD
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Test in DragonFlyBSD
14+
id: test
15+
uses: vmactions/dragonflybsd-vm@v1
16+
with:
17+
usesh: true
18+
copyback: false
19+
prepare: |
20+
pkg install -y pkgconf libtool autoconf automake gettext-tools gettext-runtime gtar patch gmake
21+
22+
run: |
23+
./.github/actions/ci-configure
24+
./.github/actions/ci-test

.github/workflows/freebsd.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: FreeBSD test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: Test dpkg on FreeBSD
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Test in FreeBSD
14+
id: test
15+
uses: vmactions/freebsd-vm@v1
16+
with:
17+
usesh: true
18+
copyback: false
19+
prepare: |
20+
pkg install -y pkgconf libtool autoconf automake gettext-tools gettext-runtime gtar patch gmake
21+
22+
run: |
23+
./.github/actions/ci-configure
24+
./.github/actions/ci-test

.github/workflows/macos.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: macOS test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: macos-latest
10+
name: Test dpkg on macOS
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Get build dependencies
17+
run: |
18+
brew update
19+
brew install libtool autoconf automake gpatch libmd make
20+
21+
- name: Configure
22+
env:
23+
CPPFLAGS: -I/opt/homebrew/include
24+
LDFLAGS: -L/opt/homebrew/lib
25+
run: |
26+
./.github/actions/ci-configure
27+
28+
- name: Test
29+
run: |
30+
./.github/actions/ci-test

.github/workflows/netbsd.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: NetBSD test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: Test dpkg on NetBSD
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Test in NetBSD
14+
id: test
15+
uses: vmactions/netbsd-vm@v1
16+
with:
17+
usesh: true
18+
copyback: false
19+
prepare: |
20+
/usr/sbin/pkg_add pkgconf libtool autoconf automake gettext gtar gsed gcc13 patch gmake
21+
22+
run: |
23+
./.github/actions/ci-configure
24+
./.github/actions/ci-test

.github/workflows/omnios.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: OmniOS (illumos) test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: Test dpkg on OmniOS (illumos)
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Test in OmniOS (illumos)
14+
id: test
15+
uses: vmactions/omnios-vm@v1
16+
env:
17+
MAKE: gmake
18+
with:
19+
envs: 'MAKE'
20+
usesh: true
21+
copyback: false
22+
prepare: |
23+
pkg refresh
24+
pkg install pkg-config libtool autoconf automake gnu-gettext gnu-tar gnu-patch gcc13 gnu-make
25+
26+
run: |
27+
./.github/actions/ci-configure
28+
./.github/actions/ci-test

.github/workflows/openbsd.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: OpenBSD test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: Test dpkg on OpenBSD
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Test in OpenBSD
14+
id: test
15+
uses: vmactions/openbsd-vm@v1
16+
env:
17+
AUTOCONF_VERSION: 2.72
18+
AUTOMAKE_VERSION: 1.17
19+
MAKE: gmake
20+
LDFLAGS: -L/usr/local/lib
21+
CPPFLAGS: -isystem /usr/local/include
22+
with:
23+
envs: 'AUTOCONF_VERSION AUTOMAKE_VERSION MAKE LDFLAGS CPPFLAGS'
24+
usesh: true
25+
copyback: false
26+
prepare: |
27+
pkg_add pkgconf libtool autoconf-2.72p0 automake-1.17 gettext-tools gettext-runtime gtar-1.35p0 gpatch gmake
28+
29+
run: |
30+
./.github/actions/ci-configure
31+
./.github/actions/ci-test

.github/workflows/solaris.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Solaris test
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
name: Test dpkg on Solaris
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Test in Solaris
14+
id: test
15+
uses: vmactions/solaris-vm@v1
16+
env:
17+
MAKE: gmake
18+
with:
19+
envs: 'MAKE'
20+
usesh: true
21+
copyback: false
22+
prepare: |
23+
pkg refresh
24+
pkg install pkg-config libtool autoconf automake gnu-gettext gnu-tar gnu-patch gcc@latest gnu-make
25+
26+
run: |
27+
./.github/actions/ci-configure
28+
./.github/actions/ci-test

build-aux/get-version-ci

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/perl
2+
3+
use v5.36;
4+
5+
use Dpkg;
6+
7+
say $Dpkg::PROGVERSION;

0 commit comments

Comments
 (0)