|
5 | 5 | types: [published] |
6 | 6 |
|
7 | 7 | jobs: |
8 | | - # Build wheels on Linux using manylinux container |
| 8 | + # Build wheels on Linux using manylinux containers |
9 | 9 | build-linux: |
10 | | - name: Build Linux wheels |
11 | | - runs-on: ubuntu-latest |
12 | | - container: quay.io/pypa/manylinux_2_28_x86_64 |
| 10 | + name: Build Linux ${{ matrix.arch }} wheels |
| 11 | + runs-on: ${{ matrix.runner }} |
| 12 | + container: ${{ matrix.container }} |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + include: |
| 16 | + - arch: x86_64 |
| 17 | + runner: ubuntu-latest |
| 18 | + container: quay.io/pypa/manylinux_2_28_x86_64 |
| 19 | + artifact: wheels-linux-x86_64 |
| 20 | + - arch: aarch64 |
| 21 | + runner: ubuntu-24.04-arm |
| 22 | + container: quay.io/pypa/manylinux_2_28_aarch64 |
| 23 | + artifact: wheels-linux-aarch64 |
13 | 24 | steps: |
14 | 25 | - uses: actions/checkout@v4 |
15 | 26 |
|
16 | | - - name: Install dependencies |
17 | | - run: | |
18 | | - dnf install -y openssl-devel perl-IPC-Cmd openblas-devel |
19 | | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path |
20 | | - /opt/python/cp312-cp312/bin/pip install maturin |
| 27 | + - name: Install system dependencies |
| 28 | + run: dnf install -y openssl-devel perl-IPC-Cmd openblas-devel |
| 29 | + |
| 30 | + - name: Install Rust |
| 31 | + uses: dtolnay/rust-toolchain@stable |
| 32 | + |
| 33 | + - name: Install maturin |
| 34 | + run: /opt/python/cp312-cp312/bin/pip install maturin |
21 | 35 |
|
22 | 36 | - name: Build wheels |
23 | 37 | run: | |
24 | | - export PATH="$HOME/.cargo/bin:$PATH" |
| 38 | + expected=0 |
25 | 39 | for pyver in 39 310 311 312 313; do |
26 | 40 | pybin="/opt/python/cp${pyver}-cp${pyver}/bin/python" |
27 | | - if [ -f "$pybin" ]; then |
28 | | - /opt/python/cp312-cp312/bin/maturin build --release --out dist -i "$pybin" --features extension-module,openblas |
| 41 | + if [ ! -f "$pybin" ]; then |
| 42 | + echo "ERROR: Expected Python interpreter not found: $pybin" |
| 43 | + exit 1 |
29 | 44 | fi |
| 45 | + /opt/python/cp312-cp312/bin/maturin build --release --out dist -i "$pybin" --features extension-module,openblas |
| 46 | + expected=$((expected + 1)) |
30 | 47 | done |
| 48 | + actual=$(ls dist/*.whl 2>/dev/null | wc -l) |
| 49 | + echo "Built $actual wheels (expected $expected)" |
| 50 | + if [ "$actual" -ne "$expected" ]; then |
| 51 | + echo "ERROR: Expected $expected wheels but found $actual" |
| 52 | + exit 1 |
| 53 | + fi |
31 | 54 |
|
32 | 55 | - name: Upload wheels |
33 | 56 | uses: actions/upload-artifact@v4 |
34 | 57 | with: |
35 | | - name: wheels-linux-x86_64 |
| 58 | + name: ${{ matrix.artifact }} |
36 | 59 | path: dist/*.whl |
37 | 60 |
|
38 | 61 | # Build wheels on macOS ARM64 (native build) |
|
0 commit comments