-
Notifications
You must be signed in to change notification settings - Fork 2
127 lines (110 loc) · 3.73 KB
/
python_release.yml
File metadata and controls
127 lines (110 loc) · 3.73 KB
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
# Adapted from https://github.com/pola-rs/polars/blob/main/.github/workflows/release-python.yml
# With license found in chrontext/licensing/POLARS_LICENSE
name: Release Python
on:
push:
tags:
- 'py-v[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly-2025-03-07
MATURIN_VERSION: '1.7.4'
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
PYTHON_VERSION: '3.12'
jobs:
manylinux-x64_64:
runs-on: ubuntu-latest
timeout-minutes: 60
environment: release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py_chrontext/README.md
cp README.md py_chrontext/README.md
cp -r doc py_chrontext/doc
- name: Publish wheel
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
command: publish
args: -m py_chrontext/Cargo.toml --skip-existing -o wheels -u magbak
container: quay.io/pypa/manylinux_2_28_x86_64:latest
before-script-linux: yum -y install perl-IPC-Cmd clang
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
win:
runs-on: windows-latest
timeout-minutes: 60
environment: release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py_chrontext/README.md
cp README.md py_chrontext/README.md
cp -r doc py_chrontext/doc
- name: Publish wheel
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
with:
command: publish
args: -m py_chrontext/Cargo.toml --features=opcua --no-sdist --skip-existing -o wheels -u magbak
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
macos:
runs-on: macos-latest
timeout-minutes: 60
environment: release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py_chrontext/README.md
cp README.md py_chrontext/README.md
cp -r doc py_chrontext/doc
- name: Publish wheel
uses: PyO3/maturin-action@v1
env:
MACOSX_DEPLOYMENT_TARGET: 12.6
with:
command: publish
args: -m py_chrontext/Cargo.toml --features=opcua --no-sdist --skip-existing -o wheels -u magbak
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
macos-aarch64:
runs-on: macos-latest
timeout-minutes: 60
environment: release
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Fix README symlink
run: |
rm py_chrontext/README.md
cp README.md py_chrontext/README.md
cp -r doc py_chrontext/doc
- name: Set up Rust targets
run: rustup target add aarch64-apple-darwin
- name: Publish wheel
uses: PyO3/maturin-action@v1
with:
command: publish
args: -m py_chrontext/Cargo.toml --features=opcua --target aarch64-apple-darwin --no-sdist -o wheels -u magbak
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}