-
Notifications
You must be signed in to change notification settings - Fork 12
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
22 additions
and
18 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 |
---|---|---|
|
@@ -3,30 +3,34 @@ name: Build and Test | |
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.9, 3.10, 3.11, 3.12] | ||
build-linux-cp39: | ||
runs-on: ubuntu-latest | ||
container: quay.io/pypa/manylinux2014_x86_64 | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: actions/[email protected] | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install Python package dependencies | ||
run: /opt/python/cp39-cp39/bin/python -m pip install --upgrade cython wheel numpy setuptools_rust | ||
|
||
- name: Build binary wheel | ||
run: /opt/python/cp39-cp39/bin/python setup.py bdist_wheel | ||
|
||
- name: Build Docker image | ||
run: docker build -t my-custom-image . | ||
- name: Apply auditwheel for manylinux wheel | ||
run: auditwheel repair -w dist dist/* | ||
|
||
- name: Build for Python ${{ matrix.python-version }} | ||
run: | | ||
docker run --rm -v ${{ github.workspace }}:/workspace my-custom-image /bin/bash -c " | ||
python${{ matrix.python-version }} -m pip install --upgrade setuptools wheel && \ | ||
python${{ matrix.python-version }} setup.py bdist_wheel && \ | ||
auditwheel repair -w dist dist/* && \ | ||
rm dist/*-linux_x86_64.whl" | ||
- name: Remove linux wheel | ||
run: rm dist/*-linux_x86_64.whl | ||
|
||
- name: Archive dist artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: dist-linux-${{ matrix.python-version }} | ||
name: dist-linux-3.9 | ||
path: dist |