From 9dae5ddcd31314b489c58f85c4682ecbdff9ee40 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 21:07:46 +0100 Subject: [PATCH 01/21] Move MacOS tests to auto branch --- .github/workflows/default.yaml | 2 +- .github/workflows/merge.yaml | 224 +++++++++++++++++++++++++++++++++ 2 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/merge.yaml diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 0204f95a2c4..464a83a8123 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -3,7 +3,7 @@ name: GitHub CI on: push: # test this branch and staged PRs based on this branch code - branches: [ "master", "auto" ] + branches: [ "master" ] pull_request: # test PRs targeting this branch code diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml new file mode 100644 index 00000000000..d50a5e5ff5c --- /dev/null +++ b/.github/workflows/merge.yaml @@ -0,0 +1,224 @@ +name: GitHub CI merge checks + +on: + push: + branches: [ "auto" ] + +env: + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + CHECKOUT_FETCH_DEPTH: 1001 + +jobs: + linux-matrix-tests: + + strategy: + matrix: + os: + - centos-stream-9 + - debian-stable + - debian-testing + - debian-unstable + - fedora-39 + - fedora-40 + - fedora-rawhide + - gentoo + - opensuse-leap + - opensuse-tumbleweed + - ubuntu-focal + - ubuntu-jammy + - ubuntu-noble # EOL 2036-04 + - ubuntu-oracular # EOL 2025-07 + compiler: + - { CC: gcc, CXX: g++ } + - { CC: clang, CXX: clang++ } + layer: + - { name: layer-00-default, nick: default } + - { name: layer-01-minimal, nick: minimal } + - { name: layer-02-maximus, nick: maximus } + # exclude: + # if any combinations needs to be excluded, do it here + # - { os: macos-14, compiler: { CC: gcc, CXX: g++ } } + runs-on: ubuntu-latest + container: + image: squidcache/buildfarm-${{ matrix.os }}:latest + options: --user 1001 # uid used by worfklow runner + + name: linux-matrix-test(${{ matrix.os }},${{ matrix.compiler.CC }},${{ matrix.layer.nick }}) + env: + CC: ${{ matrix.compiler.CC }} + CXX: ${{ matrix.compiler.CXX }} + + steps: + - name: Checkout Sources + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} + + - name: Run build test + id: test + run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} + + - name: Publish build logs + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + name: build-logs-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }} + path: btlayer-*.log + + macos: + runs-on: macos-14 + name: macos-test + + steps: + - name: Install prerequisite MacOS packages + run: | + brew install \ + automake coreutils cppunit gawk \ + gnu-getopt gnu-sed grep libtool \ + make cyrus-sasl + # openldap openssl # already provided by github workers base-image + + - name: Checkout Sources + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} + + - name: Run build test + run: | + eval `brew shellenv` + PKG_CONFIG_PATH="$HOMEBREW_PREFIX/lib/pkgconfig" + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOMEBREW_PREFIX/opt/openldap/lib/pkgconfig" + PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOMEBREW_PREFIX/opt/cyrus-sasl/lib/pkgconfig" + export PKG_CONFIG_PATH + export GETOPT="$HOMEBREW_PREFIX/opt/gnu-getopt/bin/getopt" + export MAKE="$HOMEBREW_PREFIX/bin/gmake" + # ensure we use Homebrew headers and libraries + # this is needed because pkg-config --libs openssl points to the wrong directory + # in version openssl@3: stable 3.3.0 + export CPPFLAGS="-I$HOMEBREW_PREFIX/include${CPPFLAGS:+ $CPPFLAGS}" + export LDFLAGS="-L$HOMEBREW_PREFIX/lib${LDFLAGS:+ $LDFLAGS}" + export CFLAGS="-Wno-compound-token-split-by-macro${CFLAGS:+ $CFLAGS}" # needed fir ltdl with Xcode + + # libtool package referenced below fails to copy its configure* + # files, possibly due to a packaging/brewing bug. The following sed + # command restores installed libtoolize code to its earlier (and + # working) variation. + echo "brew libtool package details:" + brew info libtool --json | grep -E 'rebuild|tap_git_head' + # This hack was tested on libtoolize package with the following output: + # "rebuild": 2, + # "tap_git_head": "5cede8ea3b7b12c7f68215f75a951430b38d945f", + # + editable=$HOMEBREW_CELLAR/libtool/2.4.7/bin/glibtoolize + sed -i.bak 's@ltdl_ac_aux_dir=""@ltdl_ac_aux_dir="../build-aux"@' $editable || true + diff -u $editable.bak $editable || true + + ./test-builds.sh + + - name: Publish build logs + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + name: build-logs-macos + path: btlayer-*.log + + freebsd: + runs-on: ubuntu-latest + if: false # issues with linking + + steps: + - name: Checkout Sources + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} + + - name: Test in FreeBSD + id: test-freebsd + uses: vmactions/freebsd-vm@v1 + with: + usesh: true + sync: sshfs + # release: "14.1" # supported: 12.4, 13.2, 13.3, 14.1 + prepare: | + pkg install -y \ + autoconf \ + autoconf-archive \ + automake \ + bash \ + cppunit \ + gmake \ + libltdl \ + libtool \ + libxml2 \ + m4 \ + nettle && + df . + + run: | + export MAKE=gmake + export CFLAGS='-Wno-compound-token-split-by-macro' + export CC=clang + export CXX=clang++ + ./test-builds.sh --verbose + + - name: Publish build logs + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + path: btlayer-*.log + + openbsd: + runs-on: ubuntu-latest + if: false # currently failing with permission problems in ltdl + + steps: + - name: Checkout Squid sources + uses: actions/checkout@v4 + with: + fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} + + - name: Test + id: test + uses: vmactions/openbsd-vm@v1 + with: + usesh: true + sync: sshfs + prepare: | + pkg_add \ + autoconf-2.72p0 \ + automake-1.16.5 \ + bash \ + coreutils \ + cppunit \ + git \ + ggrep \ + gmake \ + libxml \ + libtool \ + m4 \ + metaauto + mkdir $HOME/bin + ln -s /usr/local/bin/ggrep $HOME/bin/grep + ls -ld /usr/local/share/aclocal* + ls -l /usr/local/bin/auto* + + 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" +\ export PATH="$HOME/bin:$PATH" + ./test-builds.sh --verbose + + - name: Publish build logs + if: success() || failure() + uses: actions/upload-artifact@v4 + with: + path: btlayer-*.log From 4940289094a8cab8637c25396b1aa35e0701792c Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 21:08:16 +0100 Subject: [PATCH 02/21] test workflow --- .github/workflows/merge.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index d50a5e5ff5c..8d5b1290a1a 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -2,7 +2,7 @@ name: GitHub CI merge checks on: push: - branches: [ "auto" ] + branches: [ "auto", "github-actions-merge-tests" ] env: PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} From 090864fe982e45f0eed634b02632f1d562f61b85 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 21:10:02 +0100 Subject: [PATCH 03/21] syntax improvements --- .github/workflows/merge.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 8d5b1290a1a..fe3c176b9bb 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -1,4 +1,4 @@ -name: GitHub CI merge checks +name: "GitHub CI merge checks" on: push: @@ -38,6 +38,7 @@ jobs: # exclude: # if any combinations needs to be excluded, do it here # - { os: macos-14, compiler: { CC: gcc, CXX: g++ } } + runs-on: ubuntu-latest container: image: squidcache/buildfarm-${{ matrix.os }}:latest From 52407961a0d8016317d7acebaf7a9ac0c439f7b7 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 21:10:38 +0100 Subject: [PATCH 04/21] fix syntax --- .github/workflows/merge.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index fe3c176b9bb..dcd112c6aac 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -215,7 +215,7 @@ jobs: export ltver=2.4.2 export CFLAGS='-Wno-compound-token-split-by-macro' export LDFLAGS="-L/usr/local/lib" -\ export PATH="$HOME/bin:$PATH" + export PATH="$HOME/bin:$PATH" ./test-builds.sh --verbose - name: Publish build logs From 4646e2e5a9c1a3e62fc173da8706d0f8cd2b9d2b Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 22:24:02 +0100 Subject: [PATCH 05/21] try using workflows to isolate checks count from callers --- .github/workflows/default.yaml | 46 +---------------------------- .github/workflows/merge-action.yaml | 10 +++++++ .github/workflows/merge.yaml | 12 +++++--- 3 files changed, 19 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/merge-action.yaml diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 464a83a8123..442fe8f1144 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -96,7 +96,6 @@ jobs: matrix: os: - ubuntu-22.04 - - macos-14 compiler: - { CC: gcc, CXX: g++ } - { CC: clang, CXX: clang++ } @@ -106,7 +105,7 @@ jobs: - { name: layer-02-maximus, nick: maximus } exclude: # Non-clang testing on MacOS is too much work for very little gain - - { os: macos-14, compiler: { CC: gcc, CXX: g++ } } + # - { os: macos-14, compiler: { CC: gcc, CXX: g++ } } runs-on: ${{ matrix.os }} @@ -119,7 +118,6 @@ jobs: steps: - name: Install prerequisite Linux packages - if: runner.os == 'Linux' run: | # required for "apt-get build-dep" to work sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list @@ -127,15 +125,6 @@ jobs: sudo apt-get --quiet=2 build-dep squid sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} - - name: Install prerequisite MacOS packages - if: runner.os == 'macOS' - run: | - brew install \ - automake coreutils cppunit gawk \ - gnu-getopt gnu-sed grep libtool \ - make cyrus-sasl - # openldap openssl # already provided by github workers base-image - - name: Checkout sources uses: actions/checkout@v4 @@ -143,39 +132,6 @@ jobs: if: runner.os == 'Linux' run: ./test-builds.sh ${{ matrix.layer.name }} - - name: Run build on MacOS - if: runner.os == 'macOS' - run: | - eval `brew shellenv` - PKG_CONFIG_PATH="$HOMEBREW_PREFIX/lib/pkgconfig" - PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOMEBREW_PREFIX/opt/openldap/lib/pkgconfig" - PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$HOMEBREW_PREFIX/opt/cyrus-sasl/lib/pkgconfig" - export PKG_CONFIG_PATH - export GETOPT="$HOMEBREW_PREFIX/opt/gnu-getopt/bin/getopt" - export MAKE="$HOMEBREW_PREFIX/bin/gmake" - # ensure we use Homebrew headers and libraries - # this is needed because pkg-config --libs openssl points to the wrong directory - # in version openssl@3: stable 3.3.0 - export CPPFLAGS="-I$HOMEBREW_PREFIX/include${CPPFLAGS:+ $CPPFLAGS}" - export LDFLAGS="-L$HOMEBREW_PREFIX/lib${LDFLAGS:+ $LDFLAGS}" - export CFLAGS="-Wno-compound-token-split-by-macro${CFLAGS:+ $CFLAGS}" # needed fir ltdl with Xcode - - # libtool package referenced below fails to copy its configure* - # files, possibly due to a packaging/brewing bug. The following sed - # command restores installed libtoolize code to its earlier (and - # working) variation. - echo "brew libtool package details:" - brew info libtool --json | grep -E 'rebuild|tap_git_head' - # This hack was tested on libtoolize package with the following output: - # "rebuild": 2, - # "tap_git_head": "5cede8ea3b7b12c7f68215f75a951430b38d945f", - # - editable=$HOMEBREW_CELLAR/libtool/2.4.7/bin/glibtoolize - sed -i.bak 's@ltdl_ac_aux_dir=""@ltdl_ac_aux_dir="../build-aux"@' $editable || true - diff -u $editable.bak $editable || true - - ./test-builds.sh ${{ matrix.layer.name }} - - name: Publish build logs if: success() || failure() uses: actions/upload-artifact@v4 diff --git a/.github/workflows/merge-action.yaml b/.github/workflows/merge-action.yaml new file mode 100644 index 00000000000..e039525f76e --- /dev/null +++ b/.github/workflows/merge-action.yaml @@ -0,0 +1,10 @@ +name: "GitHub CI merge checks" + +on: + push: + branches: [ "auto", "github-actions-merge-tests" ] + +jobs: + full-merge-checks: + uses: + ./.github/workflows/merge.yaml diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index dcd112c6aac..35c4b55e3c6 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -1,8 +1,11 @@ -name: "GitHub CI merge checks" +name: "GitHub CI merge checks library" on: - push: - branches: [ "auto", "github-actions-merge-tests" ] + workflow-call + +# on: +# push: +# branches: [ "auto", "github-actions-merge-tests" ] env: PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} @@ -57,7 +60,8 @@ jobs: - name: Run build test id: test - run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} + # run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} + run: /bin/true - name: Publish build logs if: success() || failure() From 136ae07b1b73b54688256973f7a9d57a05a54654 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 22:24:46 +0100 Subject: [PATCH 06/21] fix syntax error --- .github/workflows/merge.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 35c4b55e3c6..a352b03a858 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -1,7 +1,7 @@ name: "GitHub CI merge checks library" on: - workflow-call + workflow_call # on: # push: From df5a945c12c80922a737ffeb259a8dd5c00859f5 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 22:27:23 +0100 Subject: [PATCH 07/21] smarter dry-run --- .github/workflows/merge.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index a352b03a858..91ccee22630 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -60,8 +60,7 @@ jobs: - name: Run build test id: test - # run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} - run: /bin/true + run: /bin/true || ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} - name: Publish build logs if: success() || failure() @@ -118,7 +117,7 @@ jobs: sed -i.bak 's@ltdl_ac_aux_dir=""@ltdl_ac_aux_dir="../build-aux"@' $editable || true diff -u $editable.bak $editable || true - ./test-builds.sh + /bin/true || ./test-builds.sh - name: Publish build logs if: success() || failure() From 0076a89ca75197ecfe796fa18006b8443e6d1ffc Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 22:36:41 +0100 Subject: [PATCH 08/21] skip macos test --- .github/workflows/merge.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 91ccee22630..3fe8c429a0d 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -72,6 +72,7 @@ jobs: macos: runs-on: macos-14 name: macos-test + if: false steps: - name: Install prerequisite MacOS packages From fe56086089bf5f7444f79e243ff6d6dd60a01568 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 22:53:43 +0100 Subject: [PATCH 09/21] revert callable workflow --- .github/workflows/merge-action.yaml | 10 ---------- .github/workflows/merge.yaml | 13 +++++-------- 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/merge-action.yaml diff --git a/.github/workflows/merge-action.yaml b/.github/workflows/merge-action.yaml deleted file mode 100644 index e039525f76e..00000000000 --- a/.github/workflows/merge-action.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: "GitHub CI merge checks" - -on: - push: - branches: [ "auto", "github-actions-merge-tests" ] - -jobs: - full-merge-checks: - uses: - ./.github/workflows/merge.yaml diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 3fe8c429a0d..8d673a52245 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -1,11 +1,8 @@ -name: "GitHub CI merge checks library" +name: "GitHub CI merge checks" on: - workflow_call - -# on: -# push: -# branches: [ "auto", "github-actions-merge-tests" ] + push: + branches: [ "auto", "github-actions-merge-tests" ] env: PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} @@ -60,7 +57,7 @@ jobs: - name: Run build test id: test - run: /bin/true || ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} + run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} - name: Publish build logs if: success() || failure() @@ -118,7 +115,7 @@ jobs: sed -i.bak 's@ltdl_ac_aux_dir=""@ltdl_ac_aux_dir="../build-aux"@' $editable || true diff -u $editable.bak $editable || true - /bin/true || ./test-builds.sh + ./test-builds.sh --verbose - name: Publish build logs if: success() || failure() From 10b4b35692ef1210bc5ae6babb16ce81f6e7cdd6 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 22:54:58 +0100 Subject: [PATCH 10/21] add v6 to branches triggering CI workflows --- .github/workflows/default.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default.yaml b/.github/workflows/default.yaml index 442fe8f1144..e9ebce9e65d 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/default.yaml @@ -3,11 +3,11 @@ name: GitHub CI on: push: # test this branch and staged PRs based on this branch code - branches: [ "master" ] + branches: [ "master", "v6" ] pull_request: # test PRs targeting this branch code - branches: [ "master" ] + branches: [ "master", "v6" ] env: # empty except for pull_request events From b954db33b33b48bdb1225dfb52c9ee3a2072161d Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 23:05:21 +0100 Subject: [PATCH 11/21] try using ccache --- .github/workflows/merge.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 8d673a52245..fa739a9c405 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -55,6 +55,14 @@ jobs: with: fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} + - name: setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + max-size: "128M" # default 500M + verbose: 2 # default 0 + append-timestamp: false + create-symlink: true + - name: Run build test id: test run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} From ca39009a952854020d39756399a4b4191ad8126f Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 23:08:03 +0100 Subject: [PATCH 12/21] containers run unprivileged. Change way to engage ccache --- .github/workflows/merge.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index fa739a9c405..73f02b47f22 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -61,11 +61,12 @@ jobs: max-size: "128M" # default 500M verbose: 2 # default 0 append-timestamp: false - create-symlink: true - name: Run build test id: test - run: ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} - name: Publish build logs if: success() || failure() From 34520a1d0b03ba7ec080a5c146a14febf96e912c Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 23:16:45 +0100 Subject: [PATCH 13/21] force ccache key, do not rely on PATH --- .github/workflows/merge.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 73f02b47f22..cea442f6c01 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -61,11 +61,13 @@ jobs: max-size: "128M" # default 500M verbose: 2 # default 0 append-timestamp: false + key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }} - name: Run build test id: test run: | - export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + export CC="/usr/bin/ccache $CC" + export CXX="/usr/bin/ccache $CXX" ./test-builds.sh --verbose --use-config-cache ${{ matrix.layer.name }} - name: Publish build logs From 2e3653c735d7a6620ac9a892626f24a5e6e2f482 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Sun, 13 Oct 2024 23:25:50 +0100 Subject: [PATCH 14/21] grow ccache to default --- .github/workflows/merge.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index cea442f6c01..0a5ffde0bfc 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -58,7 +58,6 @@ jobs: - name: setup ccache uses: hendrikmuhs/ccache-action@v1.2 with: - max-size: "128M" # default 500M verbose: 2 # default 0 append-timestamp: false key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }} From d079a1bbe9a61039a8e277649ce6039b99d5c28f Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 09:40:54 +0100 Subject: [PATCH 15/21] do do macos tests --- .github/workflows/merge.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index 0a5ffde0bfc..c3e6e5bda8f 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -79,7 +79,6 @@ jobs: macos: runs-on: macos-14 name: macos-test - if: false steps: - name: Install prerequisite MacOS packages From 0fb9f54484c8e7795146e9c19d55e367c2daa25f Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 09:52:25 +0100 Subject: [PATCH 16/21] default.yaml -> pr.yaml --- .github/workflows/{default.yaml => pr.yaml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{default.yaml => pr.yaml} (99%) diff --git a/.github/workflows/default.yaml b/.github/workflows/pr.yaml similarity index 99% rename from .github/workflows/default.yaml rename to .github/workflows/pr.yaml index e9ebce9e65d..1a0a4a528bb 100644 --- a/.github/workflows/default.yaml +++ b/.github/workflows/pr.yaml @@ -1,4 +1,4 @@ -name: GitHub CI +name: "GitHub CI merge checks" on: push: From a335416c5a30e1162d01559f5505ba204732efb5 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 09:54:38 +0100 Subject: [PATCH 17/21] use ccache in pr tests --- .github/workflows/pr.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 1a0a4a528bb..d0562d6a9dd 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -42,6 +42,12 @@ jobs: with: fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} + - name: setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + verbose: 2 # default 0 + append-timestamp: false + - run: ./bootstrap.sh - run: ./configure --with-openssl - run: make -j`nproc` From 6d2e63fb45f3fb736c4c0963c3d27158f9bcd916 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 09:55:13 +0100 Subject: [PATCH 18/21] no need to track runner os --- .github/workflows/pr.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index d0562d6a9dd..e4deb06e1d3 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -134,8 +134,13 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 + - name: setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + verbose: 2 # default 0 + append-timestamp: false + - name: Run build on Linux - if: runner.os == 'Linux' run: ./test-builds.sh ${{ matrix.layer.name }} - name: Publish build logs @@ -155,7 +160,6 @@ jobs: steps: - name: Install Squid prerequisite Linux packages - if: runner.os == 'Linux' run: | # required for "apt-get build-dep" to work sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list From 9be298bcc70077b505cf5681d81dce0f074788c4 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 21:15:01 +0100 Subject: [PATCH 19/21] remove references to v6 --- .github/workflows/pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index e4deb06e1d3..39a9157698d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -3,11 +3,11 @@ name: "GitHub CI merge checks" on: push: # test this branch and staged PRs based on this branch code - branches: [ "master", "v6" ] + branches: [ "master" ] pull_request: # test PRs targeting this branch code - branches: [ "master", "v6" ] + branches: [ "master" ] env: # empty except for pull_request events From 6c56a749ee5d5a66cfd216f385ba9f7fbd1c90be Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 21:52:19 +0100 Subject: [PATCH 20/21] added note about not latest --- .github/workflows/merge.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index c3e6e5bda8f..cd09d98cc3e 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -41,7 +41,7 @@ jobs: runs-on: ubuntu-latest container: - image: squidcache/buildfarm-${{ matrix.os }}:latest + image: squidcache/buildfarm-${{ matrix.os }}:latest # TODO: use stable before merge options: --user 1001 # uid used by worfklow runner name: linux-matrix-test(${{ matrix.os }},${{ matrix.compiler.CC }},${{ matrix.layer.nick }}) From 3fc7d1a495d2d14344f5b1c450bd6ca8a1c0a78f Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Mon, 14 Oct 2024 22:04:40 +0100 Subject: [PATCH 21/21] Remove *bsd --- .github/workflows/merge.yaml | 101 ----------------------------------- 1 file changed, 101 deletions(-) diff --git a/.github/workflows/merge.yaml b/.github/workflows/merge.yaml index cd09d98cc3e..c519fe86c8d 100644 --- a/.github/workflows/merge.yaml +++ b/.github/workflows/merge.yaml @@ -132,104 +132,3 @@ jobs: with: name: build-logs-macos path: btlayer-*.log - - freebsd: - runs-on: ubuntu-latest - if: false # issues with linking - - steps: - - name: Checkout Sources - uses: actions/checkout@v4 - with: - fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} - - - name: Test in FreeBSD - id: test-freebsd - uses: vmactions/freebsd-vm@v1 - with: - usesh: true - sync: sshfs - # release: "14.1" # supported: 12.4, 13.2, 13.3, 14.1 - prepare: | - pkg install -y \ - autoconf \ - autoconf-archive \ - automake \ - bash \ - cppunit \ - gmake \ - libltdl \ - libtool \ - libxml2 \ - m4 \ - nettle && - df . - - run: | - export MAKE=gmake - export CFLAGS='-Wno-compound-token-split-by-macro' - export CC=clang - export CXX=clang++ - ./test-builds.sh --verbose - - - name: Publish build logs - if: success() || failure() - uses: actions/upload-artifact@v4 - with: - path: btlayer-*.log - - openbsd: - runs-on: ubuntu-latest - if: false # currently failing with permission problems in ltdl - - steps: - - name: Checkout Squid sources - uses: actions/checkout@v4 - with: - fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} - - - name: Test - id: test - uses: vmactions/openbsd-vm@v1 - with: - usesh: true - sync: sshfs - prepare: | - pkg_add \ - autoconf-2.72p0 \ - automake-1.16.5 \ - bash \ - coreutils \ - cppunit \ - git \ - ggrep \ - gmake \ - libxml \ - libtool \ - m4 \ - metaauto - mkdir $HOME/bin - ln -s /usr/local/bin/ggrep $HOME/bin/grep - ls -ld /usr/local/share/aclocal* - ls -l /usr/local/bin/auto* - - 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" - export PATH="$HOME/bin:$PATH" - ./test-builds.sh --verbose - - - name: Publish build logs - if: success() || failure() - uses: actions/upload-artifact@v4 - with: - path: btlayer-*.log