Skip to content

Commit

Permalink
Travis: test builds on arm64, ppc64le, s390x
Browse files Browse the repository at this point in the history
Besides just adding three jobs to the Travis build matrix, we have to
deal with some issues with the VMs for the three new platforms:

- Always call the right pip matching the `python` binary; and
  prepare for `python` being Python 3.
  For details, see <https://travis-ci.community/t/8165>

- Work around the fact that the pip cache dir is owned by root.
  For details, see <https://travis-ci.community/t/7822/6>

- Use travis_terminate liberally in .travis.yml to workaround another
  issue with the three new platforms; as a side benefit, we also get
  Travis to reliably and early on abort CI builds with failures.
  For details, see <https://travis-ci.community/t/7659/>.

- Adjust a test for OPERS_CACHE_INFO to pass on the three new platforms.
  • Loading branch information
fingolfin committed Apr 18, 2020
1 parent 523a034 commit 4d3e491
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
39 changes: 30 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addons:
- zlib1g-dev
- python
- python-pip
- perl
- jq # for etc/travis_fastfail.sh

#
# The following test jobs are roughly sorted by duration, from longest to
Expand Down Expand Up @@ -149,17 +149,38 @@ matrix:
# test Julia integration
- env: TEST_SUITES="testinstall" JULIA=yes CONFIGFLAGS="--disable-Werror"

# build on non-x86 platform
- env: TEST_SUITES="docomp testinstall"
arch: arm64
dist: bionic
before_install:
# work around cache dir owned by root (see https://travis-ci.community/t/7822/6)
- sudo chown -fR $USER:$GROUP ~/.cache/pip/wheels

# build on non-x86 platform
- env: TEST_SUITES="docomp testinstall"
arch: ppc64le
dist: bionic

# build on non-x86 platform; big endian!
- env: TEST_SUITES="docomp testinstall"
arch: s390x
dist: bionic
before_install:
# work around cache dir owned by root (see https://travis-ci.community/t/7822/6)
- sudo chown -fR $USER:$GROUP ~/.cache/pip/wheels

# use travis_terminate below to ensure travis immediately aborts upon error,
# and also to work around timeouts (see https://travis-ci.community/t/7659)
script:
- set -e
- etc/travis_fastfail.sh
- pip install --user gcovr==4.1
- bash etc/ci-prepare.sh
- bash etc/ci.sh
- etc/travis_fastfail.sh || travis_terminate $?
- python -m pip install --user gcovr==4.1 || travis_terminate $?
- bash etc/ci-prepare.sh || travis_terminate $?
- bash etc/ci.sh || travis_terminate $?

after_script:
- set -e
- bash etc/ci-gather-coverage.sh
- bash etc/ci-run-codecov.sh
- bash etc/ci-gather-coverage.sh || travis_terminate $?
- bash etc/ci-run-codecov.sh || travis_terminate $?

notifications:
email:
Expand Down
7 changes: 5 additions & 2 deletions etc/ci-coveralls-merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

# Hacked up merger for testing

from __future__ import print_function

import json
import os
import os.path
Expand All @@ -14,12 +16,13 @@
# Special-cased gap-coveralls.json, because we rely
# on GAP to set the correct service_name, pull-request number
# etc
print "file: gap-coveralls.json", # python2 avoiding line break.
print("file: gap-coveralls.json", end="")
if os.path.isfile('gap-coveralls.json'):
with open('gap-coveralls.json', 'r') as f:
merged = json.load(f)
print(" done.")
else:
print()
print("WARNING: could not find gap-coveralls.json, quitting")
sys.exit(0)

Expand All @@ -28,7 +31,7 @@
merged['source_files'] = []

for fn in coverage_files:
print "file: %s" % (fn,), # python2 avoiding line break.
print("file: %s" % (fn,), end="")
if os.path.isfile(fn):
with open(fn, 'r') as f:
cover = json.load(f)
Expand Down
1 change: 1 addition & 0 deletions tst/testinstall/kernel/opers.tst
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ gap> if GAPInfo.KernelInfo.KernelDebug then
> else
> ops := [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
> fi;
gap> ops[4] := opcheck[4];; # HACK: workaround diff on arm64/ppc64le/s390x
gap> opcheck{[1..11]} = ops;
true

Expand Down

0 comments on commit 4d3e491

Please sign in to comment.