-
Notifications
You must be signed in to change notification settings - Fork 3
68 lines (59 loc) · 1.82 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
name: CI
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
cc:
- gcc
- clang
make_target:
- check
- distcheck
configure_flags:
- --enable-luajit
- --disable-luajit
- --disable-luajit --disable-flush-jemalloc-tcache
include:
- cc: gcc
make_target: lcov
configure_flags: --enable-code-coverage
steps:
- uses: actions/checkout@v3
- name: Install packages
run: |
sudo apt-get update -q
sudo apt-get install -qq \
automake autotools-dev lcov libcurl4-gnutls-dev \
libedit-dev libeditline-dev libjemalloc-dev libncurses-dev \
liblua5.1-0-dev libluajit-5.1-dev libpcre3-dev libtool lua5.1 \
luajit python-docutils python3-sphinx vim-common
- name: Install Varnish Cache
run: |
wget --no-check-certificate https://varnish-cache.org/_downloads/varnish-6.0.9.tgz
tar zxvf varnish-*.tgz
pushd varnish-*/
./autogen.sh
CC='${{ matrix.cc }}' ./configure
make -sj32
sudo make PREFIX='/usr/local' install
sudo ldconfig
popd
- name: Build & test VMOD
run: |
./autogen.sh
CC='${{ matrix.cc }}' ./configure --prefix=/usr ${{ matrix.configure_flags }}
make -j1
make ${{ matrix.make_target }} -j1
- name: Push code coverage
if: ${{ matrix.make_target == 'lcov' }}
run: |
cp libvmod-cfg-*-coverage.info codecov.info
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy
- name: Show test report
if: ${{ failure() }}
run: |
cat src/test-suite.log || exit 0