Skip to content

Added arm64 jobs for Travis-CI #18000

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

Closed
wants to merge 1 commit into from
Closed
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
28 changes: 26 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,39 @@ env:
- NO_AT_BRIDGE=1 # Necessary for GTK3 interactive test.
- OPENBLAS_NUM_THREADS=1
- PYTHONFAULTHANDLER=1
- XVFB=""

matrix:
include:
- python: 3.7
env:
- PINNEDVERS='-c requirements/testing/minver.txt'
- DELETE_FONT_CACHE=1
- python: 3.7
arch: arm64
env:
- PINNEDVERS='-c requirements/testing/minver.txt'
- DELETE_FONT_CACHE=1
- PIP_NO_CACHE_DIR=off
- XVFB=xvfb-run
- python: 3.7
env:
- EXTRAREQS='-r requirements/testing/travis_extra.txt'
- python: 3.7
arch: arm64
env:
- EXTRAREQS='-r requirements/testing/travis_arm64_extra.txt'
- PIP_NO_CACHE_DIR=off
- XVFB=xvfb-run
- python: 3.8
env:
- EXTRAREQS='-r requirements/testing/travis_extra.txt'
- python: 3.8
arch: arm64
env:
- EXTRAREQS='-r requirements/testing/travis_arm64_extra.txt'
- PIP_NO_CACHE_DIR=off
- XVFB=xvfb-run
- python: "nightly"
env:
- PRE=--pre
Expand Down Expand Up @@ -121,6 +141,10 @@ install:
git describe
# Upgrade pip and setuptools and wheel to get as clean an install as possible.
python -mpip install --upgrade pip setuptools wheel
- |
if [[ "${TRAVIS_CPU_ARCH}" == "arm64" ]]; then
sudo apt-get install -y xvfb python3-tk imagemagick;
fi
- |
# Install dependencies from PyPI.
python -mpip install --upgrade $PRE -r requirements/testing/travis_all.txt $EXTRAREQS $PINNEDVERS
Expand Down Expand Up @@ -183,10 +207,10 @@ script:
# Each script we want to run need to go in its own section and the program
# you want to fail travis needs to be the last thing called.
- |
# The number of processes is hardcoded (-n2), because using too many
# The number of processes is hardcoded (-n4), because using too many
Copy link
Member

Choose a reason for hiding this comment

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

we get 4 usable cores on travis now?

Copy link
Author

@odidev odidev Jul 27, 2020

Choose a reason for hiding this comment

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

In Arm64, we can use more than two cores, please refer "https://travis-ci.community/t/nproc-reports-32-cores-on-arm64/5851/2". In amd64 it is picking 4 workers as well, but it maybe running on 2 cores only.
but it("-n4") has significant difference in time for Arm64 platform.

Copy link
Member

Choose a reason for hiding this comment

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

The core count wasn't the problem, it was opening too many Inkscape and Ghostscript processes, as noted in the comment below. Though now we pipe everything into a single Inkscape instance (and Ghostscript?) per process, so maybe that's not an issue.

# causes the Travis VM to run out of memory (since so many copies of
# inkscape and ghostscript are running at the same time).
python -mpytest -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n2 --log-level=DEBUG
$XVFB python -mpytest -raR --maxfail=50 --timeout=300 --durations=25 --cov-report= --cov=lib -n4 --log-level=DEBUG

before_cache: |
rm -rf $HOME/.cache/matplotlib/tex.cache
Expand Down
3 changes: 3 additions & 0 deletions lib/matplotlib/tests/test_backends_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ def check_alt_backend(alt_backend):
@pytest.mark.parametrize("toolbar", ["toolbar2", "toolmanager"])
@pytest.mark.flaky(reruns=3)
def test_interactive_backend(backend, toolbar):
# Skipping the test for Travis-CI on arm64 platform
if os.environ.get('TRAVIS_CPU_ARCH') == "arm64":
Copy link
Member

Choose a reason for hiding this comment

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

Does this need a default value (ie. os.environ.get('TRAVIS_CPU_ARCH', '') in case this environment variable isn't present?

pytest.skip("Skipping for aarch64 architecture")
if backend == "macosx":
if toolbar == "toolmanager":
pytest.skip("toolmanager is not implemented for macosx.")
Expand Down
6 changes: 6 additions & 0 deletions requirements/testing/travis_arm64_extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Extra pip requirements of the travis python 3.7+ builds for Arm64 platform

ipykernel
nbconvert[execute]
nbformat!=5.0.0,!=5.0.1
pytz