-
Notifications
You must be signed in to change notification settings - Fork 21
84 lines (73 loc) · 2.3 KB
/
main.yml
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
name: CI
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-24.04
strategy:
matrix:
cc:
- gcc
- clang
make_target:
- check
- distcheck
configure_flags:
- ''
include:
- cc: gcc
make_target: lcov
configure_flags: --enable-code-coverage
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt update
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_SUSPEND=non-empty-value apt install -y \
automake autotools-dev lcov libedit-dev libev-dev \
libncurses-dev libpcre2-dev libssl-dev libtool python3-docutils \
python3-sphinx
- name: Install Varnish Cache
run: |
git clone https://github.com/varnishcache/varnish-cache.git ./varnish
pushd varnish
./autogen.sh
CC='${{ matrix.cc }}' ./configure
make -sj32
sudo make PREFIX='/usr/local' install
sudo ldconfig
popd
- name: Install hiredis
run: |
wget --no-check-certificate https://github.com/redis/hiredis/archive/v1.2.0.zip -O hiredis-1.2.0.zip
unzip hiredis-*.zip
pushd hiredis-*/
make USE_SSL=1
sudo make USE_SSL=1 PREFIX='/usr/local' install
sudo ldconfig
popd
- name: Install Redis
run: |
wget --no-check-certificate http://download.redis.io/releases/redis-7.4.1.tar.gz
tar zxvf redis-*.tar.gz
pushd redis-*/
make BUILD_TLS=yes
sudo make BUILD_TLS=yes PREFIX='/usr/local' install
sudo ldconfig
popd
- name: Build & test VMOD
run: |
./autogen.sh
CC='${{ matrix.cc }}' ./configure --prefix=/usr ${{ matrix.configure_flags }}
make -j4
make ${{ matrix.make_target }} -j1
- name: Push code coverage
if: ${{ matrix.make_target == 'lcov' }}
run: |
cp libvmod-redis-*-coverage.info codecov.info
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -t ${{ secrets.CODECOV_TOKEN }}
- name: Show test report
if: ${{ failure() }}
run: |
cat src/test-suite.log || exit 0