|
8 | 8 |
|
9 | 9 | jobs: |
10 | 10 | linux: |
11 | | - runs-on: ubuntu-latest |
12 | | - container: quay.io/pypa/manylinux_2_28_x86_64 |
| 11 | + runs-on: ${{ matrix.platform.runs-on }} |
| 12 | + container: quay.io/pypa/manylinux_2_28_${{ matrix.platform.arch }} |
13 | 13 | strategy: |
14 | 14 | matrix: |
15 | | - python-version: [[310, "3.10"], [311, "3.11"], [312, "3.12"], [313, "3.13"]] |
| 15 | + platform: |
| 16 | + [ |
| 17 | + { "arch": "x86_64", "runs-on": "ubuntu-latest" }, |
| 18 | + { "arch": "aarch64", "runs-on": "ubuntu-22.04-arm" }, |
| 19 | + ] |
| 20 | + python-version: |
| 21 | + [[310, "3.10"], [311, "3.11"], [312, "3.12"], [313, "3.13"]] |
16 | 22 | steps: |
17 | | - - uses: actions/checkout@v4 |
| 23 | + - uses: actions/checkout@v5 |
18 | 24 |
|
19 | 25 | - name: Set python version |
20 | 26 | run: | |
@@ -66,83 +72,20 @@ jobs: |
66 | 72 |
|
67 | 73 | - uses: actions/upload-artifact@v4 |
68 | 74 | with: |
69 | | - name: "ubuntu-latest-${{ matrix.python-version[1] }}" |
70 | | - path: connectorx-python/target/wheels/*.whl |
71 | | - |
72 | | - linux-aarch: |
73 | | - runs-on: ubuntu-22.04-arm |
74 | | - strategy: |
75 | | - matrix: |
76 | | - python-version: ["3.10", "3.11", "3.12", "3.13"] |
77 | | - steps: |
78 | | - - name: Checkout Repository |
79 | | - uses: actions/checkout@v4 |
80 | | - |
81 | | - # Check architecture of the target machine |
82 | | - - name: Check Target Architecture |
83 | | - run: | |
84 | | - echo "Architecture: $(uname -m)" |
85 | | - if [[ $(uname -m) != "aarch64" ]]; then |
86 | | - echo "Error: This workflow requires ARM architecture (aarch64)." |
87 | | - exit 1 |
88 | | - fi |
89 | | -
|
90 | | - - name: Setup Python |
91 | | - uses: actions/setup-python@v5 |
92 | | - with: |
93 | | - python-version: ${{ matrix.python-version }} |
94 | | - |
95 | | - - name: Setup Rust |
96 | | - uses: actions-rs/toolchain@v1 |
97 | | - with: |
98 | | - toolchain: stable |
99 | | - components: rustfmt |
100 | | - target: aarch64-unknown-linux-gnu |
101 | | - default: true |
102 | | - |
103 | | - - name: Setup Just |
104 | | - uses: extractions/setup-just@v3 |
105 | | - env: |
106 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
107 | | - |
108 | | - - name: Install Tools |
109 | | - run: | |
110 | | - sudo apt-get update -y |
111 | | - sudo apt-get install -y mysql-client libpq-dev freetds-dev krb5-locales clang libkrb5-dev build-essential gcc musl-tools libsasl2-modules-gssapi-mit libgssapi-krb5-2 krb5-user |
112 | | - - name: Setup Poetry |
113 | | - uses: Gr1N/setup-poetry@v9 |
114 | | - |
115 | | - - name: Setup Project |
116 | | - run: | |
117 | | - just bootstrap-python |
118 | | - python -m pip install --upgrade pip |
119 | | - pip install maturin |
120 | | -
|
121 | | - - name: Build Wheel (Native) |
122 | | - run: | |
123 | | - maturin build -m connectorx-python/Cargo.toml --target aarch64-unknown-linux-gnu -i python${{ matrix.python-version }} --release |
124 | | - env: |
125 | | - SQLITE3_STATIC: 1 |
126 | | - KRB5_INCLUDE_DIR: /usr/include |
127 | | - KRB5_LIB_DIR: /usr/lib/aarch64-linux-gnu |
128 | | - |
129 | | - - name: Upload Artifact |
130 | | - uses: actions/upload-artifact@v4 |
131 | | - with: |
132 | | - name: "linux-arm-${{ matrix.python-version }}" |
| 75 | + name: "linux-${{matrix.platform.arch}}-${{ matrix.python-version[1] }}" |
133 | 76 | path: connectorx-python/target/wheels/*.whl |
134 | 77 |
|
135 | 78 | win-and-mac: |
136 | 79 | runs-on: ${{ matrix.os }} |
137 | 80 | strategy: |
138 | 81 | matrix: |
139 | | - os: ["windows-latest", "macos-13"] |
| 82 | + os: ["windows-latest", "macos-15-intel"] |
140 | 83 | python-version: ["3.10", "3.11", "3.12", "3.13"] |
141 | 84 | include: |
142 | | - - os: "macos-13" |
| 85 | + - os: "macos-15-intel" |
143 | 86 | features: "--features integrated-auth-gssapi" |
144 | 87 | steps: |
145 | | - - uses: actions/checkout@v4 |
| 88 | + - uses: actions/checkout@v5 |
146 | 89 |
|
147 | 90 | - uses: ankane/setup-mysql@v1 |
148 | 91 | with: |
@@ -189,7 +132,7 @@ jobs: |
189 | 132 | matrix: |
190 | 133 | python-version: ["3.10", "3.11", "3.12", "3.13"] |
191 | 134 | steps: |
192 | | - - uses: actions/checkout@v4 |
| 135 | + - uses: actions/checkout@v5 |
193 | 136 |
|
194 | 137 | - uses: ankane/setup-mysql@v1 |
195 | 138 | with: |
@@ -236,86 +179,43 @@ jobs: |
236 | 179 | strategy: |
237 | 180 | matrix: |
238 | 181 | python-version: ["3.10", "3.11", "3.12", "3.13"] |
239 | | - os: [macos-13, ubuntu-latest, windows-latest] |
240 | | - steps: |
241 | | - - uses: actions/checkout@v4 |
242 | | - |
243 | | - - uses: actions/setup-python@v5 |
244 | | - with: |
245 | | - python-version: ${{ matrix.python-version }} |
246 | | - architecture: x64 |
247 | | - |
248 | | - - uses: actions/download-artifact@v4 |
249 | | - with: |
250 | | - name: "${{ matrix.os }}-${{ matrix.python-version }}" |
251 | | - |
252 | | - - run: | |
253 | | - pip install *.whl |
254 | | - python -c "import connectorx" |
255 | | -
|
256 | | - verify-apple-arm: |
257 | | - runs-on: ${{ matrix.os }} |
258 | | - needs: [apple-arm] |
259 | | - strategy: |
260 | | - matrix: |
261 | | - python-version: ["3.10", "3.11", "3.12", "3.13"] |
262 | | - os: [macos-latest] |
| 182 | + os: |
| 183 | + [ |
| 184 | + macos-15-intel, |
| 185 | + ubuntu-latest, |
| 186 | + windows-latest, |
| 187 | + ubuntu-22.04-arm, |
| 188 | + macos-latest, |
| 189 | + ] |
| 190 | + include: |
| 191 | + # override artifact-prefix for linux variants |
| 192 | + - os: "ubuntu-latest" |
| 193 | + artifact-prefix: "linux-x86_64" |
| 194 | + - os: "ubuntu-22.04-arm" |
| 195 | + artifact-prefix: "linux-aarch64" |
| 196 | + - os: "macos-latest" |
| 197 | + artifact-prefix: "macos-arm" |
263 | 198 | steps: |
264 | | - - uses: actions/checkout@v4 |
| 199 | + - uses: actions/checkout@v5 |
265 | 200 |
|
266 | 201 | - uses: actions/setup-python@v5 |
267 | 202 | with: |
268 | 203 | python-version: ${{ matrix.python-version }} |
269 | 204 |
|
270 | | - - uses: actions/download-artifact@v4 |
| 205 | + - uses: actions/download-artifact@v5 |
271 | 206 | with: |
272 | | - name: "macos-arm-${{ matrix.python-version }}" |
| 207 | + name: "${{ matrix.artifact-prefix || matrix.os }}-${{ matrix.python-version }}" |
273 | 208 |
|
274 | 209 | - run: | |
275 | 210 | pip install *.whl |
276 | 211 | python -c "import connectorx" |
277 | 212 |
|
278 | | - verify-linux-arm: |
279 | | - runs-on: ubuntu-22.04-arm |
280 | | - needs: [linux-aarch] |
281 | | - strategy: |
282 | | - matrix: |
283 | | - python-version: ["3.10", "3.11", "3.12", "3.13"] |
284 | | - steps: |
285 | | - - name: Checkout Repository |
286 | | - uses: actions/checkout@v4 |
287 | | - |
288 | | - # Check architecture of the target machine |
289 | | - - name: Check Target Architecture |
290 | | - run: | |
291 | | - echo "Architecture: $(uname -m)" |
292 | | - if [[ $(uname -m) != "aarch64" ]]; then |
293 | | - echo "Error: This workflow requires ARM architecture (aarch64)." |
294 | | - exit 1 |
295 | | - fi |
296 | | -
|
297 | | - - name: Setup Python |
298 | | - uses: actions/setup-python@v5 |
299 | | - with: |
300 | | - python-version: ${{ matrix.python-version }} |
301 | | - |
302 | | - - name: Download Artifact |
303 | | - uses: actions/download-artifact@v4 |
304 | | - with: |
305 | | - name: "linux-arm-${{ matrix.python-version }}" |
306 | | - |
307 | | - - name: Install and Test |
308 | | - run: | |
309 | | - python -m pip install --upgrade pip |
310 | | - pip install *.whl |
311 | | - python -c 'import connectorx' |
312 | | -
|
313 | 213 | upload: |
314 | 214 | runs-on: ubuntu-latest |
315 | | - needs: [verify, verify-apple-arm, verify-linux-arm] |
| 215 | + needs: [verify] |
316 | 216 | steps: |
317 | 217 | - name: Download all artifacts |
318 | | - uses: actions/download-artifact@v4 |
| 218 | + uses: actions/download-artifact@v5 |
319 | 219 |
|
320 | 220 | - name: Setup environment |
321 | 221 | run: | |
|
0 commit comments