Skip to content

Commit

Permalink
Update github actions (#244)
Browse files Browse the repository at this point in the history
* Updated github actions for wheels

* create different artifact names

* updated other actions
  • Loading branch information
g-bauer authored May 15, 2024
1 parent 2e9596e commit 00666ce
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 81 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install pandoc
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: documentation
path: public
Expand Down
68 changes: 26 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build Wheels
Expand All @@ -19,57 +19,46 @@ jobs:
command: build
args: --profile release-lto --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-linux-x86_64
path: dist

macos:
runs-on: macos-latest
macos-x86_64:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --profile release-lto --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-macos-x86_64
path: dist
macos_universal2:
runs-on: macos-latest
macos-aarch64:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - universal2
- name: Build wheels - aarch64
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist
target: aarch64
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-aarch64-apple-darwin
path: dist
windows:
runs-on: windows-latest
Expand All @@ -78,37 +67,32 @@ jobs:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: ${{ matrix.target }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --profile release-lto --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-${{ matrix.target }}
path: dist

deploy-pypi:
name: Publish wheels to PyPI and TestPyPI
runs-on: ubuntu-latest
needs: [linux, windows, macos]
needs: [linux, windows, macos-x86_64, macos-aarch64]
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: actions/setup-python@v2
pattern: wheel-*
path: wheels
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Publish to PyPi
Expand All @@ -117,7 +101,7 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip install --upgrade twine
twine upload --skip-existing dist/*
twine upload --skip-existing wheels/*
release-crates-io:
name: Release crates.io
Expand Down
57 changes: 20 additions & 37 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Build Wheels
Expand All @@ -19,56 +19,45 @@ jobs:
command: build
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-linux-x86_64
path: dist
macos:
runs-on: macos-latest
macos-x86_64:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - x86_64
uses: PyO3/maturin-action@v1
with:
target: x86_64
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-macos-x86_64
path: dist
macos_universal2:
runs-on: macos-latest
macos-aarch64:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels - universal2
architecture: arm64
- name: Build wheels - aarch64
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist
target: aarch64
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-aarch64-apple-darwin
path: dist
windows:
runs-on: windows-latest
Expand All @@ -77,23 +66,17 @@ jobs:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.9
architecture: ${{ matrix.target }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
name: wheel-${{ matrix.target }}
path: dist

0 comments on commit 00666ce

Please sign in to comment.