]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
gitlabci: fix build:darwin in travis
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 22 Feb 2019 09:34:16 +0000 (10:34 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:43:37 +0000 (10:43 +0100)
.gitlab-ci.yml
.travis.yml
client/meson.build
meson.build
tests/unit/meson.build

index 6f77be3c21184b0e35e3654f506c84abc8e91ca1..dbeb8ea6aaa33c09d1b70c4ff93948232a7c4f03 100644 (file)
@@ -131,13 +131,6 @@ kres-gen:
   tags:
     - docker
 
-build:darwin:
-  <<: *test_nodep
-  when: delayed
-  start_in: 2 minutes
-  script:
-    - ci/travis.py ${CI_COMMIT_REF_NAME}
-
 deckard:
   <<: *test_flaky
   variables:
@@ -285,6 +278,15 @@ test:valgrind:
 # }}}
 
 # extended {{{
+build:darwin:
+  <<: *test_nodep
+  stage: extended
+  when: delayed
+  start_in: 5 minutes  # give the build in Travis CI time to finish
+  allow_failure: true  # https://github.com/Homebrew/homebrew-core/issues/37169
+  script:
+    - ci/travis.py ${CI_COMMIT_REF_NAME}
+
 pytests:
   <<: *test_flaky
   stage: extended  # use this stage to avoid clash with other resource-intensive jobs
index ff6155089504d72259cc9e185f180f2d1393fc0c..cd4452b7cf1ad75b414c0e9b273b0ad2cc4611f0 100644 (file)
@@ -8,6 +8,8 @@ addons:
             - luajit
             - libuv
             - lmdb
+            - meson
+        update: true
 compiler:
     - clang
 notifications:
@@ -19,7 +21,6 @@ matrix:
 env:
     global:
         - KNOT_DNS_VERSION=v2.7.6
-        - DYLD_LIBRARY_PATH="${HOME}/.local/lib"
         - MALLOC_CHECK_=3
         - MALLOC_PERTURB_=223
 before_script:
@@ -30,8 +31,9 @@ before_script:
     - make -j2 install
     - cd ..
 script:
-    - CFLAGS="-O2 -g -fno-omit-frame-pointer -DDEBUG" make -j2 install check V=1 PREFIX=${HOME}/.local DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}
-    - ./daemon/kresd -h
-    - ./daemon/kresd -V
-    - echo "quit()" | ./daemon/kresd -a 127.0.0.1@53535 .
+    - meson build_darwin --default-library=static --buildtype=debugoptimized --prefix=${HOME}/.local -Dc_args='-fno-omit-frame-pointer'
+    - ninja -C build_darwin install
+    - ${HOME}/.local/usr/sbin/kresd -h
+    - ${HOME}/.local/usr/sbin/kresd -V
+    - echo "quit()" | ${HOME}/.local/usr/sbin/kresd -a 127.0.0.1@53535 .
 sudo: false
index 9d39a9505148f63a95dfa830e57b98d94a77cd55..cb297d42059d8331779b4f2a7a9e2e4fc34fcd88 100644 (file)
@@ -11,9 +11,7 @@ if not get_option('client').disabled()
   libedit = dependency('libedit', required: false)
   if libedit.found()
     build_client = true
-  else
-    # fallback lib
-    # TODO why call find_library? osx workaround?
+  else  # darwin workaround: missing pkgconfig
     libedit = meson.get_compiler('c').find_library('edit', required: get_option('client'))
     if libedit.found()
       build_client = true
index de162c2c482348671d4c8d299691d4fd9d18dcc6..bca7ccdc59bcc541385d2cd56ba5233d586d20ca 100644 (file)
@@ -14,7 +14,10 @@ libknot = dependency('libknot', version: knot_version)
 libdnssec = dependency('libdnssec', version: knot_version)
 libzscanner = dependency('libzscanner', version: knot_version)
 libuv = dependency('libuv', version: '>=1.7')
-lmdb = dependency('lmdb')
+lmdb = dependency('lmdb', required: false)
+if not lmdb.found()  # darwin workaround: missing pkgconfig
+  lmdb = meson.get_compiler('c').find_library('lmdb')
+endif
 gnutls = dependency('gnutls')
 luajit = dependency('luajit')
 message('------------------------------')
index a78f3f7bc7fec2ff92d0452ec7bc98de50f11296..db6e875977c10bfe44295a52ed528a3bc2a25986 100644 (file)
@@ -5,17 +5,13 @@ mock_cmodule_src = files([
   'mock_cmodule.c',
 ])
 
-mock_cmodule_lib = shared_library(
+mock_cmodule_mod = shared_module(
   'mock_cmodule',
   mock_cmodule_src,
   name_prefix: '',
   dependencies: libkres_dep,
 )
 
-mock_cmodule_dep = declare_dependency(
-  link_with: mock_cmodule_lib,
-)
-
 # executables with tests
 foreach unit_test : unit_tests
   exec_test = executable(