Skip to content

Commit b0c9361

Browse files
committed
update travis ci to build arm64 wheels
1 parent ad54e89 commit b0c9361

File tree

4 files changed

+84
-15
lines changed

4 files changed

+84
-15
lines changed

.travis.yml

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@ matrix:
1818
env:
1919
- PYTHON_VERSION=2.7.15
2020

21+
- os: linux
22+
arch: arm64-graviton2
23+
virt: vm
24+
group: edge
25+
dist: focal
26+
language: generic
27+
env:
28+
- PYTHON_VERSION=3.8.5
29+
2130
before_cache:
2231
# Cleanup to avoid the cache to grow indefinitely as new package versions are released
2332
# see https://stackoverflow.com/questions/39930171/cache-brew-builds-with-travis-ci
@@ -43,19 +52,47 @@ before_install:
4352
if [[ "$TRAVIS_OS_NAME" == "osx" && "${PYTHON_VERSION}" == "3.7.8" ]]; then
4453
brew install gettext
4554
fi
46-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python; fi
47-
- python -m pip install --disable-pip-version-check --upgrade pip
48-
- pip install -U scikit-ci scikit-ci-addons
49-
- ci_addons --install ../addons
55+
- |
56+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
57+
mkdir $HOME/bin; ln -s $(which pip2) $HOME/bin/pip; ln -s $(which python2) $HOME/bin/python;
58+
python -m pip install --disable-pip-version-check --upgrade pip
59+
pip install -U scikit-ci scikit-ci-addons
60+
ci_addons --install ../addons
61+
fi
62+
- |
63+
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
64+
docker run --name python-ninja --rm -itd \
65+
-v $(pwd):/io \
66+
--env TRAVIS=True \
67+
--env TRAVIS_OS_NAME="${TRAVIS_OS_NAME}" \
68+
quay.io/pypa/manylinux2014_$(arch) bash
69+
docker exec -it python-ninja /io/scripts/docker-build.sh ci_before_install
70+
fi
5071
5172
install:
52-
- ci install
73+
- |
74+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
75+
ci install
76+
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
77+
docker exec -it python-ninja /io/scripts/docker-build.sh ci_install
78+
fi
5379
5480
script:
55-
- ci test
81+
- |
82+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
83+
ci test
84+
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
85+
docker exec -it python-ninja /io/scripts/docker-build.sh ci_script
86+
fi
5687
5788
after_success:
58-
- ci after_test
89+
- |
90+
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
91+
ci after_test
92+
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
93+
docker exec -it python-ninja /io/scripts/docker-build.sh ci_after_success
94+
docker stop python-ninja
95+
fi
5996
6097
deploy:
6198
# deploy-release

appveyor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ environment:
2323
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
2424
PYTHON_DIR: "C:\\Python37"
2525
PYTHON_VERSION: "3.7.x"
26-
PYTHON_ARCH: "64"
26+
PYTHON_ARCH: "32"
2727
BLOCK: "0"
2828

2929
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
@@ -41,22 +41,22 @@ cache:
4141
- C:\\cmake-3.6.2
4242

4343
init:
44-
- python -m pip install -U scikit-ci scikit-ci-addons
45-
- python -m ci_addons --install ../addons
44+
- "%PYTHON_DIR%\\python.exe -m pip install -U scikit-ci scikit-ci-addons"
45+
- "%PYTHON_DIR%\\python.exe -m ci_addons --install ../addons"
4646

4747
- ps: ../addons/appveyor/rolling-build.ps1
4848

4949
install:
50-
- python -m ci install
50+
- "%PYTHON_DIR%\\python.exe -m ci install"
5151

5252
build_script:
53-
- python -m ci build
53+
- "%PYTHON_DIR%\\python.exe -m ci build"
5454

5555
test_script:
56-
- python -m ci test
56+
- "%PYTHON_DIR%\\python.exe -m ci test"
5757

5858
after_test:
59-
- python -m ci after_test
59+
- "%PYTHON_DIR%\\python.exe -m ci after_test"
6060

6161
on_finish:
6262
- ps: ../addons/appveyor/enable-worker-remote-access.ps1 -check_for_block

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
cmake>=0.5.0,<=3.13.3
21
codecov>=2.0.5
32
coverage>=4.2
43
flake8>=3.0.4

scripts/docker-build.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/bash
2+
3+
set -e
4+
set -x
5+
6+
MANYLINUX_PYTHON=cp38-cp38
7+
export PATH="/opt/python/${MANYLINUX_PYTHON}/bin:$PATH"
8+
9+
cd /io
10+
11+
ci_before_install() {
12+
/opt/python/${MANYLINUX_PYTHON}/bin/pip install scikit-ci scikit-ci-addons scikit-build
13+
}
14+
15+
ci_install() {
16+
/opt/python/${MANYLINUX_PYTHON}/bin/ci install
17+
}
18+
ci_script() {
19+
/opt/python/${MANYLINUX_PYTHON}/bin/ci test
20+
}
21+
ci_after_success() {
22+
/opt/python/${MANYLINUX_PYTHON}/bin/ci after_test
23+
}
24+
25+
26+
if [[ $1 == 'all' ]]; then
27+
ci_before_install
28+
ci_install
29+
ci_script
30+
ci_after_success
31+
else
32+
$1
33+
fi

0 commit comments

Comments
 (0)