|
7 | 7 | workflow_dispatch: |
8 | 8 |
|
9 | 9 | jobs: |
10 | | - build_wheels: |
11 | | - name: Build wheels on ${{ matrix.os }} |
12 | | - runs-on: ${{ matrix.os }} |
| 10 | + build_linux_arm64_wheels: |
| 11 | + runs-on: ubuntu-24.04-arm |
13 | 12 | strategy: |
14 | 13 | matrix: |
15 | | - os: [macos-latest] |
| 14 | + abi: [manylinux, musllinux] |
16 | 15 |
|
17 | 16 | steps: |
18 | | - - uses: actions/checkout@v4 |
19 | | - with: |
20 | | - submodules: true |
21 | | - |
22 | | - - name: Set up QEMU |
23 | | - if: runner.os == 'Linux' |
24 | | - uses: docker/setup-qemu-action@v3 |
25 | | - with: |
26 | | - platforms: all |
27 | | - |
28 | | - - name: Add x86 Rust target on macOS |
29 | | - if: runner.os == 'macOS' |
30 | | - run: | |
31 | | - rustup target add x86_64-apple-darwin |
32 | | -
|
33 | | - - name: Update Rust |
34 | | - if: runner.os != 'Linux' |
35 | | - run: | |
36 | | - rustup update stable && rustup default stable |
37 | | -
|
38 | | - - name: Set up Python |
39 | | - uses: actions/setup-python@v5 |
40 | | - with: |
41 | | - python-version: "3.12" |
42 | | - |
43 | | - - name: Install build tools |
44 | | - run: | |
45 | | - python -m pip install --upgrade pip |
46 | | - python -m pip install cibuildwheel |
47 | | -
|
48 | | - # Build the entire package with wake_rs using cibuildwheel |
49 | | - - name: Build wheels |
50 | | - run: | |
51 | | - python -m cibuildwheel --output-dir wheelhouse |
52 | | - env: |
53 | | - CIBW_SKIP: cp36-* cp37-* pp* *-musllinux_i686 |
54 | | - CIBW_ARCHS_MACOS: x86_64 arm64 |
55 | | - CIBW_ARCHS_LINUX: auto aarch64 |
56 | | - CIBW_BEFORE_ALL_WINDOWS: rustup target add i686-pc-windows-msvc |
57 | | - CIBW_BEFORE_ALL_LINUX: | |
58 | | - yum install -y openssl-devel libatomic || apt install -y pkg-config libssl-dev libatomic1 || apk add --no-cache openssl-dev |
59 | | - curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=stable --profile=minimal -y |
60 | | - CIBW_REPAIR_WHEEL_COMMAND_MACOS: | |
61 | | - if [ "$(uname -m)" = "x86_64" ]; then |
62 | | - export MACOSX_DEPLOYMENT_TARGET=10.12 |
63 | | - else |
64 | | - export MACOSX_DEPLOYMENT_TARGET=14.0 |
65 | | - fi |
66 | | - delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} |
67 | | - CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH" |
68 | | - |
69 | | - - name: Upload wheels |
70 | | - uses: actions/upload-artifact@v4 |
71 | | - with: |
72 | | - name: dist-${{ matrix.os }} |
73 | | - path: wheelhouse/*.whl |
| 17 | + - name: Checkout latest |
| 18 | + uses: actions/checkout@v4 |
| 19 | + with: |
| 20 | + ref: ${{ github.ref }} |
| 21 | + submodules: true |
| 22 | + |
| 23 | + - name: Setup Python |
| 24 | + uses: actions/setup-python@v5 |
| 25 | + with: |
| 26 | + python-version: 3.12 |
| 27 | + |
| 28 | + - name: Install cibuildwheel |
| 29 | + run: | |
| 30 | + python3 -m pip install cibuildwheel |
| 31 | +
|
| 32 | + - name: Build wheels |
| 33 | + run: | |
| 34 | + cibuildwheel . --output-dir wheelhouse |
| 35 | + env: |
| 36 | + CIBW_BUILD: "*-${{ matrix.abi }}_*" |
| 37 | + CIBW_SKIP: pp* |
| 38 | + CIBW_ARCHS_LINUX: aarch64 |
| 39 | + CIBW_ENABLE: cpython-freethreading |
| 40 | + CIBW_BEFORE_ALL_LINUX: | |
| 41 | + yum install -y openssl-devel libatomic || apt install -y pkg-config libssl-dev libatomic1 || apk add --no-cache openssl-dev |
| 42 | + curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=stable --profile=minimal -y |
| 43 | + CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH" |
| 44 | + |
| 45 | + - name: Upload wheels |
| 46 | + uses: actions/upload-artifact@v4 |
| 47 | + with: |
| 48 | + name: wheels-${{ runner.os }}-${{ matrix.abi }}-arm64 |
| 49 | + path: ./wheelhouse/*.whl |
| 50 | + |
| 51 | + build_linux_wheels: |
| 52 | + runs-on: ubuntu-latest |
| 53 | + strategy: |
| 54 | + matrix: |
| 55 | + abi: [manylinux, musllinux] |
| 56 | + arch: [x86_64, i686] |
| 57 | + exclude: |
| 58 | + - abi: musllinux |
| 59 | + arch: i686 |
| 60 | + |
| 61 | + steps: |
| 62 | + - name: Checkout latest |
| 63 | + uses: actions/checkout@v4 |
| 64 | + with: |
| 65 | + ref: ${{ github.ref }} |
| 66 | + submodules: true |
| 67 | + |
| 68 | + - name: Setup Python |
| 69 | + uses: actions/setup-python@v5 |
| 70 | + with: |
| 71 | + python-version: 3.12 |
| 72 | + |
| 73 | + - name: Install cibuildwheel |
| 74 | + run: | |
| 75 | + python3 -m pip install cibuildwheel |
| 76 | +
|
| 77 | + - name: Build wheels |
| 78 | + run: | |
| 79 | + cibuildwheel . --output-dir wheelhouse |
| 80 | + env: |
| 81 | + CIBW_BUILD: "*-${{ matrix.abi }}_*" |
| 82 | + CIBW_SKIP: pp* |
| 83 | + CIBW_ARCHS_LINUX: ${{ matrix.arch }} |
| 84 | + CIBW_ENABLE: cpython-freethreading |
| 85 | + CIBW_BEFORE_ALL_LINUX: | |
| 86 | + yum install -y openssl-devel libatomic || apt install -y pkg-config libssl-dev libatomic1 || apk add --no-cache openssl-dev |
| 87 | + curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=stable --profile=minimal -y |
| 88 | + echo $LD_LIBRARY_PATH |
| 89 | + CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH" |
| 90 | + |
| 91 | + - name: Upload wheels |
| 92 | + uses: actions/upload-artifact@v4 |
| 93 | + with: |
| 94 | + name: wheels-${{ runner.os }}-${{ matrix.abi }}-${{ matrix.arch }} |
| 95 | + path: ./wheelhouse/*.whl |
| 96 | + |
| 97 | + build_macos_wheels: |
| 98 | + runs-on: macos-latest |
| 99 | + strategy: |
| 100 | + matrix: |
| 101 | + arch: [x86_64, arm64] |
| 102 | + steps: |
| 103 | + - name: Checkout latest |
| 104 | + uses: actions/checkout@v4 |
| 105 | + with: |
| 106 | + ref: ${{ github.ref }} |
| 107 | + submodules: true |
| 108 | + |
| 109 | + - name: Add x86-64 Rust target |
| 110 | + run: | |
| 111 | + rustup target add x86_64-apple-darwin |
| 112 | +
|
| 113 | + - name: Update Rust |
| 114 | + run: | |
| 115 | + rustup update stable && rustup default stable |
| 116 | +
|
| 117 | + - name: Setup Python |
| 118 | + uses: actions/setup-python@v5 |
| 119 | + with: |
| 120 | + python-version: 3.12 |
| 121 | + |
| 122 | + - name: Install cibuildwheel |
| 123 | + run: | |
| 124 | + python3 -m pip install cibuildwheel |
| 125 | +
|
| 126 | + - name: Build wheels |
| 127 | + run: | |
| 128 | + cibuildwheel . --output-dir wheelhouse |
| 129 | + env: |
| 130 | + CIBW_SKIP: pp* |
| 131 | + CIBW_ARCHS_MACOS: ${{ matrix.arch }} |
| 132 | + CIBW_ENABLE: cpython-freethreading |
| 133 | + CIBW_REPAIR_WHEEL_COMMAND_MACOS: | |
| 134 | + if [ "$(uname -m)" = "x86_64" ]; then |
| 135 | + export MACOSX_DEPLOYMENT_TARGET=10.12 |
| 136 | + else |
| 137 | + export MACOSX_DEPLOYMENT_TARGET=14.0 |
| 138 | + fi |
| 139 | + delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} |
| 140 | +
|
| 141 | + - name: Upload wheels |
| 142 | + uses: actions/upload-artifact@v4 |
| 143 | + with: |
| 144 | + name: wheels-${{ runner.os }}-${{ matrix.arch }} |
| 145 | + path: ./wheelhouse/*.whl |
| 146 | + |
| 147 | + build_windows_arm64_wheels: |
| 148 | + runs-on: windows-11-arm |
| 149 | + steps: |
| 150 | + - name: Checkout latest |
| 151 | + uses: actions/checkout@v4 |
| 152 | + with: |
| 153 | + ref: ${{ github.ref }} |
| 154 | + submodules: true |
| 155 | + |
| 156 | + - name: Setup Python |
| 157 | + uses: actions/setup-python@v5 |
| 158 | + with: |
| 159 | + python-version: 3.12 |
| 160 | + |
| 161 | + - name: Install cibuildwheel |
| 162 | + run: | |
| 163 | + python3 -m pip install cibuildwheel |
| 164 | +
|
| 165 | + - name: Build wheels |
| 166 | + run: | |
| 167 | + cibuildwheel . --output-dir wheelhouse |
| 168 | + env: |
| 169 | + CIBW_SKIP: pp* |
| 170 | + CIBW_ARCHS_WINDOWS: ARM64 |
| 171 | + CIBW_ENABLE: cpython-freethreading |
| 172 | + CIBW_BEFORE_ALL_WINDOWS: | |
| 173 | + curl -sSf https://sh.rustup.rs | sh -s -- --default-toolchain=stable --profile=minimal -y |
| 174 | + CIBW_BEFORE_BUILD_WINDOWS: | |
| 175 | + set PATH="%USERPROFILE%\.cargo\bin;%PATH%" && echo %USERPROFILE%\.cargo\bin |
| 176 | + CIBW_BUILD_VERBOSITY: 3 |
| 177 | + |
| 178 | + - name: Upload wheels |
| 179 | + uses: actions/upload-artifact@v4 |
| 180 | + with: |
| 181 | + name: wheels-${{ runner.os }}-arm64 |
| 182 | + path: ./wheelhouse/*.whl |
| 183 | + |
| 184 | + build_windows_wheels: |
| 185 | + runs-on: windows-latest |
| 186 | + strategy: |
| 187 | + matrix: |
| 188 | + arch: [x86, AMD64] |
| 189 | + steps: |
| 190 | + - name: Checkout latest |
| 191 | + uses: actions/checkout@v4 |
| 192 | + with: |
| 193 | + ref: ${{ github.ref }} |
| 194 | + submodules: true |
| 195 | + |
| 196 | + - name: Setup Python |
| 197 | + uses: actions/setup-python@v5 |
| 198 | + with: |
| 199 | + python-version: 3.12 |
| 200 | + |
| 201 | + - name: Install Rust toolchain |
| 202 | + if: matrix.arch == 'x86' |
| 203 | + run: | |
| 204 | + rustup target add i686-pc-windows-msvc |
| 205 | + rustup default stable-i686-pc-windows-msvc |
| 206 | +
|
| 207 | + - name: Install cibuildwheel |
| 208 | + run: | |
| 209 | + python3 -m pip install cibuildwheel |
| 210 | +
|
| 211 | + - name: Build wheels |
| 212 | + run: | |
| 213 | + cibuildwheel . --output-dir wheelhouse |
| 214 | + env: |
| 215 | + CIBW_SKIP: pp* |
| 216 | + CIBW_ARCHS_WINDOWS: ${{ matrix.arch }} |
| 217 | + CIBW_ENABLE: cpython-freethreading |
| 218 | + |
| 219 | + - name: Upload wheels |
| 220 | + uses: actions/upload-artifact@v4 |
| 221 | + with: |
| 222 | + name: wheels-${{ runner.os }}-${{ matrix.arch }} |
| 223 | + path: ./wheelhouse/*.whl |
0 commit comments