-
Notifications
You must be signed in to change notification settings - Fork 516
157 lines (127 loc) · 5.09 KB
/
default.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: GitHub CI
on:
push:
# test this branch and staged PRs based on this branch code
branches: [ "v6", "auto" ]
pull_request:
# test PRs targeting this branch code
branches: [ "v6" ]
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@v3
with:
node-version: 16
- name: Checkout Squid sources
uses: actions/checkout@v3
with:
fetch-depth: ${{ env.CHECKOUT_FETCH_DEPTH }}
- run: ./bootstrap.sh
- run: ./configure --with-openssl
- 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
- name: Checkout sources
uses: actions/checkout@v3
- name: Run build on Linux
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@v3
with:
name: build-logs-${{ runner.os }}
path: btlayer-*.log