Skip to content

Commit b3dc8a9

Browse files
committed
ci: cibuildwheel action test
1 parent 41f56ef commit b3dc8a9

File tree

2 files changed

+35
-13
lines changed

2 files changed

+35
-13
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'cibuildwheel'
2+
description: 'Runs cibuildwheel on the current runner'
3+
inputs:
4+
package-dir:
5+
description: 'Input directory, defaults to "."'
6+
required: false
7+
default: '.'
8+
output-dir:
9+
description: 'Folder to place the outputs in, defaults to "wheelhouse"'
10+
required: false
11+
default: 'wheelhouse'
12+
artifact:
13+
description: 'Upload/merge wheels into the given artifact if not blank'
14+
required: false
15+
default: 'artifact'
16+
17+
runs:
18+
using: "composite"
19+
steps:
20+
- run: pip install cibuildwheel==1.7.1
21+
shell: bash
22+
- run: python -m cibuildwheel ${{ inputs.package-dir }} --output_dir ${{ inputs.output-dir }}
23+
shell: bash
24+
- uses: actions/upload-artifact@v2
25+
if: "${{ inputs.artifact }} != ''"
26+
with:
27+
path: wheelhouse/*
28+
name: ${{ inputs.artifact }}

.github/workflows/tests.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ jobs:
5858
with:
5959
submodules: true
6060

61-
# TODO: unpin after 2.2.0 gets fixed. PyPy is broken in 2.2.0.
62-
- uses: actions/[email protected]
61+
- uses: actions/setup-python@v2
6362
with:
6463
python-version: ${{ matrix.python-version }}
6564

@@ -81,29 +80,24 @@ jobs:
8180
runs-on: ${{ matrix.os }}
8281
strategy:
8382
matrix:
84-
os: [ubuntu-18.04, windows-latest, macos-latest]
83+
os: [ubuntu-latest, windows-latest, macos-latest]
8584

8685
steps:
8786
- uses: actions/checkout@v1
8887
with:
8988
submodules: true
9089

91-
- name: Setup Python 3.7
92-
uses: actions/setup-python@v2
93-
with:
94-
python-version: '3.7'
95-
96-
- name: Install cibuildwheel
97-
run: python -m pip install cibuildwheel==1.5.5 twine
90+
- uses: actions/setup-python@v2
9891

99-
- name: Build wheel
100-
run: python -m cibuildwheel --output-dir wheelhouse
92+
- uses: ./.github/actions/cibuildwheel
10193
env:
10294
CIBW_BUILD: cp38-win_amd64 cp27-manylinux_i686 cp37-macosx_x86_64
10395
CIBW_TEST_EXTRAS: test
10496
CIBW_TEST_COMMAND: pytest {project}/tests
10597
CIBW_BUILD_VERBOSITY: 1
10698

10799
- name: Check wheels
108-
run: twine check wheelhouse/*
100+
run: |
101+
python -m pip install twine
102+
twine check wheelhouse/*
109103
shell: bash

0 commit comments

Comments
 (0)