Skip to content

Commit

Permalink
test more
Browse files Browse the repository at this point in the history
  • Loading branch information
gquintard committed Apr 3, 2024
1 parent c5526ad commit 858a8f8
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
42 changes: 39 additions & 3 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,53 @@
name: Quick test
on: [push]
jobs:
build:
build_against_packages:
strategy:
matrix:
version: ["73", "74"]
version: ["60lts", "73", "74", "75"]
runs-on: ubuntu-latest
steps:
steps :
- uses: actions/checkout@v4
- run: |
set -ex
cat << -EOF > /tmp/pref
Package: *
Pin: origin "packagecloud.io"
Pin-Priority: 999
EOF
sudo mv /tmp/pref /etc/apt/preferences.d/varnish
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish${{ matrix.version }}/script.deb.sh | sudo bash
sudo apt-get install -y cmake gcc jq libcjson-dev python3-docutils varnish varnish-dev
cmake -B build
cmake --build build/
ctest --test-dir build/ --output-on-failure
build_against_master:
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- run: |
sudo apt-get install -y \
automake \
cmake \
gcc \
libjemalloc-dev \
jq \
libcjson-dev \
libedit-dev \
make \
libpcre2-dev \
python3-docutils \
python3-sphinx
- run: |
git clone https://github.com/varnishcache/varnish-cache.git
cd varnish-cache
sed -i 's/^AC_INIT.*/AC_INIT([Varnish], ['$(date +%Y%m%d)'], [varnish-dev@varnish-cache.org])/' configure.ac
./autogen.des --prefix=/usr
sudo make install -j32
sudo cp varnishapi.pc /usr/lib/x86_64-linux-gnu/pkgconfig/
- run: |
set -ex
cmake -B build
cmake --build build/
ctest --test-dir build/ --output-on-failure
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ add_custom_command(OUTPUT varnishlog-json_synopsis.rst
# varnishlog-json.rst includes file from the build directory, so it needs to be copied over BUT
# only if source != build, otherwise we'd copy it over itself
if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "-----------------------NOT EQUAL ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}")
add_custom_command(OUTPUT varnishlog-json.rst
COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/varnishlog-json.rst" "${CMAKE_CURRENT_BINARY_DIR}/varnishlog-json.rst"
DEPENDS varnishlog-json varnishlog-json.rst)
Expand Down
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "vapi/vsl.h"
#include "vapi/voptget.h"
#include "vas.h"
#include <varnish/vsb.h>
#include <varnish/vut.h>
#include <vsb.h>
#include <vut.h>

bool pretty;
bool arrays;
Expand Down

0 comments on commit 858a8f8

Please sign in to comment.