|
6 | 6 | workflow_dispatch: |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - release: |
10 | | - name: Build and Release |
| 9 | + linux: |
11 | 10 | runs-on: ubuntu-latest |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + target: [x86_64, aarch64] |
12 | 14 | steps: |
13 | 15 | - uses: actions/checkout@v4 |
14 | 16 | - name: Build wheels |
15 | 17 | uses: PyO3/maturin-action@v1 |
16 | 18 | with: |
17 | | - command: build |
| 19 | + target: ${{ matrix.target }} |
18 | 20 | args: --release --out dist --find-interpreter |
19 | 21 | manylinux: auto |
20 | | - targets: | |
21 | | - # Build wheels for linux |
22 | | - x86_64-unknown-linux-gnu |
23 | | - aarch64-unknown-linux-gnu |
24 | | - # Build wheels for windows |
25 | | - x86_64-pc-windows-msvc |
26 | | - # Build wheels for macos |
27 | | - x86_64-apple-darwin |
28 | | - aarch64-apple-darwin |
| 22 | + - name: Upload wheels |
| 23 | + uses: actions/upload-artifact@v4 |
| 24 | + with: |
| 25 | + name: wheels-linux-${{ matrix.target }} |
| 26 | + path: dist |
| 27 | + |
| 28 | + windows: |
| 29 | + runs-on: windows-latest |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + target: [x64] |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v4 |
| 35 | + - name: Build wheels |
| 36 | + uses: PyO3/maturin-action@v1 |
| 37 | + with: |
| 38 | + target: ${{ matrix.target }} |
| 39 | + args: --release --out dist --find-interpreter |
| 40 | + - name: Upload wheels |
| 41 | + uses: actions/upload-artifact@v4 |
| 42 | + with: |
| 43 | + name: wheels-windows-${{ matrix.target }} |
| 44 | + path: dist |
29 | 45 |
|
| 46 | + macos: |
| 47 | + runs-on: macos-latest |
| 48 | + strategy: |
| 49 | + matrix: |
| 50 | + target: [x86_64, aarch64] |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v4 |
| 53 | + - name: Build wheels |
| 54 | + uses: PyO3/maturin-action@v1 |
| 55 | + with: |
| 56 | + target: ${{ matrix.target }} |
| 57 | + args: --release --out dist --find-interpreter |
| 58 | + - name: Upload wheels |
| 59 | + uses: actions/upload-artifact@v4 |
| 60 | + with: |
| 61 | + name: wheels-macos-${{ matrix.target }} |
| 62 | + path: dist |
| 63 | + |
| 64 | + sdist: |
| 65 | + runs-on: ubuntu-latest |
| 66 | + steps: |
| 67 | + - uses: actions/checkout@v4 |
30 | 68 | - name: Build sdist |
31 | 69 | uses: PyO3/maturin-action@v1 |
32 | 70 | with: |
33 | 71 | command: sdist |
34 | 72 | args: --out dist |
35 | | - |
36 | | - - name: Install Python and maturin |
37 | | - uses: actions/setup-python@v5 |
| 73 | + - name: Upload sdist |
| 74 | + uses: actions/upload-artifact@v4 |
38 | 75 | with: |
39 | | - python-version: '3.x' |
40 | | - - name: Install built package |
41 | | - run: pip install --force-reinstall dist/*.whl |
42 | | - |
43 | | - - name: Run tests |
44 | | - run: python tests/test_all.py |
| 76 | + name: wheels-sdist |
| 77 | + path: dist |
45 | 78 |
|
| 79 | + release: |
| 80 | + name: Release |
| 81 | + runs-on: ubuntu-latest |
| 82 | + needs: [linux, windows, macos, sdist] |
| 83 | + steps: |
| 84 | + - uses: actions/download-artifact@v4 |
| 85 | + with: |
| 86 | + pattern: wheels-* |
| 87 | + merge-multiple: true |
| 88 | + path: dist |
46 | 89 | - name: Publish to PyPI |
47 | 90 | uses: PyO3/maturin-action@v1 |
48 | 91 | env: |
|
0 commit comments