Skip to content

Commit dbde97e

Browse files
committed
ci: adding ARM build to GHA, dropping Travis
1 parent dbe1f95 commit dbde97e

File tree

4 files changed

+53
-66
lines changed

4 files changed

+53
-66
lines changed

.github/workflows/wheels.yml

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ on:
1818
- published
1919

2020
env:
21-
CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=numpy SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}"
2221
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.overrideVersion }}
22+
CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=numpy SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}"
23+
CIBW_TEST_EXTRAS: test
24+
CIBW_TEST_COMMAND: "pytest {project}/tests"
25+
CIBW_TEST_SKIP: "pp*macos* *universal2:arm64"
2326

2427
jobs:
2528
build_sdist:
@@ -40,6 +43,38 @@ jobs:
4043
with:
4144
path: dist/*.tar.gz
4245

46+
build_arch_wheels:
47+
name: ${{ matrix.python }} on ${{ matrix.arch }}
48+
runs-on: ${{ matrix.os }}
49+
strategy:
50+
matrix:
51+
python: [36, 37, 38, 39]
52+
arch: [aarch64]
53+
steps:
54+
55+
- uses: actions/checkout@v1
56+
with:
57+
submodules: true
58+
59+
- uses: docker/setup-qemu-action@v1
60+
with:
61+
platforms: all
62+
63+
- uses: joerick/[email protected]
64+
env:
65+
CIBW_BUILD: ${{ matrix.build }}
66+
CIBW_ARCHS: ${{ matrix.arch }}
67+
68+
- name: Verify clean directory
69+
run: git diff --exit-code
70+
shell: bash
71+
72+
- name: Upload wheels
73+
uses: actions/upload-artifact@v2
74+
with:
75+
path: wheelhouse/*.whl
76+
77+
4378
build_wheels:
4479
name: ${{ matrix.type }} ${{ matrix.arch }} on ${{ matrix.os }}
4580
runs-on: ${{ matrix.os }}
@@ -49,41 +84,41 @@ jobs:
4984
os: [windows-latest, macos-latest]
5085
arch: [auto64]
5186
type: [Standard]
87+
build: ["*"]
5288

5389
include:
5490
- os: ubuntu-latest
5591
type: Standard
5692
arch: auto
93+
build: "cp3* pp*"
5794
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
5895
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
5996

6097
- os: ubuntu-latest
6198
type: ManyLinux1
6299
arch: auto
100+
build: "cp{27,35,36,37,38}-*"
63101
CIBW_MANYLINUX_X86_64_IMAGE: skhep/manylinuxgcc-x86_64
64102
CIBW_MANYLINUX_I686_IMAGE: skhep/manylinuxgcc-i686
65103

66104
- os: macos-latest
67-
type: Standard
68105
arch: universal2
69106

70107
- os: windows-latest
71-
type: Standard
72108
arch: auto32
109+
73110
steps:
74111
- uses: actions/checkout@v1
75112
with:
76113
submodules: true
77114

78115
- uses: joerick/[email protected]
79116
env:
80-
CIBW_SKIP: cp27-win* pp27*
117+
CIBW_BUILD: ${{ matrix.build }}
118+
CIBW_SKIP: cp27-win* pp27-win*
81119
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.CIBW_MANYLINUX_I686_IMAGE }}
82120
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.CIBW_MANYLINUX_X86_64_IMAGE }}
83121
CIBW_ARCHS: ${{ matrix.arch }}
84-
CIBW_TEST_EXTRAS: test
85-
CIBW_TEST_COMMAND: "pytest {project}/tests"
86-
CIBW_TEST_SKIP: "pp*macos* *universal2:arm64"
87122

88123
- name: Verify clean directory
89124
run: git diff --exit-code
@@ -124,8 +159,6 @@ jobs:
124159
CIBW_BUILD: cp27-win32
125160
DISTUTILS_USE_SDK: 1
126161
MSSdk: 1
127-
CIBW_TEST_EXTRAS: test
128-
CIBW_TEST_COMMAND: "pytest {project}/tests"
129162

130163
- name: Verify clean directory
131164
run: git diff --exit-code
@@ -137,13 +170,11 @@ jobs:
137170

138171
upload_all:
139172
name: Upload if release
140-
needs: [build_wheels, build_win27_wheels, build_sdist]
173+
needs: [build_wheels, build_win27_wheels, build_arch_wheels, build_sdist]
141174
runs-on: ubuntu-latest
142175
if: github.event_name == 'release' && github.event.action == 'published'
143176

144177
steps:
145-
- uses: actions/setup-python@v2
146-
147178
- uses: actions/download-artifact@v2
148179
with:
149180
name: artifact

.travis.yml

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

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# boost-histogram for Python
44

55
[![Actions Status][actions-badge]][actions-link]
6-
[![Travis-CI][travis-badge]][travis-link]
76
[![Documentation Status][rtd-badge]][rtd-link]
87
[![Code style: black][black-badge]][black-link]
98

@@ -162,31 +161,33 @@ The easiest way to get boost-histogram is to use a binary wheel, which happens w
162161
python -m pip install boost-histogram
163162
```
164163

165-
Wheels are produced using [cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/); all platforms supported by cibuildwheel are provided in boost-histogram:
164+
Wheels are produced using [cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/); all common platforms have wheels provided in boost-histogram:
166165

167166
| System | Arch | Python versions | PyPy versions |
168167
|---------|-----|------------------|--------------|
169-
| ManyLinux1 (custom GCC 9.2) | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | |
168+
| ManyLinux1 (custom GCC 9.2) | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8 | |
170169
| ManyLinux2010 | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | 7.3: 2.7, 3.6, 3.7 |
171-
| ManyLinux2014 | ARM64 & PowerPC | 3.5, 3.6, 3.7, 3.8, 3.9 | |
170+
| ManyLinux2014 | ARM64 | 3.6, 3.7, 3.8, 3.9 | |
172171
| macOS 10.9+ | 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | 7.3: 2.7, 3.6, 3.7 |
172+
| macOS Universal2 | Arm64 | 3.9 | |
173173
| Windows | 32 & 64-bit | 2.7, 3.5, 3.6, 3.7, 3.8, 3.9 | (32 bit) 7.3: 2.7, 3.6, 3.7 |
174174

175175

176-
* manylinux1: Using a custom docker container with GCC 9; should work but can't be called directly other compiled extensions unless they do the same thing (think that's the main caveat). Supporting 32 bits because it's there.
176+
* manylinux1: Using a custom docker container with GCC 9; should work but can't be called directly other compiled extensions unless they do the same thing (think that's the main caveat). Supporting 32 bits because it's there. Anything running Python 3.9 should be compatible with manylinux2010, so manylinux1 not provided for Python 3.9 (like NumPy).
177177
* manylinux2010: Requires pip 10+ and a version of Linux newer than 2010.
178178
* Windows: pybind11 requires compilation with a newer copy of Visual Studio than Python 2.7's Visual Studio 2008; you need to have the [Visual Studio 2015 distributable][msvc2015] installed (the dll is included in 2017 and 2019, as well).
179179
* PyPy: Supported on all platforms that `cibuildwheel` supports, in pypy2, pypy3.6, and pypy3.7 variants.
180-
* ARM and PowerPC on Linux is supported for newer Python versions via manylinux2014.
180+
* ARM on Linux is supported for newer Python versions via manylinux2014. PowerPC or IBM-Z available on request.
181+
* macOS Universal2 wheels for Apple Silicon and Intel provided for Python 3.9 (requires Pip 21.0.1).
181182

182183
[msvc2015]: https://www.microsoft.com/en-us/download/details.aspx?id=48145
183184

184-
If you are on a Linux system that is not part of the "many" in manylinux, such as Alpine or ClearLinux, building from source is usually fine, since the compilers on those systems are often quite new. It will just take a little longer to install when it's using the sdist instead of a wheel.
185+
If you are on a Linux system that is not part of the "many" in manylinux, such as Alpine or ClearLinux, building from source is usually fine, since the compilers on those systems are often quite new. It will just take longer to install when it is using the sdist instead of a wheel.
185186

186187

187188
#### Conda-Forge
188189

189-
The boost-histogram package is available on Conda-Forge, as well. All supported versions are available with the exception of Python 2.7, which is no longer supported by conda-forge directly. If you really need boost-histogram + Conda + Python 2.7, please open an issue.
190+
The boost-histogram package is available on Conda-Forge, as well. All supported versions are available with the exception of Python 2.7, which is no longer supported by conda-forge directly.
190191

191192
```bash
192193
conda install -c conda-forge boost-histogram
@@ -278,8 +279,6 @@ Support for this work was provided by the National Science Foundation cooperativ
278279
[rtd-badge]: https://readthedocs.org/projects/boost-histogram/badge/?version=latest
279280
[rtd-link]: https://boost-histogram.readthedocs.io/en/latest/?badge=latest
280281
[sk-badge]: https://scikit-hep.org/assets/images/Scikit--HEP-Project-blue.svg
281-
[travis-badge]: https://travis-ci.com/scikit-hep/boost-histogram.svg?branch=master
282-
[travis-link]: https://travis-ci.com/scikit-hep/boost-histogram
283282

284283
[Boost::Histogram]: https://www.boost.org/doc/libs/release/libs/histogram/doc/html/index.html
285284
[Boost::Histogram source]: https://github.com/boostorg/histogram

src/boost_histogram/_internal/sig_tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def inject_signature(sig, locals=None):
1515
# type: (str, Optional[Dict[str, Any]]) -> Any
1616
def wrap(f):
1717
return f
18+
1819
return wrap
1920

2021

0 commit comments

Comments
 (0)