Fix ENTRY_ABORTED assertion in sendClientOldEntry() #1011
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Test the default branch, supported release branches, and their PRs | |
name: GitHub CI | |
on: | |
push: | |
branches: [ "bag51", "bag51-dev", "auto" ] | |
pull_request: | |
branches: [ "bag51", "bag51-dev" ] | |
env: | |
# empty except for pull_request events | |
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} | |
# Full clones of Squid repository branches (depth=19000+) waste resources, | |
# while excessively shallow clones break tests that check for past commits | |
# (e.g., to skip a particular test until a known bug is fixed) or generate | |
# diffs against them (e.g., for `git diff --check`). This arbitrary limit | |
# tries to balance the two concerns. | |
CHECKOUT_FETCH_DEPTH: 1001 | |
# OpenSSL version to download, build, and use with Squid. | |
# XXX: If you update this, update OPENSSL_DIR below as well! | |
OPENSSL_VERSION: 1.1.1s | |
# OpenSSL installation prefix. | |
# Also used as a GitHub Actions cache key for caching OpenSSL installation. | |
# TODO: How to avoid hard-coding OPENSSL_VERSION value? | |
OPENSSL_DIR: /opt/openssl-1.1.1s | |
jobs: | |
functionality-tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install prerequisite packages | |
run: | | |
sudo apt-get --quiet=2 update | |
sudo apt-get --quiet=2 install libtool-bin | |
- name: Setup a nodejs environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Check cached OpenSSL installation | |
id: openssl-cache-check | |
uses: actions/cache@v3 | |
with: | |
key: ${{ env.OPENSSL_DIR }}-${{ runner.os }} | |
path: ${{ env.OPENSSL_DIR }} | |
- name: Install OpenSSL | |
if: ${{ steps.openssl-cache-check.outputs.cache-hit != 'true' }} | |
run: | | |
mkdir /tmp/build | |
cd /tmp/build | |
curl -L https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | tar --strip-components=1 -xzf - | |
./Configure shared --prefix=$OPENSSL_DIR linux-x86_64 | |
make | |
make install_sw | |
- name: Checkout Squid sources | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} | |
- run: ./bootstrap.sh | |
- run: ./configure --with-openssl=$OPENSSL_DIR --disable-strict-error-checking | |
- run: make -j2 | |
- run: | | |
sudo make install | |
sudo chown -R nobody:nogroup /usr/local/squid | |
- run: ./test-suite/test-functionality.sh | |
# Squid logs are not readable to actions/upload-artifact below | |
- name: Prep test logs | |
if: success() || failure() | |
run: sudo chmod -R a+rX /usr/local/squid | |
- name: Publish test logs | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-logs | |
path: | | |
${{ runner.temp }}/*.log | |
/usr/local/squid/var/logs/overlord/*.log | |
source-maintenance-tests: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install prerequisite packages | |
run: | | |
sudo apt-get --quiet=2 update | |
sudo apt-get --quiet=2 install astyle | |
sudo apt-get --quiet=2 install gperf | |
pip install \ | |
--user \ | |
--no-cache-dir \ | |
--disable-pip-version-check \ | |
--quiet \ | |
--progress-bar off \ | |
codespell==1.16 # TODO: Upgrade to codespell v2 | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} | |
- run: ./test-suite/test-sources.sh | |
build-tests: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ ubuntu-22.04 ] | |
runs-on: ${{ matrix.os }} | |
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 | |
sudo apt-get --quiet=2 update | |
sudo apt-get --quiet=2 build-dep squid | |
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin | |
# Duplicates a test-functionality job step | |
- name: Check cached OpenSSL installation | |
id: openssl-cache-check | |
uses: actions/cache@v3 | |
with: | |
key: ${{ env.OPENSSL_DIR }}-${{ runner.os }} | |
path: ${{ env.OPENSSL_DIR }} | |
# Duplicates a test-functionality job step | |
- name: Install OpenSSL | |
if: ${{ steps.openssl-cache-check.outputs.cache-hit != 'true' }} | |
run: | | |
mkdir /tmp/build | |
cd /tmp/build | |
curl -L https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | tar --strip-components=1 -xzf - | |
./Configure shared --prefix=$OPENSSL_DIR linux-x86_64 | |
make | |
make install_sw | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- run: | | |
export PKG_CONFIG_PATH="$OPENSSL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH" | |
sed --in-place "s@with-openssl@with-openssl=$OPENSSL_DIR@" test-suite/buildtests/layer-02-maximus.opts | |
./test-builds.sh | |
- name: Publish build logs | |
if: success() || failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-logs-${{ runner.os }} | |
path: btlayer-*.log | |
CodeQL-tests: | |
runs-on: [ ubuntu-22.04 ] | |
permissions: | |
security-events: write | |
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 | |
sudo apt-get --quiet=2 update | |
sudo apt-get --quiet=2 build-dep squid | |
sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin | |
# Duplicates a test-functionality job step | |
- name: Check cached OpenSSL installation | |
id: openssl-cache-check | |
uses: actions/cache@v3 | |
with: | |
key: ${{ env.OPENSSL_DIR }}-${{ runner.os }} | |
path: ${{ env.OPENSSL_DIR }} | |
# Duplicates a test-functionality job step | |
- name: Install OpenSSL | |
if: ${{ steps.openssl-cache-check.outputs.cache-hit != 'true' }} | |
run: | | |
mkdir /tmp/build | |
cd /tmp/build | |
curl -L https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | tar --strip-components=1 -xzf - | |
./Configure shared --prefix=$OPENSSL_DIR linux-x86_64 | |
make | |
make install_sw | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
- name: Build Squid | |
run: | | |
export PKG_CONFIG_PATH="$OPENSSL_DIR/lib/pkgconfig:$PKG_CONFIG_PATH" | |
sed --in-place "s@with-openssl@with-openssl=$OPENSSL_DIR@" test-suite/buildtests/layer-02-maximus.opts | |
./test-builds.sh ./test-suite/buildtests/layer-02-maximus.opts | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |