Skip to content

Commit 75883a7

Browse files
committed
CI: Reduce Travis to ARM64 builds
1 parent 778843d commit 75883a7

File tree

1 file changed

+12
-127
lines changed

1 file changed

+12
-127
lines changed

.travis.yml

Lines changed: 12 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -5,155 +5,40 @@
55
# can't be any leading "-"s - All newlines will be removed, so use ";"s
66

77
os: linux
8-
arch: amd64
8+
arch: arm64
99
dist: xenial
1010
language: python
1111
cache: pip
1212

1313
env:
1414
global:
15-
- SETUP_REQUIRES="pip setuptools>=30.3.0 wheel"
16-
- DEPENDS="numpy scipy matplotlib h5py pillow pydicom indexed_gzip"
15+
# Note that DEPENDS, OPTIONAL_DEPENDS and EXTRA_PIP_FLAGS are
16+
# indirect and (when non-empty) refer to variables in tools/ci/env.sh
17+
- DEPENDS="REQUIREMENTS"
18+
- OPTIONAL_DEPENDS="DEFAULT_OPT_DEPENDS"
1719
- INSTALL_TYPE="setup"
1820
- CHECK_TYPE="test"
19-
- NIGHTLY_WHEELS="https://pypi.anaconda.org/scipy-wheels-nightly/simple"
20-
- PRE_PIP_FLAGS="--pre --extra-index-url $NIGHTLY_WHEELS"
21+
- EXTRA_PIP_FLAGS="PRE_PIP_FLAGS"
2122

2223
python:
24+
- 3.6
2325
- 3.7
2426
- 3.8
2527

26-
jobs:
27-
include:
28-
- arch: arm64
29-
python: 3.6
30-
env:
31-
- DEPENDS="numpy scipy pillow pydicom"
32-
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
33-
# Basic dependencies only
34-
- python: 3.6
35-
env:
36-
- DEPENDS="-r requirements.txt"
37-
# Clean install
38-
- python: 3.6
39-
env:
40-
- DEPENDS=""
41-
- CHECK_TYPE=skiptests
42-
# Absolute minimum dependencies
43-
- python: 3.6
44-
env:
45-
- SETUP_REQUIRES="setuptools==30.3.0"
46-
- DEPENDS="-r min-requirements.txt"
47-
# Absolute minimum dependencies plus oldest MPL
48-
- python: 3.6
49-
env:
50-
- DEPENDS="-r min-requirements.txt matplotlib==1.5.3"
51-
# Minimum pydicom dependency
52-
- python: 3.6
53-
env:
54-
- DEPENDS="-r min-requirements.txt pydicom==0.9.9 pillow==2.6"
55-
# pydicom master branch
56-
- python: 3.6
57-
env:
58-
- DEPENDS="numpy git+https://github.com/pydicom/pydicom.git@master"
59-
# test 3.8 against pre-release builds of everything
60-
- python: 3.8
61-
env:
62-
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
63-
# test 3.9 against pre-release builds of dependencies that support it
64-
- python: 3.9
65-
env:
66-
- DEPENDS="numpy scipy h5py pillow pydicom"
67-
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
68-
# OSX Python support is basically accidental. Take whatever version we can
69-
# get and test with full dependencies...
70-
- os: osx
71-
language: minimal
72-
# and pre-releases. No min-requirements.txt because we can't assume a wheel that old.
73-
- os: osx
74-
language: minimal
75-
env:
76-
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
77-
# Test that PyPI installs from source pass
78-
- python: 3.6
79-
env:
80-
- INSTALL_TYPE=sdist
81-
# Wheels (binary distributions)
82-
- python: 3.6
83-
env:
84-
- INSTALL_TYPE=wheel
85-
# Install from git archive (e.g., https://github.com/nipy/nibabel/archive/master.zip)
86-
- python: 3.6
87-
env:
88-
- INSTALL_TYPE=archive
89-
# Run flake8... Might not be needed now we have pep8speaks
90-
- python: 3.6
91-
env:
92-
- CHECK_TYPE="style"
93-
# Documentation doctests
94-
- python: 3.6
95-
env:
96-
- CHECK_TYPE="doc"
97-
9828
# Set up virtual environment, build package, build from depends
9929
before_install:
100-
- travis_retry python3 -m pip install --upgrade pip virtualenv
101-
- virtualenv --python=python3 venv
102-
- source venv/bin/activate
103-
- python3 --version # just to check
104-
- travis_retry python3 -m pip install -U $SETUP_REQUIRES
105-
- which python3
106-
- which pip
107-
- |
108-
if [ "$INSTALL_TYPE" == "sdist" ]; then
109-
python3 setup.py egg_info # check egg_info while we're here
110-
python3 setup.py sdist
111-
export ARCHIVE=$( ls dist/*.tar.gz )
112-
elif [ "$INSTALL_TYPE" == "wheel" ]; then
113-
python3 setup.py bdist_wheel
114-
export ARCHIVE=$( ls dist/*.whl )
115-
elif [ "$INSTALL_TYPE" == "archive" ]; then
116-
export ARCHIVE="package.tar.gz"
117-
git archive -o $ARCHIVE HEAD
118-
fi
119-
- if [ -n "$DEPENDS" ]; then pip install $EXTRA_PIP_FLAGS $DEPENDS; fi
30+
- travis_retry tools/ci/create_env.sh
31+
- source tools/ci/build_archive.sh
32+
- travis_retry tools/ci/install_dependencies.sh
12033

12134
# command to install dependencies
12235
install:
123-
- |
124-
if [ "$INSTALL_TYPE" == "setup" ]; then
125-
python3 setup.py install
126-
else
127-
pip install $EXTRA_PIP_FLAGS $ARCHIVE
128-
fi
129-
# Basic import check
130-
- python3 -c 'import nibabel; print(nibabel.__version__)'
36+
- tools/ci/install.sh
13137
- if [ "$CHECK_TYPE" == "skiptests" ]; then exit 0; fi
13238

133-
before_script:
134-
# Point to nibabel data directory
135-
- export NIBABEL_DATA_DIR="$PWD/nibabel-data"
136-
# Because nibabel is already installed, will just look up the extra
137-
- python3 -m pip install $EXTRA_PIP_FLAGS "nibabel[$CHECK_TYPE]"
138-
13939
# command to run tests, e.g. python setup.py test
14040
script:
141-
- |
142-
if [ "${CHECK_TYPE}" == "style" ]; then
143-
# Run styles only on core nibabel code.
144-
flake8 nibabel
145-
elif [ "${CHECK_TYPE}" == "doc" ]; then
146-
cd doc
147-
make html && make doctest
148-
elif [ "${CHECK_TYPE}" == "test" ]; then
149-
# Change into an innocuous directory and find tests from installation
150-
mkdir for_testing
151-
cd for_testing
152-
cp ../.coveragerc .
153-
pytest --doctest-modules --doctest-plus --cov nibabel -v --pyargs nibabel
154-
else
155-
false
156-
fi
41+
- tools/ci/check.sh
15742

15843
after_script:
15944
- travis_retry python3 -m pip install codecov

0 commit comments

Comments
 (0)