From 0f8e3c9f6f2ed4052387397756cd6e05cd28cd00 Mon Sep 17 00:00:00 2001 From: Kirill Isakov Date: Sun, 1 May 2022 18:56:23 +0600 Subject: [PATCH] CI: run all test flavors on BSDs --- .builds/freebsd.yml | 30 ++++++++++-------------------- .builds/netbsd.yml | 30 ++++++++++++------------------ .builds/openbsd.yml | 24 ++++++++---------------- .ci/bsd/run.sh | 11 +++++++++++ src/meson.build | 3 +++ 5 files changed, 44 insertions(+), 54 deletions(-) create mode 100755 .ci/bsd/run.sh diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml index b7d06813..86588950 100644 --- a/.builds/freebsd.yml +++ b/.builds/freebsd.yml @@ -1,32 +1,22 @@ image: freebsd/13.x packages: - - coreutils + - cmocka + - libgcrypt + - liblz4 + - lzo2 - meson - pkgconf - - openssl - - lzo2 - - liblz4 - - ncurses - - miniupnpc - - readline - texinfo - vde2 - - libgcrypt - - cmocka sources: - https://github.com/gsliepen/tinc -tasks: - - configure: | - cd tinc - meson setup build -Dpkg_config_path=/usr/local/lib/pkgconfig +environment: + PKG_CONFIG_PATH: /usr/local/libdata/pkgconfig - - build: | - cd tinc - ninja -C build - - - test: | - cd tinc - meson test -C build --verbose +tasks: + - openssl: sh tinc/.ci/bsd/run.sh openssl + - nolegacy: sh tinc/.ci/bsd/run.sh nolegacy + - gcrypt: sh tinc/.ci/bsd/run.sh gcrypt diff --git a/.builds/netbsd.yml b/.builds/netbsd.yml index 7fbaca45..41e5895f 100644 --- a/.builds/netbsd.yml +++ b/.builds/netbsd.yml @@ -1,28 +1,22 @@ image: netbsd/9.x packages: - - meson - - pkgconf - - openssl - - lzo + - cmocka + - gtexinfo + - libgcrypt - lz4 + - lzo + - meson - miniupnpc - - readline - - gtexinfo - - cmocka + - pkgconf sources: - https://github.com/gsliepen/tinc -tasks: - - configure: | - cd tinc - meson setup build -Dpkg_config_path=/usr/pkg/lib/pkgconfig -Dminiupnpc=auto - - - build: | - cd tinc - ninja -C build +environment: + PKG_CONFIG_PATH: /usr/pkg/lib/pkgconfig - - test: | - cd tinc - meson test -C build --verbose +tasks: + - openssl: sh tinc/.ci/bsd/run.sh openssl + - nolegacy: sh tinc/.ci/bsd/run.sh nolegacy + - gcrypt: sh tinc/.ci/bsd/run.sh gcrypt diff --git a/.builds/openbsd.yml b/.builds/openbsd.yml index f931ca4a..cd5183e4 100644 --- a/.builds/openbsd.yml +++ b/.builds/openbsd.yml @@ -1,27 +1,19 @@ image: openbsd/7.0 packages: - - meson - - pkgconf - - lzo2 + - cmocka + - libgcrypt - lz4 + - lzo2 + - meson - miniupnpc - - readline + - pkgconf - texinfo - - cmocka sources: - https://github.com/gsliepen/tinc tasks: - - configure: | - cd tinc - meson setup build -Dminiupnpc=auto - - - build: | - cd tinc - ninja -C build - - - test: | - cd tinc - meson test -C build --verbose + - openssl: sh tinc/.ci/bsd/run.sh openssl + - nolegacy: sh tinc/.ci/bsd/run.sh nolegacy + - gcrypt: sh tinc/.ci/bsd/run.sh gcrypt diff --git a/.ci/bsd/run.sh b/.ci/bsd/run.sh new file mode 100755 index 00000000..26204415 --- /dev/null +++ b/.ci/bsd/run.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -eu + +flavor=$1 + +cd tinc + +meson setup "$flavor" -D crypto="$flavor" -D miniupnpc=auto + +meson test -C "$flavor" --verbose diff --git a/src/meson.build b/src/meson.build index 1d195cfa..351124e7 100644 --- a/src/meson.build +++ b/src/meson.build @@ -278,6 +278,9 @@ else if not dep_readline.found() dep_readline = cc.find_library('readline', required: opt_readline, static: static) endif + if not dep_readline.found() + dep_readline = cc.find_library('libedit', required: opt_readline, static: static) + endif if dep_readline.found() and \ cc.has_header('readline/readline.h', dependencies: dep_readline) and \ cc.has_header('readline/history.h', dependencies: dep_readline) -- 2.20.1