Skip to content

Commit

Permalink
fix: bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
dirvine committed Nov 28, 2024
1 parent 67e1fa6 commit 74caf49
Showing 1 changed file with 54 additions and 6 deletions.
60 changes: 54 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,30 +69,78 @@ jobs:

linux:
runs-on: ubuntu-latest
# Add permissions to job
permissions:
id-token: write
contents: read
strategy:
matrix:
target: [x86_64, i686]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
target: [x86_64]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Install build dependencies
run: |
python -m pip install --user cffi
python -m pip install --user patchelf
python -m pip install --upgrade pip
python -m pip install --upgrade maturin pytest click
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist
args: --release --out dist --features python
sccache: 'true'
- name: Test wheel
if: matrix.target == 'x86_64'
run: |
python -m pip install --no-index --find-links dist self_encryption
python -c "import self_encryption; print(self_encryption.__file__)"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist/*.whl
if-no-files-found: error

linux-cross:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
strategy:
matrix:
target: [aarch64, armv7, s390x, ppc64le]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist --features python
sccache: 'true'
- uses: uraimo/[email protected]
if: matrix.target != 'ppc64'
name: Test 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 --no-index --find-links dist/ self_encryption
python3 -c "import self_encryption; print(self_encryption.__file__)"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 74caf49

Please sign in to comment.