Skip to content

Commit

Permalink
Trying out maturin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Aug 24, 2023
1 parent abc3027 commit 7cfef4a
Show file tree
Hide file tree
Showing 5 changed files with 339 additions and 481 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/python-release-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Python Release - Conda

on:
push:
tags:
- v*
# tags:
# - v*

env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
Expand Down Expand Up @@ -125,8 +125,8 @@ jobs:
conda list
conda-build .github/conda --python=${{ matrix.python }}
- name: Upload to Anaconda
shell: bash -l {0}
run: |
source $HOME/miniconda/bin/activate
anaconda upload `conda-build .github/conda --output` --force
# - name: Upload to Anaconda
# shell: bash -l {0}
# run: |
# source $HOME/miniconda/bin/activate
# anaconda upload `conda-build .github/conda --output` --force
240 changes: 120 additions & 120 deletions .github/workflows/python-release-extra.yml
Original file line number Diff line number Diff line change
@@ -1,120 +1,120 @@
name: Python Release extra

on:
push:
tags:
- v*

env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_DIST }}
DIST_DIR: '${{ github.sha }}_extra'

jobs:

create_wheels_manylinux_2014_ppc64le:
runs-on: ubuntu-latest
name: Create wheels for manylinux2014 - PowerPC
steps:
- uses: actions/checkout@v3

- name: Upgrade libssl
run: sudo apt-get install -y libssl-dev

- name: Pull images
run: |
docker pull multiarch/qemu-user-static
docker pull quay.io/pypa/manylinux2014_ppc64le:latest
- name: Install QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build and audit wheels
working-directory: ./bindings/python
run: |
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e DIST_DIR \
--rm -v `pwd`/../..:/io quay.io/pypa/manylinux2014_ppc64le \
/bin/bash -c "yum install -y openssl-devel && cd /io/bindings/python; sh build-wheels.sh"
create_wheels_manylinux_2014_aarch64:
runs-on: ubuntu-latest
name: Create wheels for manylinux2014 - Aarch64
steps:
- uses: actions/checkout@v2

- name: Upgrade libssl
run: sudo apt-get install -y libssl-dev

- name: Pull images
run: |
docker pull multiarch/qemu-user-static
docker pull quay.io/pypa/manylinux2014_aarch64:latest
- name: Install QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build and audit wheels
working-directory: ./bindings/python
run: |
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e DIST_DIR \
--rm -v `pwd`/../..:/io quay.io/pypa/manylinux2014_aarch64 \
/bin/bash -c "yum install -y openssl-devel && cd /io/bindings/python; sh build-wheels.sh"
create_wheels_manylinux_2014_x390x:
runs-on: ubuntu-latest
name: Create wheels for manylinux2014 - S390X
steps:
- uses: actions/checkout@v2

- name: Upgrade libssl
run: sudo apt-get install -y libssl-dev

- name: Pull images
run: |
docker pull multiarch/qemu-user-static
docker pull quay.io/pypa/manylinux2014_s390x:latest
- name: Install QEMU
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build and audit wheels
working-directory: ./bindings/python
run: |
docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e DIST_DIR \
--rm -v `pwd`/../..:/io quay.io/pypa/manylinux2014_s390x \
/bin/bash -c "yum install -y openssl-devel && cd /io/bindings/python; sh build-wheels.sh"
upload_package:
name: Upload package to PyPi
runs-on: ubuntu-latest
needs:
- create_wheels_manylinux_2014_ppc64le
- create_wheels_manylinux_2014_aarch64
- create_wheels_manylinux_2014_x390x

steps:
- uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v4

- name: Retrieve all wheels
shell: bash
run: |
pip install awscli
aws s3 sync "s3://safetensors-releases/python/$DIST_DIR" ./bindings/python/dist
- name: Install dependencies
run: |
pip install setuptools wheel setuptools-rust
- name: Upload to PyPi
working-directory: ./bindings/python
run: |
pip install twine
twine upload dist/* -u __token__ -p "$PYPI_TOKEN"
# name: Python Release extra
#
# on:
# push:
# tags:
# - v*
#
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_DEFAULT_REGION: us-east-1
# PYPI_TOKEN: ${{ secrets.PYPI_TOKEN_DIST }}
# DIST_DIR: '${{ github.sha }}_extra'
#
# jobs:
#
# create_wheels_manylinux_2014_ppc64le:
# runs-on: ubuntu-latest
# name: Create wheels for manylinux2014 - PowerPC
# steps:
# - uses: actions/checkout@v3
#
# - name: Upgrade libssl
# run: sudo apt-get install -y libssl-dev
#
# - name: Pull images
# run: |
# docker pull multiarch/qemu-user-static
# docker pull quay.io/pypa/manylinux2014_ppc64le:latest
#
# - name: Install QEMU
# run: |
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
#
# - name: Build and audit wheels
# working-directory: ./bindings/python
# run: |
# docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e DIST_DIR \
# --rm -v `pwd`/../..:/io quay.io/pypa/manylinux2014_ppc64le \
# /bin/bash -c "yum install -y openssl-devel && cd /io/bindings/python; sh build-wheels.sh"
#
# create_wheels_manylinux_2014_aarch64:
# runs-on: ubuntu-latest
# name: Create wheels for manylinux2014 - Aarch64
# steps:
# - uses: actions/checkout@v2
#
# - name: Upgrade libssl
# run: sudo apt-get install -y libssl-dev
#
# - name: Pull images
# run: |
# docker pull multiarch/qemu-user-static
# docker pull quay.io/pypa/manylinux2014_aarch64:latest
#
# - name: Install QEMU
# run: |
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
#
# - name: Build and audit wheels
# working-directory: ./bindings/python
# run: |
# docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e DIST_DIR \
# --rm -v `pwd`/../..:/io quay.io/pypa/manylinux2014_aarch64 \
# /bin/bash -c "yum install -y openssl-devel && cd /io/bindings/python; sh build-wheels.sh"
#
# create_wheels_manylinux_2014_x390x:
# runs-on: ubuntu-latest
# name: Create wheels for manylinux2014 - S390X
# steps:
# - uses: actions/checkout@v2
#
# - name: Upgrade libssl
# run: sudo apt-get install -y libssl-dev
#
# - name: Pull images
# run: |
# docker pull multiarch/qemu-user-static
# docker pull quay.io/pypa/manylinux2014_s390x:latest
#
# - name: Install QEMU
# run: |
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
#
# - name: Build and audit wheels
# working-directory: ./bindings/python
# run: |
# docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION -e DIST_DIR \
# --rm -v `pwd`/../..:/io quay.io/pypa/manylinux2014_s390x \
# /bin/bash -c "yum install -y openssl-devel && cd /io/bindings/python; sh build-wheels.sh"
#
# upload_package:
# name: Upload package to PyPi
# runs-on: ubuntu-latest
# needs:
# - create_wheels_manylinux_2014_ppc64le
# - create_wheels_manylinux_2014_aarch64
# - create_wheels_manylinux_2014_x390x
#
# steps:
# - uses: actions/checkout@v2
#
# - name: Install Python
# uses: actions/setup-python@v4
#
# - name: Retrieve all wheels
# shell: bash
# run: |
# pip install awscli
# aws s3 sync "s3://safetensors-releases/python/$DIST_DIR" ./bindings/python/dist
#
# - name: Install dependencies
# run: |
# pip install setuptools wheel setuptools-rust
#
# - name: Upload to PyPi
# working-directory: ./bindings/python
# run: |
# pip install twine
# twine upload dist/* -u __token__ -p "$PYPI_TOKEN"
Loading

0 comments on commit 7cfef4a

Please sign in to comment.