]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CI: Add OpenBSD build tests for staged commits (#1964)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Tue, 17 Dec 2024 15:06:29 +0000 (15:06 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 20 Dec 2024 18:40:48 +0000 (18:40 +0000)
Use a GitHub-hosted VM to create OpenBSD test environment. Requires
GitHub repository configuration that permits the use of
`vmactions/openbsd-vm@v1` Action.

We have not enabled ccache optimization for OpenBSD tests because we
do not know how to copy updated ccache files from VM back into runner.

.github/workflows/slow.yaml

index 534b293543f526d45e3ffd7b59f08fe1e01d7b38..728445b65608fd47aabbf2ae791fa5cd09ba02a8 100644 (file)
@@ -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
+
+          run: |
+            export MAKE=gmake
+            export pjobs="-j`gnproc`"
+            export AUTOMAKE_VERSION=1.16
+            export amver=${AUTOMAKE_VERSION}
+            export ACLOCAL_AUTOMAKE_DIR="/usr/local/share/aclocal-${AUTOMAKE_VERSION}"
+            export ACLOCAL_PATH="/usr/local/share/aclocal:/usr/local/share/aclocal-${AUTOMAKE_VERSION}"
+            export AUTOCONF_VERSION=2.72
+            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"
+            ./test-builds.sh
+
+      - name: Publish build logs
+        if: success() || failure()
+        uses: actions/upload-artifact@v4
+        with:
+          name: build-logs-openbsd
+          path: btlayer-*.log