Skip to content

Commit

Permalink
Add more variants for Travis builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Konovalov authored and fingolfin committed Mar 13, 2017
1 parent 0917593 commit 2722059
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 14 deletions.
23 changes: 21 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,26 @@ env:
global:
- CFLAGS="-fprofile-arcs -ftest-coverage"
- LDFLAGS="-fprofile-arcs"
- BUILDDIR=.
matrix:
# - TEST_SUITE=testinstall ABI=32 # trusty is missing 32bit gmp, see https://github.com/travis-ci/apt-package-whitelist/pull/4018
- TEST_SUITE=testinstall ABI=32 CONFIGFLAGS=--with-gmp=builtin
- TEST_SUITE=testinstall ABI=64
- TEST_SUITE=testinstall ABI=64 CONFIGFLAGS=--with-gmp=builtin
# out of three builds
- TEST_SUITE=testinstall ABI=32 BUILDDIR=build CONFIGFLAGS=--with-gmp=builtin
- TEST_SUITE=testinstall ABI=64 BUILDDIR=build
- TEST_SUITE=testinstall ABI=64 BUILDDIR=build CONFIGFLAGS=--with-gmp=builtin

# TODO: boehm GC, HPC-GAP compatibility mode

addons:
apt_packages:
- libgmp-dev
- libreadline-dev
- gcc-multilib
- g++-multilib
- texinfo

matrix:
include:
Expand Down Expand Up @@ -77,11 +92,15 @@ after_success:
- bash <(curl -s https://codecov.io/bash)

script:
- export GAPROOT=$TRAVIS_BUILD_DIR
- ./autogen.sh
- ./configure
- mkdir -p $BUILDDIR
- cd $BUILDDIR
- $GAPROOT/configure $CONFIGFLAGS
- make -j4
- make bootstrap-pkg-full
- bash etc/ci.sh
- if [[ $BUILDDIR != . ]] ; then mv pkg $GAPROOT/ ; fi
- bash $GAPROOT/etc/ci.sh

notifications:
slack:
Expand Down
27 changes: 15 additions & 12 deletions etc/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@

set -ex

GAPROOT=${GAPROOT:-$PWD}
BUILDDIR=${BUILDDIR:-.}

if [[ "${TEST_SUITE}" == makemanuals ]]
then
make manuals
cat doc/*/make_manuals.out
if [[ $(cat doc/*/make_manuals.out | grep -c "manual.lab written") != '3' ]]
cat $GAPROOT/doc/*/make_manuals.out
if [[ $(cat $GAPROOT/doc/*/make_manuals.out | grep -c "manual.lab written") != '3' ]]
then
echo "Build failed"
exit 1
Expand All @@ -27,10 +30,10 @@ fi

# We need to compile the profiling package in order to generate coverage
# reports; and also the IO package, as the profiling package depends on it.
pushd pkg
pushd $GAPROOT/pkg

cd io*
./configure $CONFIGFLAGS
./configure $CONFIGFLAGS --with-gaproot=$GAPROOT/$BUILDDIR
make
cd ..

Expand All @@ -40,7 +43,7 @@ rm -rf profiling*
git clone https://github.com/gap-packages/profiling
cd profiling
./autogen.sh
./configure $CONFIGFLAGS
./configure $CONFIGFLAGS --with-gaproot=$GAPROOT/$BUILDDIR
make

# return to base directory
Expand All @@ -53,15 +56,15 @@ mkdir -p $COVDIR

case ${TEST_SUITE} in
testmanuals)
bin/gap.sh -q tst/extractmanuals.g
bin/gap.sh -q $GAPROOT/tst/extractmanuals.g

bin/gap.sh -q <<GAPInput
Read("tst/testmanuals.g");
Read("$GAPROOT/tst/testmanuals.g");
SaveWorkspace("testmanuals.wsp");
QUIT_GAP(0);
GAPInput

for ch in tst/testmanuals/*.tst
for ch in $GAPROOT/tst/testmanuals/*.tst
do
bin/gap.sh -q -L testmanuals.wsp --cover $COVDIR/$(basename $ch).coverage <<GAPInput
TestManualChapter("$ch");
Expand All @@ -77,20 +80,20 @@ GAPInput

# run gap compiler to verify the src/c_*.c files are up-todate,
# and also get coverage on the compiler
etc/docomp
make docomp

# detect if there are any diffs
git diff --exit-code

;;
*)
if [[ ! -f tst/${TEST_SUITE}.g ]]
if [[ ! -f $GAPROOT/tst/${TEST_SUITE}.g ]]
then
echo "Could not read test suite tst/${TEST_SUITE}.g"
echo "Could not read test suite $GAPROOT/tst/${TEST_SUITE}.g"
exit 1
fi

bin/gap.sh --cover $COVDIR/${TEST_SUITE}.coverage tst/${TEST_SUITE}.g
bin/gap.sh --cover $COVDIR/${TEST_SUITE}.coverage $GAPROOT/tst/${TEST_SUITE}.g
esac;

# generate library coverage reports
Expand Down

0 comments on commit 2722059

Please sign in to comment.