summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2021-03-29 18:15:38 +0200
committerTobias Klauser <tobias.klauser@gmail.com>2021-03-29 18:34:50 +0200
commite9c2e1bc52b4539a2232904aa0b18f4d9c4d723a (patch)
tree9cd8ae368b0925f49a3905d49673f84a655dc0cd
parentbe3e706f00295024ebc199e70177343fdaebbc9e (diff)
Add GitHub action for build testing
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--.github/workflows/build.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..3cbd5ea
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,53 @@
+name: Build
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ CC: [gcc, clang]
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Install dependencies
+ run: |
+ sudo apt-get install -y --no-install-recommends libnl-3-dev libnl-genl-3-dev libnl-route-3-dev libnetfilter-conntrack-dev libgeoip-dev liburcu-dev libpcap-dev libnet1-dev libcli-dev clang
+
+ - name: Check out code
+ uses: actions/checkout@v2
+
+ - name: Build (with all features)
+ run: |
+ CC=${{ matrix.CC }} ./configure
+ make CC=${{ matrix.CC }}
+
+ - name: Build (without GeoIP)
+ run: |
+ make clean
+ CC=${{ matrix.CC }} ./configure --disable-geoip
+ make CC=${{ matrix.CC }}
+
+ - name: Build (without zlib)
+ run: |
+ make clean
+ CC=${{ matrix.CC }} ./configure --disable-zlib
+ make CC=${{ matrix.CC }}
+
+ - name: Build (without GeoIP and zlib)
+ run: |
+ make clean
+ CC=${{ matrix.CC }} ./configure --disable-geoip --disable-zlib
+ make CC=${{ matrix.CC }}
+
+ - name: Build (without libnl)
+ run: |
+ make clean
+ CC=${{ matrix.CC }} ./configure --disable-libnl
+ make CC=${{ matrix.CC }}