Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/openbsdwork' into ronaldtse-buil…
Browse files Browse the repository at this point in the history
…d-openbsd

* origin/openbsdwork:
  initial CI tests for OpenBSD
  • Loading branch information
ronaldtse committed Jan 23, 2018
2 parents 4ca2013 + c813b55 commit ed7a11f
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 4 deletions.
36 changes: 36 additions & 0 deletions ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,42 @@ openbsd_install() {
sudo pkg_add gnupg-2.1.15p2
sudo pkg_add wget
sudo pkg_add libiconv
if [ "$(id -u)" -ne 0 ]; then
echo "need to run as root"
exit 1
fi

export PKG_PATH="https://cloudflare.cdn.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)"

# CI script dependencies
for pkg in bash git wget; do
pkg_info | grep -q "${pkg}" && \
continue

pkg_add -I "${pkg}"
done

rm -f /bin/bash
ln -s /usr/local/bin/bash /bin/bash
grep -q "^/bin/bash" || \
echo "/bin/bash" >> /etc/shells

for pkg in automake gnupg; do
pkg_ver="$(pkg_add -In ${pkg} 2>&1 | grep ^Ambiguous | tr ' ' '\n' | grep ${pkg}- | sort -V | tail -1)"

pkg_info | grep -q "${pkg_ver}" && \
continue

echo "Installing: ${pkg_ver}"
pkg_add -I "${pkg_ver}"
done

rm -f ${GPG21_INSTALL}/bin/gpg
ln /usr/local/bin/gpg2 ${GPG21_INSTALL}/bin/gpg

# Python will be installed as a dependency of gnupg
rm -f /bin/python
ln -s /usr/local/bin/python2.7 /bin/python
}

netbsd_install() {
Expand Down
2 changes: 1 addition & 1 deletion ci/env-openbsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export JSONC_INSTALL="${LOCAL_BUILDS}/builds/json-c-install"
export GPG21_INSTALL="${LOCAL_BUILDS}/builds/gpg21-install"
export BUILD_MODE=normal
export CLANG_FORMAT_DIFF="clang-format-diff-4.0"
export CC=clang
export CC=gcc
export MAKE=gmake
export AUTOCONF_VERSION=2.69
export AUTOMAKE_VERSION=1.15
Expand Down
1 change: 0 additions & 1 deletion ci/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,3 @@ cd src/tests
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${GPG21_INSTALL}/lib"
export LD_LIBRARY_PATH
env RNPC_GPG_PATH="${GPG21_INSTALL}/bin/gpg" python2 cli_tests.py -w -v

1 change: 0 additions & 1 deletion ci/style-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ if [ "$diffs" != "" ]; then
echo "$diffs"
exit 1
fi

1 change: 0 additions & 1 deletion ci/success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ if [ "$BUILD_MODE" = "coverage" ]; then
gcov-4.8 --object-file rnp_tests-rnp_tests.o rnp_tests.c
bash <(curl -s https://codecov.io/bash)
fi

0 comments on commit ed7a11f

Please sign in to comment.