Skip to content

Commit

Permalink
Updated Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arjanz committed Mar 22, 2024
1 parent 65d933b commit 34204f2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 57 deletions.
44 changes: 16 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
Expand All @@ -23,17 +23,6 @@ jobs:
target: aarch64-apple-darwin
profile: minimal
default: true
- name: Build
run: cargo build --release
- name: Build wheels - x86_64
uses: messense/maturin-action@v1
with:
target: x86_64
rust-toolchain: nightly-2024-02-04
args: -i python --release --out dist
- name: Install built wheel - x86_64
run: |
pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall
- name: Build wheels - universal2
if: ${{ matrix.python-version != '3.7' }}
uses: messense/maturin-action@v1
Expand All @@ -47,17 +36,17 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-mac-${{ matrix.python-version }}
path: dist/*.whl
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: [x64, x86]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
Expand All @@ -84,17 +73,17 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-win-${{ matrix.target }}-${{ matrix.python-version }}
path: dist/*.whl

linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: [x86_64, i686]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -103,7 +92,7 @@ jobs:
default: true
- name: Build
run: cargo build --release
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
Expand All @@ -116,7 +105,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-linux-${{ matrix.target }}-${{ matrix.python-version }}
path: dist/*.whl

muslwheels_x86:
Expand All @@ -132,7 +121,7 @@ jobs:
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.9.0
Expand All @@ -142,7 +131,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-musl
path: dist/*.whl

aarch64_wheels:
Expand All @@ -158,10 +147,10 @@ jobs:
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

Expand Down Expand Up @@ -190,4 +179,3 @@ jobs:
with:
name: dist-src
path: dist/*.tar.gz

47 changes: 18 additions & 29 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
Expand All @@ -22,17 +22,6 @@ jobs:
target: aarch64-apple-darwin
profile: minimal
default: true
- name: Build
run: cargo build --release
- name: Build wheels - x86_64
uses: messense/maturin-action@v1
with:
target: x86_64
rust-toolchain: nightly-2024-02-04
args: -i python --release --out dist
- name: Install built wheel - x86_64
run: |
pip install py-sr25519-bindings --no-index --find-links dist --force-reinstall
- name: Build wheels - universal2
if: ${{ matrix.python-version != '3.7' }}
uses: messense/maturin-action@v1
Expand All @@ -46,17 +35,17 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-mac-${{ matrix.python-version }}
path: dist/*.whl
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: [x64, x86]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
Expand All @@ -83,17 +72,17 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-win-${{ matrix.target }}-${{ matrix.python-version }}
path: dist/*.whl

linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
target: [x86_64, i686]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -102,7 +91,7 @@ jobs:
default: true
- name: Build
run: cargo build --release
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build Wheels
Expand All @@ -115,7 +104,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-linux-${{ matrix.target }}-${{ matrix.python-version }}
path: dist/*.whl

muslwheels_x86:
Expand All @@ -131,7 +120,7 @@ jobs:
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.9.0
Expand All @@ -141,7 +130,7 @@ jobs:
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: dist-wheels
name: dist-wheels-musl
path: dist/*.whl

aarch64_wheels:
Expand All @@ -157,10 +146,10 @@ jobs:
CIBW_SKIP: "cp27-* cp34-* cp35-* cp36-*"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

Expand Down Expand Up @@ -194,7 +183,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [macos, windows, linux, muslwheels_x86, aarch64_wheels, build_sdist]
needs: [macos, windows, linux, muslwheels_x86, build_sdist]
steps:
- uses: actions/download-artifact@v4
with:
Expand All @@ -210,4 +199,4 @@ jobs:
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install --upgrade twine
twine upload --skip-existing *
twine upload --skip-existing dist/*

0 comments on commit 34204f2

Please sign in to comment.