Skip to content

Commit

Permalink
[wip]fix: rectify errors with test ci job
Browse files Browse the repository at this point in the history
- use latest version of maturin
- remove unused logic
- use latest github 'upload/download artifacts' jobs
- add openssl rust dependency to fix linux build failures
  • Loading branch information
dhruv-ahuja committed Oct 14, 2023
1 parent 2ea6c67 commit a143db2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 85 deletions.
93 changes: 9 additions & 84 deletions .github/workflows/test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,12 @@ jobs:
with:
target: x86_64
args: --release --out dist --sdist
maturin-version: "v0.14.7"
# - name: Install built wheel - x86_64
# run: |
# pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
# pip install pytest
# pytest -v
- name: Build wheels - universal2
uses: messense/maturin-action@v1
with:
args: --release --universal2 --out dist
maturin-version: "v0.14.7"
# - name: Install built wheel - universal2
# run: |
# pip install dist/${{ env.PACKAGE_NAME }}-*universal2.whl --force-reinstall
# pip install pytest
# pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -89,15 +77,8 @@ jobs:
with:
target: ${{ matrix.target }}
args: --release --out dist
maturin-version: "v0.14.7"
# - name: Install built wheel
# shell: bash
# run: |
# python -m pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
# pip install pytest
# python -m pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -119,15 +100,8 @@ jobs:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
maturin-version: "v0.14.7"
# - name: Install built wheel
# if: matrix.target == 'x86_64'
# run: |
# pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
# pip install pytest
# pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -148,24 +122,8 @@ jobs:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
maturin-version: "v0.14.7"
# - uses: uraimo/run-on-arch-action@v2.0.5
# if: matrix.target != 'ppc64'
# name: Install built wheel
# with:
# arch: ${{ matrix.target }}
# distro: ubuntu20.04
# githubToken: ${{ github.token }}
# install: |
# apt-get update
# apt-get install -y --no-install-recommends python3 python3-pip
# pip3 install -U pip
# run: |
# pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
# pip install pytest
# pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -189,20 +147,8 @@ jobs:
target: ${{ matrix.target }}
manylinux: musllinux_1_2
args: --release --out dist
maturin-version: "v0.14.7"
# - name: Install built wheel
# if: matrix.target == 'x86_64-unknown-linux-musl'
# uses: addnab/docker-run-action@v3
# with:
# image: alpine:latest
# options: -v ${{ github.workspace }}:/io -w /io
# run: |
# apk add py3-pip
# pip3 install -U pip pytest
# pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links /io/dist/ --force-reinstall
# python3 -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -227,21 +173,8 @@ jobs:
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --out dist
maturin-version: "v0.14.7"
# - uses: uraimo/run-on-arch-action@master
# name: Install built wheel
# with:
# arch: ${{ matrix.platform.arch }}
# distro: alpine_latest
# githubToken: ${{ github.token }}
# install: |
# apk add py3-pip
# pip3 install -U pip pytest
# run: |
# pip3 install ${{ env.PACKAGE_NAME }} --no-index --find-links dist/ --force-reinstall
# python3 -m pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand Down Expand Up @@ -269,18 +202,11 @@ jobs:
- name: Build wheels
uses: messense/maturin-action@v1
with:
maturin-version: "v0.14.7"
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -i pypy${{ matrix.python-version }}
# - name: Install built wheel
# if: matrix.target == 'x86_64'
# run: |
# pip install dist/${{ env.PACKAGE_NAME }}-*.whl --force-reinstall
# pip install pytest
# pytest -v
- name: Upload wheels
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
Expand All @@ -295,13 +221,12 @@ jobs:
- linux-cross
- musllinux
- musllinux-cross
- pypy
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: wheels
- uses: actions/setup-python@v2
- uses: actions/setup-python@v3
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ regex = "1.9"
lazy_static = "1.4.0"
pyo3-log = "*"
log = "0.4.20"
colored = "2"
colored = "2"
openssl = { version = "0.10", features = ["vendored"] }

0 comments on commit a143db2

Please sign in to comment.