Merge branch 'release/1.3.0' #28
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- x86 | |
- x86_64 | |
- aarch64 | |
- armv7 | |
- ppc64le | |
# - s390x # We cannot build it because of some illegal instructions. | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
manylinux: auto | |
args: --release --out dist | |
before-script-linux: | | |
# If we're running on rhel centos, install needed packages. | |
if command -v yum &> /dev/null; then | |
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic | |
# If we're running on i686 we need to symlink libatomic | |
# in order to build openssl with -latomic flag. | |
if [[ ! -d "/usr/lib64" ]]; then | |
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so | |
fi | |
else | |
# If we're running on debian-based system. | |
apt update -y && apt-get install -y libssl-dev openssl pkg-config | |
fi | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: Releasing assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
target: [x64, x86] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
architecture: ${{ matrix.target }} | |
- name: Install OpenSSL | |
run: vcpkg install openssl:x64-windows-static-md | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist | |
sccache: 'true' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: Releasing assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
target: [x86_64, aarch64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Build wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist | |
sccache: 'true' | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: Releasing assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build sdist | |
uses: PyO3/maturin-action@v1 | |
with: | |
command: sdist | |
args: --out dist | |
- name: Upload sdist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: Releasing assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
musllinux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-musl | |
- i686-unknown-linux-musl | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
architecture: x64 | |
- name: Instal OpenSSL | |
run: sudo apt-get update && sudo apt-get install libssl-dev openssl | |
- name: Build wheels | |
uses: messense/maturin-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
args: --release --out dist | |
manylinux: musllinux_1_2 | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: Releasing assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
needs: [linux, windows, macos, musllinux, sdist] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
- name: Publish to PyPI | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
with: | |
command: upload | |
args: --skip-existing * |