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

Add Travis tests on arm64, ppc64le, s390x #3744

Merged
merged 1 commit into from
Apr 18, 2020
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
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
44 changes: 42 additions & 2 deletions tst/testinstall/kernel/opers.tst
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,49 @@ gap> opcheck := OPERS_CACHE_INFO();;
gap> opcheck{[1..11]};
[ 0, 0, 0, 6, 0, 0, 4, 0, 0, 0, 0 ]
#@fi

# FIXME: the following code skips entry 4 (OperationHit, which is normally
# equal to 7) because on arm64, ppc64le, and s390x builds on Travis, we see 6
# instead. To get an idea what's going on, I inserted printf statements each
# time OperationHit is incremented. For the arm64, ppc64le, and s390x builds
# on Travis, this is what I get:
#
# OperationHit = 1 for ReadLine
# OperationHit = 2 for CloseStream
# OperationHit = 3 for CloseStream
# OperationHit = 4 for InputTextString
# OperationHit = 5 for OutputTextString
# OperationHit = 6 for PrintFormattingStatus
# OperationHit = 7 for ReadLine
# OperationHit = 8 for CloseStream
# ...
#
# In contrast, this is what I get on x86:
# OperationHit = 1 for ReadLine
# OperationHit = 2 for CloseStream
# OperationHit = 3 for CloseStream
# OperationHit = 4 for Int <--------- this is new
# OperationHit = 5 for InputTextString
# OperationHit = 6 for OutputTextString
# OperationHit = 7 for PrintFormattingStatus
# OperationHit = 8 for ReadLine
# OperationHit = 9 for CloseStream
# ...
#
# I inserted some more code to pinpoint the GAP code leading to this, and I
# found out that the Int call in question is the one in lib/test.gi:213; i.e.,
# in this code:
#
# Print("\r# line ", pos[i],
# " of ", nrlines,
# " (", Int(pos[i] / nrlines * 100), "%)", # <- this is the Int call
# "\c");
#
# Thus the cause of this discrepancy remains a mystery.
#
#@if GAPInfo.KernelInfo.KernelDebug and not IsHPCGAP
gap> opcheck{[1..11]};
[ 0, 0, 0, 7, 0, 0, 2, 0, 0, 0, 0 ]
gap> opcheck{Difference([1..11], [4])};
[ 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 ]
#@fi
#@if not GAPInfo.KernelInfo.KernelDebug
gap> opcheck{[1..11]};
Expand Down