Skip to content

Commit 24ff737

Browse files
committed
ci: use GHA for alternate archs
1 parent 66fa370 commit 24ff737

File tree

2 files changed

+23
-157
lines changed

2 files changed

+23
-157
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Tests
33
on:
44
workflow_dispatch:
55
pull_request:
6+
- master
67
push:
78
branches:
89
- master

.github/workflows/wheels.yml

Lines changed: 22 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
pull_request:
99
branches:
1010
- master
11+
- develop
1112
push:
1213
branches:
1314
- master
@@ -21,105 +22,39 @@ env:
2122

2223

2324
jobs:
24-
build_sdist:
25-
name: Build SDist
26-
runs-on: ubuntu-latest
27-
steps:
28-
- uses: actions/checkout@v1
29-
with:
30-
submodules: true
31-
32-
- uses: actions/setup-python@v2
33-
34-
- name: Install deps
35-
run: python -m pip install build twine
36-
37-
- name: Build SDist
38-
run: python -m build -s
39-
40-
- name: Check metadata
41-
run: twine check dist/*
42-
43-
- uses: actions/upload-artifact@v2
44-
with:
45-
path: dist/*.tar.gz
46-
4725

48-
build_wheels:
49-
name: ${{ matrix.type }} wheels on ${{ matrix.os }}
50-
runs-on: ${{ matrix.os }}
26+
build_arch_wheels:
27+
name: ${{ matrix.arch }} wheels
28+
runs-on: ubuntu-latest
5129
strategy:
5230
fail-fast: false
5331
matrix:
54-
os: [ubuntu-latest, windows-latest, macos-latest]
55-
type: [Standard]
56-
57-
include:
58-
- os: ubuntu-latest
59-
type: Standard
60-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
61-
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
62-
63-
- os: ubuntu-latest
64-
type: ManyLinux1
65-
CIBW_MANYLINUX_X86_64_IMAGE: skhep/manylinuxgcc-x86_64
66-
CIBW_MANYLINUX_I686_IMAGE: skhep/manylinuxgcc-i686
32+
arch: [armv7, aarch64, s390x, ppc64le]
6733

6834
steps:
6935
- uses: actions/checkout@v1
7036
with:
7137
submodules: true
7238

73-
- uses: actions/setup-python@v2
74-
75-
- name: Install cibuildwheel
76-
run: python -m pip install cibuildwheel==1.6.4
77-
7839
- name: Build wheel
79-
run: python -m cibuildwheel --output-dir wheelhouse
80-
env:
81-
CIBW_SKIP: cp27-win* pp*
82-
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.CIBW_MANYLINUX_I686_IMAGE }}
83-
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.CIBW_MANYLINUX_X86_64_IMAGE }}
84-
CIBW_TEST_EXTRAS: test
85-
CIBW_TEST_COMMAND: "pytest {project}/tests"
86-
87-
- name: Show files
88-
run: ls -lh wheelhouse
89-
shell: bash
90-
91-
- name: Verify clean directory
92-
run: git diff --exit-code
93-
shell: bash
94-
95-
- name: Upload wheels
96-
uses: actions/upload-artifact@v2
40+
uses: uraimo/[email protected]
9741
with:
98-
path: wheelhouse/*.whl
99-
100-
build_pypy_wheels:
101-
name: PyPy wheels on ${{ matrix.os }}
102-
runs-on: ${{ matrix.os }}
103-
strategy:
104-
fail-fast: false
105-
matrix:
106-
os: [ubuntu-latest, macos-latest]
107-
108-
109-
steps:
110-
- uses: actions/checkout@v1
111-
with:
112-
submodules: true
113-
114-
- uses: actions/setup-python@v2
115-
116-
- name: Install cibuildwheel
117-
run: python -m pip install cibuildwheel==1.6.4
118-
119-
- name: Build wheel
120-
run: python -m cibuildwheel --output-dir wheelhouse
121-
env:
122-
CIBW_SKIP: cp*
42+
arch: ${{ matrix.arch }}
43+
distro: ubuntu20.04
44+
# githubToken: ${{ github.token }}
45+
install: |
46+
apt-get update -q -y
47+
apt-get install -q -y python3-pip
48+
setup: |
49+
mkdir -p "${PWD}/wheelhouse"
50+
dockerRunArgs: |
51+
--volume "${PWD}/wheelhouse:/wheelhouse"
52+
env: |
53+
CIBW_TEST_EXTRAS: test
54+
CIBW_TEST_COMMAND: "pytest {project}/tests"
55+
run: |
56+
python3 -m pip install cibuildwheel==1.6.4
57+
python3 -m cibuildwheel --output-dir wheelhouse
12358
12459
- name: Show files
12560
run: ls -lh wheelhouse
@@ -133,73 +68,3 @@ jobs:
13368
uses: actions/upload-artifact@v2
13469
with:
13570
path: wheelhouse/*.whl
136-
137-
138-
# Windows 2.7 (requires pybind11 workaround)
139-
build_win27_wheels:
140-
name: Py 2.7 wheels on Windows
141-
runs-on: windows-latest
142-
143-
steps:
144-
- uses: actions/checkout@v1
145-
with:
146-
submodules: true
147-
148-
- uses: actions/setup-python@v2
149-
150-
- name: Install cibuildwheel
151-
run: python -m pip install cibuildwheel==1.6.4
152-
153-
- uses: ilammy/msvc-dev-cmd@v1
154-
155-
- name: Build 64-bit wheel
156-
run: python -m cibuildwheel --output-dir wheelhouse
157-
env:
158-
CIBW_BUILD: cp27-win_amd64
159-
DISTUTILS_USE_SDK: 1
160-
MSSdk: 1
161-
162-
- uses: ilammy/msvc-dev-cmd@v1
163-
with:
164-
arch: x86
165-
166-
- name: Build 32-bit wheel
167-
run: python -m cibuildwheel --output-dir wheelhouse
168-
env:
169-
CIBW_BUILD: cp27-win32 pp27-win32
170-
DISTUTILS_USE_SDK: 1
171-
MSSdk: 1
172-
CIBW_TEST_EXTRAS: test
173-
CIBW_TEST_COMMAND: "pytest {project}/tests"
174-
175-
- name: Show files
176-
run: ls -lh wheelhouse
177-
shell: bash
178-
179-
- name: Verify clean directory
180-
run: git diff --exit-code
181-
shell: bash
182-
183-
- uses: actions/upload-artifact@v2
184-
with:
185-
path: wheelhouse/*.whl
186-
187-
188-
upload_all:
189-
name: Upload if release
190-
needs: [build_wheels, build_pypy_wheels, build_win27_wheels, build_sdist]
191-
runs-on: ubuntu-latest
192-
if: github.event_name == 'release' && github.event.action == 'published'
193-
194-
steps:
195-
- uses: actions/setup-python@v2
196-
197-
- uses: actions/download-artifact@v2
198-
with:
199-
name: artifact
200-
path: dist
201-
202-
- uses: pypa/[email protected]
203-
with:
204-
user: __token__
205-
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)