forked from nasa/radbelt
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (64 loc) · 1.81 KB
/
cibuildwheel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: build
on:
push:
branches:
- main
pull_request:
release:
types:
- published
jobs:
source:
name: Build source package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install build && python -m build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*
wheels:
name: Build binary packages
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
# See https://docs.scipy.org/doc/scipy/building/index.html
- name: Install MinGW
if: runner.os == 'Windows'
run: |
choco install rtools -y --no-progress --force --version=4.0.0.20220206
echo "c:\rtools40\ucrt64\bin;" >> $env:GITHUB_PATH
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto aarch64
CIBW_ARCHS_WINDOWS: AMD64
CIBW_ENVIRONMENT_MACOS: FC=gfortran-11
# Skip musllinux wheels, which take a long time to build because Numpy must be built from source
# Skip PyPy wheels
# Skip 32-bit Intel wheels
CIBW_SKIP: '*musllinux* pp* *_i686'
- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
needs: [source, wheels]
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1