Skip to content

Commit

Permalink
ci: test linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
GlugovGrGlib authored Aug 14, 2024
1 parent de7f946 commit b991b8f
Showing 1 changed file with 13 additions and 72 deletions.
85 changes: 13 additions & 72 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,90 +1,31 @@
name: CD

on:
push:
tags:
- v*
pull_request:
branches:
- 'main'

on: push

jobs:
macos:
runs-on: macos-latest
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x64, aarch64]
python-version: [3.8, 3.9, 3.10, 3.11, 3.12]
target: [x86_64, i686, aarch64, armv7]
steps:
- uses: actions/checkout@v2
- name: Build wheels
uses: messense/maturin-action@v1
- name: Set up Python
uses: actions/setup-python@v2
with:
target: ${{ matrix.target }}
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v2
- name: Build wheels
python-version: ${{ matrix.python-version }}
- name: Build Wheels
uses: messense/maturin-action@v1
env:
# Update this based on the Python version
PYO3_CROSS_LIB_DIR: /opt/python/cp${{ matrix.python-version }}-cp${{ matrix.python-version }}/lib
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, i686, aarch64, armv7]
steps:
- uses: actions/checkout@v2
- name: Build Wheels
uses: messense/maturin-action@v1
env:
PYO3_CROSS_LIB_DIR: /opt/python/cp38-cp38/lib
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release -o dist --find-interpreter
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist

# TODO Add pypy

release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [ macos, linux, windows]
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install --upgrade twine
twine upload --skip-existing *

0 comments on commit b991b8f

Please sign in to comment.