Skip to content

Fix 2D example mode labels #1

Fix 2D example mode labels

Fix 2D example mode labels #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: write
id-token: write
jobs:
linux-wheels:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: matrix.target == 'aarch64-unknown-linux-gnu'
uses: docker/setup-qemu-action@v3
- name: Build wheel
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380
with:
maturin-version: v1.13.1
target: ${{ matrix.target }}
manylinux: "2014"
args: --release --locked --compatibility pypi --out dist --features openblas-static -i python${{ matrix.python-version }}
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}-py${{ matrix.python-version }}
path: dist/*
macos-wheels:
strategy:
fail-fast: false
matrix:
include:
- runner: macos-13
target: x86_64-apple-darwin
- runner: macos-14
target: aarch64-apple-darwin
python-version: ["3.10", "3.11", "3.12", "3.13"]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install build dependencies
run: |
brew install gcc
python -m pip install --upgrade pip
python -m pip install maturin delocate
- name: Build wheel
run: |
python -m maturin build \
--release \
--locked \
--features openblas-static \
--out dist \
-i python
- name: Repair wheel
run: |
mkdir -p wheelhouse
if [[ "${{ matrix.target }}" == x86_64-* ]]; then
ARCHS=x86_64
else
ARCHS=arm64
fi
for wheel in dist/*.whl; do
delocate-wheel --require-archs "$ARCHS" -w wheelhouse "$wheel"
done
- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}-py${{ matrix.python-version }}
path: wheelhouse/*
sdist:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380
with:
maturin-version: v1.13.1
command: sdist
args: --out dist
- name: Upload sdist artifact
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*
github-release:
if: startsWith(github.ref, 'refs/tags/')
needs: [linux-wheels, macos-wheels, sdist]
runs-on: ubuntu-24.04
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: artifacts/**/*
publish-pypi:
if: startsWith(github.ref, 'refs/tags/')
needs: [linux-wheels, macos-wheels, sdist]
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/clostera
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Collect distribution files
run: |
mkdir -p dist
find artifacts -type f \( -name '*.whl' -o -name '*.tar.gz' \) -exec cp {} dist/ \;
ls -lh dist
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Validate distribution metadata
run: |
python -m pip install --upgrade pip twine
python -m twine check --strict dist/*
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist