Skip to content

Commit

Permalink
Fix minor version and cleanup action (#4)
Browse files Browse the repository at this point in the history
Certain odd linux architectures are stuck on 3.8 (e.g. arm, or powerpc) but now all OS with their major archs have 3.7--3.10 available.

Close #2
Close #3
  • Loading branch information
sbihel committed Mar 16, 2022
1 parent 84b0961 commit e76a893
Showing 1 changed file with 18 additions and 84 deletions.
102 changes: 18 additions & 84 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,29 @@
name: Release
name: CI/CD

on:
push:
tags:
- v*
pull_request:
branches:
- feat/pyo3
- 'main'


jobs:
macos:
runs-on: macos-latest
strategy:
matrix:
target: [x64, aarch64]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
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: messense/maturin-action@v1
with:
target: x86_64
args: --release --out dist
- name: Install built wheel - x86_64
run: |
pip install didkit --no-index --find-links dist --force-reinstall
python -c "import didkit"
- name: Build wheels - universal2
- name: Build wheels
uses: messense/maturin-action@v1
with:
args: --release --universal2 --out dist --no-sdist
- name: Install built wheel - universal2
target: ${{ matrix.target }}
args: --release --out dist --no-sdist
- name: Install built wheel
if: matrix.target == 'x64'
run: |
pip install didkit --no-index --find-links dist --force-reinstall
python -c "import didkit"
Expand All @@ -52,22 +40,13 @@ jobs:
target: [x64, x86]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
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: messense/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --no-sdist
- name: Install built wheel
if: matrix.target == 'x64'
run: |
pip install didkit --no-index --find-links dist --force-reinstall
python -c "import didkit"
Expand All @@ -81,19 +60,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, i686]
target: [x86_64, i686, aarch64, armv7, s390x, ppc64le, ppc64]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
architecture: x64
- 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 --out dist --no-sdist
args: --release --out dist
- name: Install built wheel
if: matrix.target == 'x86_64'
run: |
Expand All @@ -105,56 +82,13 @@ jobs:
name: wheels
path: dist

linux-cross:
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64, armv7, s390x, ppc64le, ppc64]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Build Wheels
uses: messense/maturin-action@v1
env:
PYO3_CROSS_LIB_DIR: /opt/python/cp39-cp39/lib
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist --no-sdist
# TODO Cannot find wheels, probably due to wrong Python version?
# - uses: uraimo/run-on-arch-action@v2.0.5
# if: matrix.target != 'ppc64'
# name: Install built wheel
# with:
# arch: ${{ matrix.target }}
# distro: ubuntu18.04
# githubToken: ${{ github.token }}
# # Mount the dist directory as /artifacts in the container
# dockerRunArgs: |
# --volume "${PWD}/dist:/artifacts"
# install: |
# apt-get update
# apt-get install -y --no-install-recommends python3 python3-pip
# pip3 install -U pip
# run: |
# ls -lrth /artifacts
# pip3 install didkit --no-index --find-links /artifacts --force-reinstall
# python3 -c "import didkit"
- 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, linux-cross ] # windows,
needs: [ macos, linux, windows]
steps:
- uses: actions/download-artifact@v2
with:
Expand Down

0 comments on commit e76a893

Please sign in to comment.