From 6ac1e6e0500306cd0797fa2e75f075dfeaa43023 Mon Sep 17 00:00:00 2001 From: odidev Date: Tue, 21 Jul 2020 16:06:02 +0000 Subject: [PATCH] Added arm64 jobs for Travis-CI Signed-off-by: odidev --- .travis.yml | 28 +++++++++++++++++-- .../tests/test_backends_interactive.py | 3 ++ requirements/testing/travis_arm64_extra.txt | 6 ++++ 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 requirements/testing/travis_arm64_extra.txt diff --git a/.travis.yml b/.travis.yml index 5630514bf7bb..a405782d0c18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,6 +70,7 @@ env: - NO_AT_BRIDGE=1 # Necessary for GTK3 interactive test. - OPENBLAS_NUM_THREADS=1 - PYTHONFAULTHANDLER=1 + - XVFB="" matrix: include: @@ -77,12 +78,31 @@ matrix: 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 @@ -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 @@ -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 # 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 diff --git a/lib/matplotlib/tests/test_backends_interactive.py b/lib/matplotlib/tests/test_backends_interactive.py index 000ff971bc97..376fb4f87df4 100644 --- a/lib/matplotlib/tests/test_backends_interactive.py +++ b/lib/matplotlib/tests/test_backends_interactive.py @@ -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": + pytest.skip("Skipping for aarch64 architecture") if backend == "macosx": if toolbar == "toolmanager": pytest.skip("toolmanager is not implemented for macosx.") diff --git a/requirements/testing/travis_arm64_extra.txt b/requirements/testing/travis_arm64_extra.txt new file mode 100644 index 000000000000..44704a929b4a --- /dev/null +++ b/requirements/testing/travis_arm64_extra.txt @@ -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