From b991b8f1cc92dfd3112c4cc0bbb0fecba11f9ad5 Mon Sep 17 00:00:00 2001 From: Glib Glugovskiy Date: Wed, 14 Aug 2024 22:11:30 +0300 Subject: [PATCH] ci: test linux builds --- .github/workflows/release.yml | 85 ++++++----------------------------- 1 file changed, 13 insertions(+), 72 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 68c66b4..9480027 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 *