]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
CI: enhance FreeBSD staging tests (#2372) master
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Wed, 18 Mar 2026 15:22:15 +0000 (15:22 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 18 Mar 2026 16:18:44 +0000 (16:18 +0000)
Cover all FreeBSD versions supported by the FreeBSD Project.

Fully rely on packages, not ports, solving the "version mismatch"
problem that had led us to remove FreeBSD 13.5 in commit 99fca3a.

Enable ccache for faster build times.

Restrict testing to the maximus test layer to maximize
signal-to-execution-time ratio: The main purpose of FreeBSD tests is to
quickly identify Linux-isms and portability issues, not internal code
dependencies and misalignments.

Prepare to also support arm64 and riscv64, but leave them disabled for
now as they are respectively too slow and broken at this time.

.github/workflows/slow.yaml

index dcb1c0f70cdaaaa84b32e9edb433cf55d8023c16..e7526d53af1c8d91fa3c698d82bee250a43e27a5 100644 (file)
@@ -145,45 +145,75 @@ jobs:
     strategy:
       matrix:
         osversion:
-          - 14.3
+          - "15.0"
+          - "14.3"
+          - "13.5"
+        platform:
+          - amd64
+          # We are ready to support multiple platforms, but
+          # - arm64 is too slow as of 2026-02 (> 6 hours per run, GitHub times out)
+          # - riscv64 not working as of 2026-02 (GitHub image is incomplete)
+          # We expect these problems to be solved some time soon.
+    runs-on: "${{ matrix.platform != 'arm64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}"
 
-    runs-on: ubuntu-24.04
-    name: freebsd(${{ matrix.osversion }})
+    name: freebsd(${{ matrix.osversion }},${{ matrix.platform }})
 
     steps:
       - name: Checkout Sources
         uses: actions/checkout@v4
 
+      - name: Setup ccache
+        uses: hendrikmuhs/ccache-action@v1.2.19
+        with:
+          verbose: 2 # default 0
+          key: ${{ github.job }}-${{ matrix.osversion }}-${{ matrix.platform }}
+          max-size: "250MB"
+          evict-old-files: "28d"
+
       - name: Run test-builds
         id: test-builds
         uses: vmactions/freebsd-vm@v1
         with:
           usesh: true
-          release: ${{ matrix.osversion }}
+          sync: rsync
+          copyback: true
+          release: "${{ matrix.osversion }}"
+          arch: "${{ matrix.platform }}"
           prepare: |
-            pkg update
+            export BATCH=yes
+            which nproc > /dev/null && echo "MAKE_JOBS_NUMBER?=`nproc --all`" >> /etc/make.conf
+            echo "OPTIONS_UNSET=CUPS DEBUG DOCS FONTCONFIG NLS X11" >> /etc/make.conf
+            echo "WITHOUT_MODULES=sound ntfs linux" >> /etc/make.conf
+            echo "WITHOUT_X11=yes" >> /etc/make.conf
+            echo "NO_SENDMAIL=true" >> /etc/make.conf
+            echo "IGNORE_OSVERSION=yes" >> /usr/local/etc/pkg.conf
+
             pkg install -y \
               autoconf \
               autoconf-archive \
               automake \
-              bash \
+              ccache \
               cppunit \
               gmake \
               libltdl \
               libtool \
-              m4 \
               nettle \
               pkgconf
+            ccache --set-config=cache_dir="$GITHUB_WORKSPACE/.ccache"
+            ccache --set-config=max_size='250MB'
+            ccache --set-config=compression=true
 
           run: |
             export MAKE=gmake
-            ./test-builds.sh
+            export CC='ccache cc'
+            export CXX='ccache c++'
+            ./test-builds.sh layer-02-maximus
 
       - name: Publish build logs
         if: success() || failure()
         uses: actions/upload-artifact@v4
         with:
-          name: build-logs-freebsd-${{ matrix.osversion }}
+          name: build-logs-freebsd-${{ matrix.osversion }}-${{ matrix.platform }}
           path: "**/*.log"
 
   openbsd: