Skip to content

Commit

Permalink
add test to build Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gquintard committed Apr 3, 2024
1 parent 858a8f8 commit 63a1f39
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
name: Quick test
on: [push]
jobs:
docker_image:
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- name: Build Dockerfile
run: |
pwd
ls
docker build -t test Dockerfile
build_against_packages:
strategy:
matrix:
version: ["60lts", "73", "74", "75"]
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- run: |
- name: Set up varnish repository and pinning
run: |
set -ex
cat << -EOF > /tmp/pref
Package: *
Expand All @@ -18,6 +29,8 @@ jobs:
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
- name: Build and test varnishlog-json
run: |
cmake -B build
cmake --build build/
ctest --test-dir build/ --output-on-failure
Expand All @@ -26,7 +39,8 @@ jobs:
runs-on: ubuntu-latest
steps :
- uses: actions/checkout@v4
- run: |
- name: Install dependencies
run: |
sudo apt-get install -y \
automake \
cmake \
Expand All @@ -39,14 +53,16 @@ jobs:
libpcre2-dev \
python3-docutils \
python3-sphinx
- run: |
- name: Build varnish
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)'], [[email protected]])/' configure.ac
./autogen.des --prefix=/usr
sudo make install -j32
sudo cp varnishapi.pc /usr/lib/x86_64-linux-gnu/pkgconfig/
- run: |
- name: Build and test varnishlog-json
run: |
set -ex
cmake -B build
cmake --build build/
Expand Down

0 comments on commit 63a1f39

Please sign in to comment.