forked from squid-cache/squid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'squid-cache:master' into master
- Loading branch information
Showing
1,375 changed files
with
14,305 additions
and
33,008 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Coverity Scan service terms limit analysis requests frequency, | ||
# and the service runs analysis in the background. Thus, we submit | ||
# default branch analysis requests on a schedule rather than testing PRs. | ||
|
||
name: Coverity Scan | ||
|
||
on: | ||
schedule: | ||
- cron: "42 3 * * 0" # once a week | ||
|
||
# allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
coverity-scan: | ||
name: Scan with Coverity | ||
# only run the workflow on Squid's main repository | ||
if: github.repository == 'squid-cache/squid' | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
# this job relies on GitHub repository secrets containing | ||
# username and password to access the Coverity Scan service | ||
env: | ||
coverity_user: ${{ secrets.COVERITY_USER }} | ||
coverity_token: ${{ secrets.COVERITY_TOKEN }} | ||
|
||
container: | ||
image: squidcache/buildfarm-coverity:stable | ||
options: --user 1001 # uid used by worfklow runner | ||
|
||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare and upload sources to Coverity Scan | ||
run: | | ||
cov-build --dir cov-int ./test-builds.sh layer-02-maximus | ||
tar -c -a -f cov-int.tar.xz cov-int | ||
curl \ | ||
--fail-with-body \ | ||
--form email=${coverity_user} \ | ||
--form token=${coverity_token} \ | ||
--form version=coverity_scan \ | ||
--form [email protected] \ | ||
https://scan.coverity.com/builds?project=Squid |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,187 @@ | ||
# The jobs below are executed on every PR branch push (among other | ||
# events), quickly and cheaply detecting many common PR problems. | ||
# | ||
# Anubis configuration must be kept in sync with the total number of | ||
# tests executed for "auto" branch commits, including tests in other | ||
# GitHub workflow file(s). | ||
|
||
name: PR commit | ||
|
||
on: | ||
push: | ||
# test commits on this branch and staged commits | ||
branches: [ "master", "auto" ] | ||
|
||
pull_request: | ||
# test PRs targeting this branch code | ||
branches: [ "master" ] | ||
|
||
# allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
# Cancel ongoing tests in case of push to the same PR or staging branch, | ||
# but let previous master commit tests complete. | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | ||
|
||
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 | ||
|
||
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@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Checkout Squid sources | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} | ||
|
||
- run: ./bootstrap.sh | ||
- run: ./configure --with-openssl | ||
- run: make -j`nproc` | ||
- 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@v4 | ||
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@v4 | ||
with: | ||
fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }} | ||
|
||
- run: ./test-suite/test-sources.sh | ||
|
||
build-tests: | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
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 } | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
name: build-tests(${{ matrix.os }},${{ matrix.compiler.CC }},${{ matrix.layer.nick }}) | ||
|
||
env: | ||
CC: /usr/bin/ccache ${{ matrix.compiler.CC }} | ||
CXX: /usr/bin/ccache ${{ matrix.compiler.CXX }} | ||
|
||
steps: | ||
|
||
- name: Install prerequisite Linux packages | ||
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 ${{ matrix.compiler.CC }} ccache | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
verbose: 2 # default 0 | ||
key: ${{ matrix.os }}-${{ matrix.compiler.CC }}-${{ matrix.layer.nick }} | ||
|
||
- name: Run build on Linux | ||
run: ./test-builds.sh ${{ 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 | ||
|
||
CodeQL-tests: | ||
|
||
runs-on: [ ubuntu-22.04 ] | ||
|
||
permissions: | ||
security-events: write | ||
|
||
steps: | ||
|
||
- name: Install Squid prerequisite Linux packages | ||
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 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
|
||
- name: Build Squid | ||
run: ./test-builds.sh ./test-suite/buildtests/layer-02-maximus.opts | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
Oops, something went wrong.