Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit e76a893

Browse files
authored
Fix minor version and cleanup action (#4)
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
1 parent 84b0961 commit e76a893

File tree

1 file changed

+18
-84
lines changed

1 file changed

+18
-84
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,29 @@
1-
name: Release
1+
name: CI/CD
22

33
on:
44
push:
55
tags:
66
- v*
7+
pull_request:
78
branches:
8-
- feat/pyo3
9+
- 'main'
10+
911

1012
jobs:
1113
macos:
1214
runs-on: macos-latest
15+
strategy:
16+
matrix:
17+
target: [x64, aarch64]
1318
steps:
1419
- uses: actions/checkout@v2
15-
- uses: actions/setup-python@v2
16-
with:
17-
python-version: 3.9
18-
architecture: x64
19-
- name: Install Rust toolchain
20-
uses: actions-rs/toolchain@v1
21-
with:
22-
toolchain: stable
23-
profile: minimal
24-
default: true
25-
- name: Build wheels - x86_64
26-
uses: messense/maturin-action@v1
27-
with:
28-
target: x86_64
29-
args: --release --out dist
30-
- name: Install built wheel - x86_64
31-
run: |
32-
pip install didkit --no-index --find-links dist --force-reinstall
33-
python -c "import didkit"
34-
- name: Build wheels - universal2
20+
- name: Build wheels
3521
uses: messense/maturin-action@v1
3622
with:
37-
args: --release --universal2 --out dist --no-sdist
38-
- name: Install built wheel - universal2
23+
target: ${{ matrix.target }}
24+
args: --release --out dist --no-sdist
25+
- name: Install built wheel
26+
if: matrix.target == 'x64'
3927
run: |
4028
pip install didkit --no-index --find-links dist --force-reinstall
4129
python -c "import didkit"
@@ -52,22 +40,13 @@ jobs:
5240
target: [x64, x86]
5341
steps:
5442
- uses: actions/checkout@v2
55-
- uses: actions/setup-python@v2
56-
with:
57-
python-version: 3.9
58-
architecture: ${{ matrix.target }}
59-
- name: Install Rust toolchain
60-
uses: actions-rs/toolchain@v1
61-
with:
62-
toolchain: stable
63-
profile: minimal
64-
default: true
6543
- name: Build wheels
6644
uses: messense/maturin-action@v1
6745
with:
6846
target: ${{ matrix.target }}
6947
args: --release --out dist --no-sdist
7048
- name: Install built wheel
49+
if: matrix.target == 'x64'
7150
run: |
7251
pip install didkit --no-index --find-links dist --force-reinstall
7352
python -c "import didkit"
@@ -81,19 +60,17 @@ jobs:
8160
runs-on: ubuntu-latest
8261
strategy:
8362
matrix:
84-
target: [x86_64, i686]
63+
target: [x86_64, i686, aarch64, armv7, s390x, ppc64le, ppc64]
8564
steps:
8665
- uses: actions/checkout@v2
87-
- uses: actions/setup-python@v2
88-
with:
89-
python-version: 3.9
90-
architecture: x64
9166
- name: Build Wheels
9267
uses: messense/maturin-action@v1
68+
env:
69+
PYO3_CROSS_LIB_DIR: /opt/python/cp38-cp38/lib
9370
with:
9471
target: ${{ matrix.target }}
9572
manylinux: auto
96-
args: --release --out dist --no-sdist
73+
args: --release --out dist
9774
- name: Install built wheel
9875
if: matrix.target == 'x86_64'
9976
run: |
@@ -105,56 +82,13 @@ jobs:
10582
name: wheels
10683
path: dist
10784

108-
linux-cross:
109-
runs-on: ubuntu-latest
110-
strategy:
111-
matrix:
112-
target: [aarch64, armv7, s390x, ppc64le, ppc64]
113-
steps:
114-
- uses: actions/checkout@v2
115-
- uses: actions/setup-python@v2
116-
with:
117-
python-version: 3.9
118-
- name: Build Wheels
119-
uses: messense/maturin-action@v1
120-
env:
121-
PYO3_CROSS_LIB_DIR: /opt/python/cp39-cp39/lib
122-
with:
123-
target: ${{ matrix.target }}
124-
manylinux: auto
125-
args: --release --out dist --no-sdist
126-
# TODO Cannot find wheels, probably due to wrong Python version?
127-
# - uses: uraimo/run-on-arch-action@v2.0.5
128-
# if: matrix.target != 'ppc64'
129-
# name: Install built wheel
130-
# with:
131-
# arch: ${{ matrix.target }}
132-
# distro: ubuntu18.04
133-
# githubToken: ${{ github.token }}
134-
# # Mount the dist directory as /artifacts in the container
135-
# dockerRunArgs: |
136-
# --volume "${PWD}/dist:/artifacts"
137-
# install: |
138-
# apt-get update
139-
# apt-get install -y --no-install-recommends python3 python3-pip
140-
# pip3 install -U pip
141-
# run: |
142-
# ls -lrth /artifacts
143-
# pip3 install didkit --no-index --find-links /artifacts --force-reinstall
144-
# python3 -c "import didkit"
145-
- name: Upload wheels
146-
uses: actions/upload-artifact@v2
147-
with:
148-
name: wheels
149-
path: dist
150-
15185
# TODO Add pypy
15286

15387
release:
15488
name: Release
15589
runs-on: ubuntu-latest
15690
if: "startsWith(github.ref, 'refs/tags/')"
157-
needs: [ macos, linux, linux-cross ] # windows,
91+
needs: [ macos, linux, windows]
15892
steps:
15993
- uses: actions/download-artifact@v2
16094
with:

0 commit comments

Comments
 (0)