Skip to content

Commit

Permalink
just build binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopesculian committed Mar 4, 2024
1 parent 18d56ee commit a38fc47
Showing 1 changed file with 31 additions and 66 deletions.
97 changes: 31 additions & 66 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,98 +18,63 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64] # x86, aarch64, armv7, s390x, ppc64le
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
- uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
profile: minimal
toolchain: stable
- run: cargo build --bin aqora --release --target ${{ matrix.target }}

windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64] # x86
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
- uses: actions-rs/toolchain@v1
with:
name: wheels
path: dist
profile: minimal
toolchain: stable
- run: cargo build --bin aqora --release --target ${{ matrix.target }}

macos:
runs-on: macos-latest
strategy:
matrix:
target: [x86_64, aarch64]
target: [x86_64-apple-darwin, aarch64-apple-darwin]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
- uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
profile: minimal
toolchain: stable
- run: cargo build --bin aqora --release --target ${{ matrix.target }}

sdist:
runs-on: ubuntu-latest
steps:
- 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@v4
with:
name: wheels
path: dist

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, windows, macos, sdist]
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --non-interactive --skip-existing *
# release:
# name: Release
# runs-on: ubuntu-latest
# if: "startsWith(github.ref, 'refs/tags/')"
# needs: [linux, windows, macos, sdist]
# steps:
# - uses: actions/download-artifact@v4
# with:
# name: wheels
# - name: Publish to PyPI
# uses: PyO3/maturin-action@v1
# env:
# MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
# with:
# command: upload
# args: --non-interactive --skip-existing *

0 comments on commit a38fc47

Please sign in to comment.