Skip to content

Commit 8606ae0

Browse files
authored
Merge pull request #4336 from hugovk/travis_arch
Test on new Travis CPUs
2 parents e32a732 + 428b063 commit 8606ae0

14 files changed

Lines changed: 61 additions & 26 deletions
File renamed without changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ pip install pyroma
1616
pip install test-image-results
1717
pip install numpy
1818
if [[ $TRAVIS_PYTHON_VERSION == 3.* ]]; then
19+
# arm64, ppc64le, s390x CPUs:
20+
# "ERROR: Could not find a version that satisfies the requirement pyqt5"
21+
if [[ $TRAVIS_CPU_ARCH == "amd64" ]]; then
1922
sudo apt-get -qq install pyqt5-dev-tools
2023
pip install pyqt5!=5.14.1
24+
fi
2125
fi
2226

2327
# docs only on Python 3.8

.ci/test.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
python -m pytest -v -x --cov PIL --cov Tests --cov-report term Tests
6+
7+
# Docs
8+
if [ "$TRAVIS_PYTHON_VERSION" == "3.8" ] && [ "$TRAVIS_CPU_ARCH" == "amd64" ]; then
9+
make doccheck
10+
fi

.github/workflows/test-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
pip install wheel
5151
sudo apt-get install -qq ruby-dev
5252
PATH="$PATH:~/.local/bin"
53-
.travis/after_success.sh
53+
.ci/after_success.sh
5454
env:
5555
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
5656

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
path: ~/.cache/pip
3838
key:
39-
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.travis/*.sh') }}
39+
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
4040
restore-keys: |
4141
${{ matrix.os }}-${{ matrix.python-version }}-
4242
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
path: ~/Library/Caches/pip
4848
key:
49-
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.travis/*.sh') }}
49+
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
5050
restore-keys: |
5151
${{ matrix.os }}-${{ matrix.python-version }}-
5252
@@ -61,7 +61,7 @@ jobs:
6161
- name: Install Linux dependencies
6262
if: startsWith(matrix.os, 'ubuntu')
6363
run: |
64-
.travis/install.sh
64+
.ci/install.sh
6565
6666
- name: Install macOS dependencies
6767
if: startsWith(matrix.os, 'macOS')
@@ -70,11 +70,11 @@ jobs:
7070
7171
- name: Build
7272
run: |
73-
.travis/build.sh
73+
.ci/build.sh
7474
7575
- name: Test
7676
run: |
77-
.travis/test.sh
77+
.ci/test.sh
7878
7979
- name: Upload errors
8080
uses: actions/upload-artifact@v1
@@ -86,7 +86,7 @@ jobs:
8686
- name: After success
8787
if: success()
8888
run: |
89-
.travis/after_success.sh
89+
.ci/after_success.sh
9090
env:
9191
MATRIX_OS: ${{ matrix.os }}
9292
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

.travis.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ notifications:
66
irc: "chat.freenode.net#pil"
77

88
# Run fast lint first to get fast feedback.
9-
# Run slow PyPy next, to give it a headstart and reduce waiting time.
10-
# Run latest 3.x next, to get quick compatibility results.
9+
# Run slower CPUs next, to give them a headstart and reduce waiting time.
1110
# Then run the remainder.
1211

1312
matrix:
@@ -16,6 +15,14 @@ matrix:
1615
- python: "3.6"
1716
name: "Lint"
1817
env: LINT="true"
18+
19+
- python: "3.6"
20+
arch: arm64
21+
- python: "3.7"
22+
arch: ppc64le
23+
- python: "3.5"
24+
arch: s390x
25+
1926
- python: "pypy3"
2027
name: "PyPy3 Xenial"
2128
- python: "3.8"
@@ -38,20 +45,20 @@ install:
3845
if [ "$LINT" == "true" ]; then
3946
pip install tox
4047
else
41-
.travis/install.sh;
48+
.ci/install.sh;
4249
fi
4350
4451
script:
4552
- |
4653
if [ "$LINT" == "true" ]; then
4754
tox -e lint
4855
else
49-
.travis/build.sh
50-
.travis/test.sh
56+
.ci/build.sh
57+
.ci/test.sh
5158
fi
5259
5360
after_success:
5461
- |
5562
if [ "$LINT" == "" ]; then
56-
.travis/after_success.sh
63+
.ci/after_success.sh
5764
fi

.travis/test.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ global-exclude .git*
2626
global-exclude *.pyc
2727
global-exclude *.so
2828
prune .azure-pipelines
29-
prune .travis
29+
prune .ci

Tests/helper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,10 @@ def on_ci():
348348
)
349349

350350

351+
def is_big_endian():
352+
return sys.byteorder == "big"
353+
354+
351355
def is_win32():
352356
return sys.platform.startswith("win32")
353357

0 commit comments

Comments
 (0)