Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add OpenBSD build tests for staged commits #1964

Closed
wants to merge 21 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,61 @@ jobs:
with:
name: build-logs-freebsd-${{ matrix.osversion }}
path: btlayer-*.log

openbsd:
runs-on: ubuntu-22.04

steps:
- name: Checkout Sources
uses: actions/checkout@v4

- name: Run test-builds
id: test-builds
uses: vmactions/openbsd-vm@v1
with:
usesh: true
prepare: |
pkg_add \
autoconf-2.72p0 \
autoconf-archive \
automake-1.16.5 \
bash \
coreutils \
cppunit \
git \
ggrep \
gmake \
libltdl \
libtool \
libnettle \
libxml \
libtool \
m4 \
metaauto

mkdir $HOME/bin
ln -s /usr/local/bin/ggrep $HOME/bin/grep
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of GNUisms in our build chain


run: |
export MAKE=gmake
export pjobs="-j`gnproc`"
export AUTOMAKE_VERSION=1.16
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenBSD support for multi-version automake is complicated

export amver=${AUTOMAKE_VERSION}
export ACLOCAL_AUTOMAKE_DIR="/usr/local/share/aclocal-${AUTOMAKE_VERSION}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a similar hack that can avoid the following warnings?

  aclocal-1.16: warning: couldn't open directory '/usr/bin/../share/aclocal': No such file or directory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I know of. OpenBSD is rough around the edges in these areas

export ACLOCAL_PATH="/usr/local/share/aclocal:/usr/local/share/aclocal-${AUTOMAKE_VERSION}"
export AUTOCONF_VERSION=2.72
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autoconf, too

export acver=${AUTOCONF_VERSION}
export ltver=2.4.2
export CFLAGS='-Wno-compound-token-split-by-macro'
export LDFLAGS="-L/usr/local/lib"
# until we remove GNUisms from our grep commands,
# shadow system `grep` with `ggrep` installed/linked earlier
export PATH="$HOME/bin:$PATH"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need this to shadow the system 'grep' command

kinkie marked this conversation as resolved.
Show resolved Hide resolved
./test-builds.sh

- name: Publish build logs
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: build-logs-openbsd
path: btlayer-*.log