-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|