]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
github: run macOS build
authorTomas Krizek <tomas.krizek@nic.cz>
Wed, 25 Nov 2020 10:18:44 +0000 (11:18 +0100)
committerPetr Špaček <petr.spacek@nic.cz>
Wed, 25 Nov 2020 17:21:15 +0000 (18:21 +0100)
.github/workflows/macOS.yaml [new file with mode: 0644]

diff --git a/.github/workflows/macOS.yaml b/.github/workflows/macOS.yaml
new file mode 100644 (file)
index 0000000..73c37e3
--- /dev/null
@@ -0,0 +1,46 @@
+name: macOS
+
+on: push
+
+jobs:
+  build-test:
+    name: Build & unit tests & sanity check
+    runs-on: macOS-latest
+
+    steps:
+      - name: Checkout resolver code
+        uses: actions/checkout@v2
+        with:
+          submodules: true
+
+      - name: Install dependecies from brew
+        run:
+          brew install cmocka luajit libuv lmdb meson nghttp2 automake libtool
+
+      - name: Install libknot from sources
+        env:
+          KNOT_DNS_VERSION: '3.0'
+        run: |
+          git clone -b ${KNOT_DNS_VERSION} https://gitlab.nic.cz/knot/knot-dns.git
+          cd knot-dns
+          autoreconf -fi
+          ./configure --disable-static --disable-fastparser --disable-documentation --disable-daemon --disable-utilities --with-lmdb=no
+          make -j2 install
+          cd ..
+
+      - name: Build resolver
+        run: |
+          meson build_darwin --default-library=static --buildtype=debugoptimized --prefix=${HOME}/.local/usr -Dc_args='-fno-omit-frame-pointer'
+          ninja -C build_darwin -v install
+
+      - name: Run unit tests
+        env:
+          MALLOC_CHECK_: 3
+          MALLOC_PERTURB_: 223
+        run: meson test -C build_darwin --suite unit
+
+      - name: Run kresd
+        env:
+          MALLOC_CHECK_: 3
+          MALLOC_PERTURB_: 223
+        run: echo "quit()" | ${HOME}/.local/usr/sbin/kresd -a 127.0.0.1@53535 .