Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch Travis to use Ubuntu 16.04 "xenial", and other CI tweaks #2759

Merged
merged 5 commits into from
Nov 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# We want Ubuntu 14.04 "Trust" instead of 12.04 "Precise" to get newer
# and less buggy gcov
dist: trusty
# Force Ubuntu 16.04 "Xenial" to get newer GCC, binutils etc.
dist: xenial
language: c

env:
global:
- CFLAGS="--coverage -O2"
- LDFLAGS="--coverage"
# default config flags: enable debug asserts, and treat compiler warnings as errors
- CONFIGFLAGS="--enable-debug --enable-Werror"
fingolfin marked this conversation as resolved.
Show resolved Hide resolved
# default config flags: enable debug asserts
- CONFIGFLAGS="--enable-debug"

addons:
apt_packages:
Expand All @@ -22,7 +21,7 @@ matrix:
# the same in 32 bit mode, and with debugging turned off, to (a) make it
# a lot faster, and (b) to make sure nobody accidentally put some vital
# computing into code that is only run when debugging is on.
- env: TEST_SUITES="docomp testtravis" ABI=32 CONFIGFLAGS="--enable-Werror"
- env: TEST_SUITES="docomp testtravis" ABI=32 CONFIGFLAGS=""
addons:
apt_packages:
- gcc-multilib
Expand All @@ -31,7 +30,11 @@ matrix:
- libreadline-dev:i386

# compiler packages and run package tests
- env: TEST_SUITES=testpackages
# don't use --coverage in CFLAGS, it causes the weird `atexit` bug in
# digraphs and other kernel extensions using C++ code (due to GCC's
# `profiler_trace.h` calling `atexit`; but that fails in loadable modules
# for technical reasons)
- env: TEST_SUITES=testpackages CFLAGS="-O2" LDFLAGS=
addons:
apt_packages:
- gcc-multilib
Expand All @@ -41,13 +44,13 @@ matrix:
- libreadline-dev
- libboost-dev # for NormalizInterface
- libmpfr-dev # for float
- libmpfi-dev # for float
- libmpfi0-dev # for float
- libmpc-dev # for float
#- libfplll-dev # for float
- pari-gp # for alnuth
- libzmq3-dev # for ZeroMQInterface

- env: TEST_SUITES=testpackages ABI=32
- env: TEST_SUITES=testpackages CFLAGS="-O2" LDFLAGS= ABI=32
addons:
apt_packages:
- gcc-multilib
Expand All @@ -58,7 +61,7 @@ matrix:
- libcurl4-openssl-dev:i386 # for curlInterface
- libboost-dev:i386 # for NormalizInterface
- libmpfr-dev:i386 # for float
- libmpfi-dev:i386 # for float
- libmpfi0-dev:i386 # for float
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- libmpfi0-dev:i386 # for float
- libmpfi0-dev:i386 # for float

- libmpc-dev:i386 # for float
#- libfplll-dev:i386 # for float
- pari-gp:i386 # for alnuth
Expand Down Expand Up @@ -95,7 +98,7 @@ matrix:
- env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=64 BUILDDIR=build
# for 32bit mode, also turn off debugging (see elsewhere in this file for
# an explanation)
- env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=32 BUILDDIR=build CONFIGFLAGS="--enable-Werror"
- env: TEST_SUITES="docomp testinstall" NO_COVERAGE=1 ABI=32 BUILDDIR=build CONFIGFLAGS=""
addons:
apt_packages:
- gcc-multilib
Expand All @@ -116,10 +119,13 @@ matrix:
- env: TEST_SUITES="testlibgap"

script:
- set -e
- gcov --version
- bash etc/ci-prepare.sh && bash etc/ci.sh
- bash etc/ci-prepare.sh
- bash etc/ci.sh

after_script:
- set -e
- bash etc/ci-gather-coverage.sh
- bash <(curl -s https://codecov.io/bash)

Expand Down
9 changes: 6 additions & 3 deletions etc/ci-gather-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
SRCDIR=${SRCDIR:-$PWD}

# Make sure any Error() immediately exits GAP with exit code 1.
GAP="bin/gap.sh --quitonbreak -q"
GAP="bin/gap.sh --quitonbreak --nointeract --alwaystrace -q"

# change into BUILDDIR (creating it if necessary), and turn it into an absolute path
if [[ -n "$BUILDDIR" ]]
Expand All @@ -38,12 +38,15 @@ if LoadPackage("profiling") <> true then
FORCE_QUIT_GAP(1);
fi;
d := Directory("$COVDIR");;
Print("Scanning for coverage data...\n");
covs := [];;
for f in DirectoryContents(d) do
if f in [".", ".."] then continue; fi;
Add(covs, Filename(d, f));
f := Filename(d, f);
Add(covs, f);
Print(" ", f, "\n");
od;
Print("Merging coverage results\n");
Print("Merging ", Length(covs), " coverage files...\n");
r := MergeLineByLineProfiles(covs);;
Print("Outputting JSON\n");
OutputJsonCoverage(r, "gap-coverage.json");;
Expand Down
4 changes: 2 additions & 2 deletions etc/ci-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ fi


# configure and make GAP
"$SRCDIR/configure" $CONFIGFLAGS --enable-Werror
make V=1 -j4
time "$SRCDIR/configure" $CONFIGFLAGS --enable-Werror
time make V=1 -j4

# download packages; instruct wget to retry several times if the
# connection is refused, to work around intermittent failures
Expand Down
21 changes: 5 additions & 16 deletions etc/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,15 @@ do
rm -rf pargap*
# skip PolymakeInterface: no polynmake installed (TODO: is there a polymake package we can use)
rm -rf PolymakeInterface*
# skip xgap: no X11 headers, and no means to test it
rm -rf xgap*

# HACK to work out timestamp issues with anupq
touch anupq*/configure* anupq*/Makefile* anupq*/aclocal.m4

# HACK: skip building digraphs for now -- it doesn't link reliably on travis
rm -rf digraphs-*

# HACK: skip building semigroups-3.x for now -- it requires GCC >= 5, which Travis doesn't have
rm -rf semigroups-3.*

# HACK: skip building float for now -- it doesn't link reliably on travis
rm -rf float-*

if [[ x"$ABI" == "x32" ]]
then
# HACK: disable NormalizInterface in 32bit mode for now. Version
# 0.9.8 doesn't make it easy to support 32bit. With the next
# release of the package, this will hopefully change.
rm -rf NormalizInterface-0.9.8
fi
# HACK: workaround GMP 5 bug causing "error: '::max_align_t' has not been declared",
# see <https://gcc.gnu.org/gcc-4.9/porting_to.html>
printf "%s\n" 1 i "#include <stddef.h>" . w | ed float*/src/mp_poly.C

# reset CFLAGS and LDFLAGS before compiling packages, to prevent
# them from being compiled with coverage gathering, because
Expand Down