forked from contourpy/contourpy
-
Notifications
You must be signed in to change notification settings - Fork 0
143 lines (121 loc) · 3.4 KB
/
build_wheels.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Build binary wheels and sdist
on:
push:
tags:
- v*
schedule:
- cron: "12 02 * * SUN"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build_wheels:
name: ${{ matrix.arch }} wheels on ${{ matrix.os }}
if: github.repository_owner == 'contourpy'
runs-on: ${{ matrix.os }}
env:
CIBW_PRERELEASE_PYTHONS: True
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: aarch64
- os: ubuntu-latest
arch: ppc64le
- os: ubuntu-latest
arch: s390x
- os: ubuntu-latest
arch: x86_64
- os: macOS-14
arch: arm64
- os: macOS-13
arch: x86_64
- os: windows-latest
arch: AMD64
- os: windows-latest
arch: x86
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Setup MSVC (32-bit)
if: ${{ matrix.arch == 'x86' }}
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: 'x86'
- name: Fix PATH on win32
# Avoid this in GHA: "ERROR: Found GNU link.exe instead of MSVC link.exe"
if: ${{ matrix.arch == 'x86' }}
run: |
rm /c/Program\ Files/Git/usr/bin/link.EXE
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: wheels_${{ matrix.os }}_${{ matrix.arch }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build sdist
if: github.repository_owner == 'contourpy'
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install build
- name: Build sdist
run: |
python -m build --sdist
- uses: actions/upload-artifact@v4
with:
name: contourpy-sdist
path: dist/*.tar.gz
merge_wheels:
name: Merge wheel build artifacts
runs-on: ubuntu-latest
needs: build_wheels
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: contourpy-wheels
pattern: wheels*
delete-merged: true
upload_nightlies:
name: Upload nightly wheels
if: github.repository_owner == 'contourpy' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: merge_wheels
steps:
- name: Download merged wheel artifact
uses: actions/download-artifact@v4
with:
name: contourpy-wheels
path: dist
- name: List wheels
run: ls -l dist
- name: Upload wheels to scientific python
uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # 0.6.1
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }}