-
Notifications
You must be signed in to change notification settings - Fork 80
87 lines (74 loc) · 2.1 KB
/
build_wheel_all_archs.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
name: maturin wheels
permissions: write-all
on:
pull_request: # use for testing modifications to this action
push:
branches: [latest]
tags: v*
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # daily
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64, ppc64le]
#target: [aarch64, s390x, ppc64le]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter --zig --strip
sccache: 'true'
manylinux: auto
container: 'off'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheel-${{ matrix.target }}
path: dist
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: x64
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheel-win64
path: dist
release:
name: Publish wheels
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [linux, windows]
steps:
- name: Fetch wheels from artifacts
id: fetch_artifacts
uses: actions/download-artifact@v4
with:
path: 'wheels/'
# if it matches a Python release tag, upload to github releases
# TODO: In the future, use the create-release and upload-release-assets actions
- name: Release
uses: fnkr/github-action-ghr@v1
env:
GHR_PATH: ${{steps.fetch_artifacts.outputs.download-path}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}