Skip to content

Commit

Permalink
build: update tested os versions
Browse files Browse the repository at this point in the history
Signed-off-by: Javier Ron <[email protected]>
  • Loading branch information
javierron committed Aug 13, 2018
1 parent 274f444 commit 6927cdf
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 15 deletions.
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: trusty
dist: xenial
sudo: required
language: cpp

Expand Down Expand Up @@ -29,15 +29,13 @@ matrix:
- os: linux
env: DOCKER_IMAGE=centos:7
- os: linux
env: DOCKER_IMAGE=fedora:26
env: DOCKER_IMAGE=fedora:27
- os: linux
env: DOCKER_IMAGE=fedora:25
env: DOCKER_IMAGE=fedora:28
- os: linux
env: DOCKER_IMAGE=fedora:24
env: DOCKER_IMAGE=debian:stretch
- os: linux
env: DOCKER_IMAGE=debian:jessie
- os: linux
env: DOCKER_IMAGE=ubuntu:trusty
env: DOCKER_IMAGE=ubuntu:bionic
- os: linux
env: DOCKER_IMAGE=ubuntu:xenial RUN_COVERAGE=0
- os: linux
Expand Down
6 changes: 4 additions & 2 deletions ci/install-ceph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ case $ID in
apt-get install -y wget curl lsb-release \
software-properties-common apt-transport-https

ceph_ver=luminous
ceph_ver=mimic
ceph_deb_release=$(lsb_release -sc)
ceph_http_code=$(curl -o /dev/null --silent --head --write-out '%{http_code}' \
http://download.ceph.com/debian-${ceph_ver}/dists/${ceph_deb_release}/)
Expand All @@ -31,8 +31,10 @@ case $ID in
wget -q -O- 'https://download.ceph.com/keys/release.asc' | $SUDO apt-key add -
$SUDO apt-add-repository "deb https://download.ceph.com/debian-${ceph_ver}/ ${ceph_deb_release} main"


$SUDO apt-get update
$SUDO apt-get install -y librados-dev ceph
$SUDO env DEBIAN_FRONTEND=noninteractive \
apt-get install -y -- librados-dev ceph
;;

centos|fedora)
Expand Down
2 changes: 1 addition & 1 deletion ci/local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ZLOG_DIR=${THIS_DIR}/../

export TRAVIS_BRANCH=
export TRAVIS_OS_NAME="linux"
export DOCKER_IMAGE=ubuntu:xenial
export DOCKER_IMAGE=ubuntu:bionic
export TRAVIS_BUILD_DIR=${ZLOG_DIR}

trap "docker kill micro-osd ceph-plugin-built; docker rm micro-osd ceph-plugin-built" EXIT
Expand Down
13 changes: 9 additions & 4 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ fi
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}"

JNI="ON"
if ! [ -x "$(command -v javah)" ]; then
JNI="OFF"
fi

if [[ "$OSTYPE" != "darwin"* ]]; then
CMAKE_FLAGS="${CMAKE_FLAGS} -DWITH_CEPH=ON -DWITH_JNI=ON"
CMAKE_FLAGS="${CMAKE_FLAGS} -DWITH_CEPH=ON -DWITH_JNI=${JNI}"
fi


pushd ${BUILD_DIR}
cmake ${CMAKE_FLAGS} ${ZLOG_DIR}
make -j$(nproc) VERBOSE=1
Expand Down Expand Up @@ -70,15 +76,14 @@ for test_runner in $tests; do
fi
done

if [[ "$OSTYPE" != "darwin"* ]]; then
if [[ "$OSTYPE" != "darwin"* && "$JNI" == "ON" ]]; then
pushd ${BUILD_DIR}/src/java

export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:${INSTALL_DIR}/lib64:${INSTALL_DIR}/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

# i'm giving up for the time being on how to fix a dynamic library loading
# issue that is only showing up on debian jessie. see issue #143
OS_ID=$(lsb_release -si)
OS_CODE=$(lsb_release -sc)

if [[ ${OS_ID} == "Debian" && ${OS_CODE} == "jessie" ]]; then
export LD_LIBRARY_PATH=/usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/xawt/:$LD_LIBRARY_PATH
fi
Expand Down
3 changes: 2 additions & 1 deletion src/java/native/zlogjni.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ void Java_org_cruzdb_zlog_Log_disposeInternal(
delete reinterpret_cast<zlog::Log*>(jhandle);
}

zlog::Options options;

JNIEXPORT void JNICALL Java_org_cruzdb_zlog_Log_openNative
(JNIEnv *env, jobject jobj, jstring jscheme,
jobjectArray jkeys, jobjectArray jvals, jstring jname)
Expand Down Expand Up @@ -68,7 +70,6 @@ JNIEXPORT void JNICALL Java_org_cruzdb_zlog_Log_openNative
return;
}

zlog::Options options;
zlog::Log *log;
int ret = zlog::Log::Create(options, scheme, name, opts, "", "", &log);

Expand Down

0 comments on commit 6927cdf

Please sign in to comment.