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
name: publish-wheels
on:
push:
tags:
- v*
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Linux is specific: because of manylinux, we have to use a docker file
build-linux64-wheels:
runs-on: ubuntu-latest
# CentOS 7 64 bits Docker Hub image that 'build-linux-wheels' executes in.
# See https://github.com/pypa/manylinux for this particular container:
# * CPython 3.5, 3.6, 3.7, 3.8, 3.9 and 3.10, installed in /opt/python/<python tag>-<abi tag>
#container: quay.io/pypa/manylinux2014_x86_64
container: quay.io/pypa/manylinux_2_28_x86_64:latest
steps:
- name: "Checkout the full project"
uses: actions/checkout@v1
- name: "Install Rust"
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- name: "Build and publish wheels"
shell: bash
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN_FXP }}
run: |
source $HOME/.cargo/env
cd crates/set
for PYBIN in /opt/python/cp38*/bin; do
"${PYBIN}/pip" install maturin
"${PYBIN}/maturin" publish -i "${PYBIN}/python" --no-sdist --skip-existing --compatibility manylinux_2_28
done
cd ../cli
for PYBIN in /opt/python/cp38*/bin; do
"${PYBIN}/pip" install maturin
"${PYBIN}/maturin" publish -i "${PYBIN}/python" --no-sdist --skip-existing --compatibility manylinux_2_28
done
## Decomment if 32 bit asked one day...
#build-linux32-wheels:
# runs-on: ubuntu-latest
# # CentOS 7 32 bits Docker Hub image that 'build-linux-wheels' executes in.
# # See https://github.com/pypa/manylinux for this particular container:
# # * CPython 3.5, 3.6, 3.7, 3.8, 3.9 and 3.10, installed in /opt/python/<python tag>-<abi tag>
# container: quay.io/pypa/manylinux2014_i686
# steps:
# - name: "Checkout the full project"
# uses: actions/checkout@v1
# - name: "Install Rust"
# run: |
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-host i686-unknown-linux-gnu -y
# - name: "Build and publish wheels"
# shell: bash
# env:
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN_FXP }}
# run: |
# source $HOME/.cargo/env
# cd crates/set
# for PYBIN in /opt/python/cp38*/bin; do
# "${PYBIN}/pip" install maturin
# "${PYBIN}/maturin" publish -i "${PYBIN}/python" --no-sdist --skip-existing --compatibility manylinux2014
# "${PYBIN}/maturin" publish -i "${PYBIN}/python" --no-sdist --skip-existing --compatibility musllinux_1_2
# done
# cd ../cli
# for PYBIN in /opt/python/cp38*/bin; do
# "${PYBIN}/pip" install maturin
# "${PYBIN}/maturin" publish -i "${PYBIN}/python" --no-sdist --skip-existing --compatibility manylinux2014
# "${PYBIN}/maturin" publish -i "${PYBIN}/python" --no-sdist --skip-existing --compatibility musllinux_1_2
# done
# Deploy for Windows 64 bits.
# If Windows 32 bits neede, check e.g. https://github.com/marketplace/actions/setup-msys2
build-windows-wheels:
runs-on: ${{ matrix.os }}
strategy:
# Run all matrix jobs even if one is failling (default behaviour is to stop all jobs)
# To be changed when option --skip-existing will be available in maturin
fail-fast: false
matrix:
os:
python-version:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish wheel for Python ${{ matrix.python-version }} on ${{ matrix.os }}
# We do not use environement variable for user, because it seems that the way of providing it in the command
# line is not the same for macos and for windows. We should create 2 different actions (see
# https://docs.github.com/en/actions/reference/encrypted-secrets )
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN_FXP }}
run: |
pip install maturin
cd crates/set
maturin publish --interpreter python${{matrix.python_version}} --no-sdist --skip-existing
cd ../cli
maturin publish --interpreter python${{matrix.python_version}} --no-sdist --skip-existing
# Deploy for MocOS 64 bits (also support M1 archi).
build-macos-wheels:
runs-on: ${{ matrix.os }}
strategy:
# Run all matrix jobs even if one is failling (default behaviour is to stop all jobs)
# To be changed when option --skip-existing will be available in maturin
fail-fast: false
matrix:
os:
python-version:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and publish wheel for Python ${{ matrix.python-version }} on ${{ matrix.os }}
# We do not use environement variable for user, because it seems that the way of providing it in the command
# line is not the same for macos and for windows. We should create 2 different actions (see
# https://docs.github.com/en/actions/reference/encrypted-secrets )
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN_FXP }}
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
pip install maturin
cd crates/set
maturin publish --interpreter python${{matrix.python_version}} --no-sdist --target universal2-apple-darwin --skip-existing
cd ../cli
maturin publish --interpreter python${{matrix.python_version}} --no-sdist --target universal2-apple-darwin --skip-existing