Skip to content

Commit e58de64

Browse files
committed
so close and yet so far
1 parent a5bbaa7 commit e58de64

File tree

1 file changed

+74
-19
lines changed

1 file changed

+74
-19
lines changed

.github/workflows/build.yml

Lines changed: 74 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,103 @@ on:
1010
branches:
1111
- master
1212

13-
concurrency:
14-
group: build-${{ github.head_ref }}
15-
1613
jobs:
17-
build_wheels:
18-
name: Build wheels on ${{ matrix.os }}
14+
binary-wheels-standard:
15+
name: Binary wheels for ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
1916
runs-on: ${{ matrix.os }}
2017
strategy:
18+
fail-fast: false
2119
matrix:
2220
os: [ubuntu-latest, windows-latest, macos-latest]
2321

2422
steps:
25-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v2
24+
with:
25+
# Fetch all tags
26+
fetch-depth: 0
27+
28+
- name: Build wheels
29+
uses: pypa/[email protected]
30+
env:
31+
CIBW_ARCHS_MACOS: x86_64
32+
HATCH_BUILD_HOOKS_ENABLE: "true"
33+
34+
- uses: actions/upload-artifact@v2
35+
with:
36+
name: artifacts
37+
path: wheelhouse/*.whl
38+
if-no-files-found: error
39+
40+
pure-python-wheel-and-sdist:
41+
name: Build a pure Python wheel and source distribution
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- uses: actions/checkout@v2
46+
with:
47+
# Fetch all tags
48+
fetch-depth: 0
49+
50+
- name: Install build dependencies
51+
run: python -m pip install --upgrade build
52+
53+
- name: Build
54+
run: python -m build
55+
56+
- uses: actions/upload-artifact@v2
57+
with:
58+
name: artifacts
59+
path: dist/*
60+
if-no-files-found: error
61+
62+
binary-wheels-arm:
63+
name: Build Linux wheels for ARM
64+
runs-on: ubuntu-latest
65+
# Very slow, no need to run on PRs
66+
if: >
67+
github.event_name == 'push'
68+
&&
69+
(github.ref == 'refs/heads/master' || startsWith(github.event.ref, 'refs/tags'))
70+
steps:
71+
- uses: actions/checkout@v2
72+
with:
73+
# Fetch all tags
74+
fetch-depth: 0
75+
76+
- name: Set up QEMU
77+
uses: docker/setup-qemu-action@v1
78+
with:
79+
platforms: arm64
2680

2781
- name: Build wheels
28-
uses: pypa/[email protected]
29-
# env:
30-
# CIBW_SOME_OPTION: value
31-
# ...
32-
# with:
33-
# package-dir: .
34-
# output-dir: wheelhouse
35-
# config-file: "{package}/pyproject.toml"
82+
uses: pypa/[email protected]
83+
env:
84+
CIBW_ARCHS_LINUX: aarch64
85+
HATCH_BUILD_HOOKS_ENABLE: "true"
3686

37-
- uses: actions/upload-artifact@v3
87+
- uses: actions/upload-artifact@v2
3888
with:
39-
path: ./wheelhouse/*.whl
89+
name: artifacts
90+
path: wheelhouse/*.whl
91+
if-no-files-found: error
4092

4193
publish:
4294
name: Publish release
4395
needs:
44-
- build
96+
- binary-wheels-standard
97+
- pure-python-wheel-and-sdist
98+
- binary-wheels-arm
4599
runs-on: ubuntu-latest
100+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
46101

47102
steps:
48-
- uses: actions/download-artifact@v3
103+
- uses: actions/download-artifact@v2
49104
with:
50105
name: artifacts
51106
path: dist
52107

53108
- name: Push build artifacts to PyPI
54-
uses: pypa/gh-action-pypi-publish@v1.5.1
109+
uses: pypa/gh-action-pypi-publish@v1.4.2
55110
with:
56111
skip_existing: true
57112
user: __token__

0 commit comments

Comments
 (0)