Add support of Travis CI.
This commit is contained in:
parent
7f2ffd7e1c
commit
7607d9e826
12
.travis.yml
Normal file
12
.travis.yml
Normal file
@ -0,0 +1,12 @@
|
||||
language: cpp
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
env:
|
||||
- CONFIG=minimal
|
||||
- CONFIG=full ; SSL=openssl
|
||||
- CONFIG=full ; SSL=gnutls
|
||||
install:
|
||||
- autotest/travis/install-build-depends.sh
|
||||
script:
|
||||
- autotest/travis/build-and-test.sh
|
45
autotest/travis/build-and-test.sh
Executable file
45
autotest/travis/build-and-test.sh
Executable file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
export CFLAGS="$(dpkg-buildflags --get CFLAGS) $(dpkg-buildflags --get CPPFLAGS)"
|
||||
export LDFLAGS="$(dpkg-buildflags --get LDFLAGS) -Wl,--as-needed"
|
||||
|
||||
mkdir -p builddir
|
||||
cd builddir
|
||||
|
||||
CMAKEOPTS="..
|
||||
-DCMAKE_INSTALL_PREFIX=/usr"
|
||||
|
||||
if [ "${CONFIG}" = "full" ]; then
|
||||
CMAKEOPTS="${CMAKEOPTS}
|
||||
-DRELEASE=OFF
|
||||
-DLOWLEVEL_DEBUG=ON
|
||||
-DSSL_SUPPORT=ON
|
||||
-DADC_STRESS=ON"
|
||||
else
|
||||
CMAKEOPTS="${CMAKEOPTS}
|
||||
-DRELEASE=ON
|
||||
-DLOWLEVEL_DEBUG=OFF
|
||||
-DSSL_SUPPORT=OFF
|
||||
-DADC_STRESS=OFF"
|
||||
fi
|
||||
|
||||
if [ "${SSL}" = "openssl" ]; then
|
||||
CMAKEOPTS="${CMAKEOPTS}
|
||||
-DUSE_OPENSSL=ON"
|
||||
elif [ "${SSL}" = "gnutls" ]; then
|
||||
CMAKEOPTS="${CMAKEOPTS}
|
||||
-DUSE_OPENSSL=OFF"
|
||||
fi
|
||||
|
||||
|
||||
cmake ${CMAKEOPTS} \
|
||||
-DCMAKE_C_FLAGS="${CFLAGS}" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}"
|
||||
make VERBOSE=1
|
||||
|
||||
|
||||
sudo make install
|
||||
du -shc /etc/uhub/ /usr/bin/uhub* /usr/lib/uhub/
|
||||
|
15
autotest/travis/install-build-depends.sh
Executable file
15
autotest/travis/install-build-depends.sh
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
sudo apt-get update -qq
|
||||
|
||||
sudo apt-get install -qq cmake
|
||||
|
||||
if [ "${CONFIG}" = "full" ]; then
|
||||
sudo apt-get install -qq libsqlite3-dev
|
||||
fi
|
||||
|
||||
if [ "${SSL}" = "openssl" ]; then
|
||||
sudo apt-get install -qq libssl-dev
|
||||
elif [ "${SSL}" = "gnutls" ]; then
|
||||
sudo apt-get install -qq libgnutls-dev
|
||||
fi
|
Loading…
Reference in New Issue
Block a user