travis-ci

This commit is contained in:
Michael Davidsaver
2017-06-14 14:06:44 +02:00
parent d272afc128
commit 07e42d81f4
2 changed files with 68 additions and 0 deletions

25
.travis.yml Normal file
View File

@@ -0,0 +1,25 @@
sudo: false
dist: trusty
language: c
compiler:
- gcc
addons:
apt:
packages:
- libreadline6-dev
- libncurses5-dev
- perl
- clang
install:
- ./ci/travis-prepare.sh
script:
- make -j2
- make tapfiles
- find . -name '*.tap' -print0 | xargs -0 -n1 prove -e cat -f
env:
- BRBASE=3.16
- BRBASE=3.16 CMPLR=clang
- BRBASE=3.16 USR_CXXFLAGS=-std=c++11
- BRBASE=3.16 USR_CXXFLAGS=-std=c++11 CMPLR=clang
- BRBASE=3.15
- BRBASE=3.14

43
ci/travis-prepare.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
set -e -x
cat << EOF > configure/RELEASE.local
EPICS_BASE=$HOME/.source/epics-base
EOF
install -d "$HOME/.source"
cd "$HOME/.source"
git clone --quiet --depth 5 --branch "$BRBASE" https://github.com/${REPOBASE:-epics-base}/epics-base.git epics-base
(cd epics-base && git log -n1 )
EPICS_HOST_ARCH=`sh epics-base/startup/EpicsHostArch`
case "$CMPLR" in
clang)
echo "Host compiler is clang"
cat << EOF >> epics-base/configure/os/CONFIG_SITE.Common.$EPICS_HOST_ARCH
GNU = NO
CMPLR_CLASS = clang
CC = clang
CCC = clang++
EOF
# hack
sed -i -e 's/CMPLR_CLASS = gcc/CMPLR_CLASS = clang/' epics-base/configure/CONFIG.gnuCommon
clang --version
;;
*)
echo "Host compiler is default"
gcc --version
;;
esac
cat <<EOF >> epics-base/configure/CONFIG_SITE
USR_CPPFLAGS += $USR_CPPFLAGS
USR_CFLAGS += $USR_CFLAGS
USR_CXXFLAGS += $USR_CXXFLAGS
EOF
make -j2 -C epics-base