Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/openssl-0.10.66
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminrwilson authored Jan 28, 2025
2 parents 9ce0691 + dd5e0eb commit 3ab202b
Show file tree
Hide file tree
Showing 57 changed files with 2,494 additions and 1,158 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
os: [macos-latest, ubuntu-latest, windows-latest]
python_version:
["3.9", "3.10", "3.11"]
["3.9", "3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: av2
conda-remove-defaults: true
environment-file: conda/environment.yml
mamba-version: "*"
miniforge-version: latest
Expand Down
34 changes: 18 additions & 16 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt
Expand All @@ -24,8 +24,8 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: cargo clippy
Expand All @@ -35,7 +35,7 @@ jobs:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.x'
Expand All @@ -45,27 +45,29 @@ jobs:
name: Ruff
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: pip install ruff
- run: ruff .
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3

mypy:
name: Mypy
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: '3.x'
- run: pip install mypy numpy
activate-environment: av2
environment-file: conda/environment.yml
mamba-version: "*"
miniforge-version: latest
- run: mamba install mypy -y
- run: mypy .

# spell_check:
# name: Spellcheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/checkout@v4
# - uses: codespell-project/actions-codespell@master
207 changes: 147 additions & 60 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,130 +1,217 @@
name: "[av2] Release"
name: release

on:
push:
branches:
- main
- master
tags:
- '*'
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read

jobs:
linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64, x86, aarch64]
platform:
- runner: ubuntu-22.04
target: x86_64
- runner: ubuntu-22.04
target: x86
- runner: ubuntu-22.04
target: aarch64
# - runner: ubuntu-22.04
# target: armv7
# - runner: ubuntu-22.04
# target: ppc64le
python_version:
["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python_version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: "true"
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.python_version }}-linux-${{ matrix.platform.target }}
path: dist

# windows:
# runs-on: windows-latest
# musllinux:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# target: [x64, x86]
# platform:
# - runner: ubuntu-22.04
# target: x86_64
# - runner: ubuntu-22.04
# target: x86
# - runner: ubuntu-22.04
# target: aarch64
# - runner: ubuntu-22.04
# target: armv7
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: "3.10"
# architecture: ${{ matrix.target }}
# python-version: 3.x
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# sccache: "true"
# sccache: 'true'
# manylinux: musllinux_1_2
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# uses: actions/upload-artifact@v4
# with:
# name: wheels
# name: wheels-musllinux-${{ matrix.platform.target }}
# path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: windows-latest
target: x64
- runner: windows-latest
target: x86
python_version:
["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python_version }}-windows-${{ matrix.platform.target }}
path: dist

macos:
runs-on: macos-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64, aarch64]
platform:
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
python_version:
["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python_version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: "true"
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-${{ matrix.python_version }}-macos-${{ matrix.platform.target }}
path: dist

sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-sdist
path: dist

# test_release:
# name: Test release.
# needs: [linux, windows, macos, sdist]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: wheels
# path: dist
# - name: Publish distribution 📦 to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository-url: https://test.pypi.org/legacy/
test_release:
name: Test Release
runs-on: ubuntu-latest
environment: release
needs: [linux, macos, windows, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: 'wheels-*/*'
# - name: Display structure of downloaded files
# run: ls -R
- name: Create 'wheels' directory
run: mkdir -p wheels
- name: Copy wheels artifacts
run: |
find wheels-* -type f -name "*.whl" -exec cp {} wheels/ \;
- name: Publish package distributions to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
packages-dir: wheels/
skip-existing: true
verbose: true

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, macos, sdist]
environment: release
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
needs: [linux, macos, windows, sdist]
permissions:
# Use to sign the release artifacts
id-token: write
# Used to upload release artifacts
contents: write
# Used to generate artifact attestation
attestations: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
subject-path: 'wheels-*/*'
- name: Create 'wheels' directory
run: mkdir -p wheels
- name: Copy wheels artifacts
run: |
find wheels-* -type f -name "*.whl" -exec cp {} wheels/ \;
- name: Publish package distributions to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
command: upload
args: --skip-existing *
packages-dir: wheels/
verbose: true
Loading

0 comments on commit 3ab202b

Please sign in to comment.