Skip to content

Commit ceac3e9

Browse files
authored
Add ARM runners to the CI (#153)
* Add ARM runners to the CI * Use updated codebuild runner syntax * Use custom project name variable --------- Co-authored-by: Simon Beal <[email protected]>
1 parent 9c8cb2d commit ceac3e9

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

.github/workflows/wheels.yml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,22 @@ jobs:
1818
uses: ./.github/workflows/generate_third_party_licenses.yml
1919

2020
build_wheels:
21-
name: Build wheels for ${{ matrix.build_target }}
22-
runs-on: ubuntu-20.04
21+
name: Build wheels for ${{ matrix.build_prefix }} - ${{ matrix.builder.arch }}
22+
runs-on: ${{ matrix.builder.runner }}
2323
needs: generate_third_party_licenses
2424
strategy:
2525
matrix:
26-
build_target:
27-
- cp38-manylinux_x86_64
28-
- cp39-manylinux_x86_64
29-
- cp310-manylinux_x86_64
30-
- cp311-manylinux_x86_64
31-
- cp312-manylinux_x86_64
26+
build_prefix:
27+
- cp38
28+
- cp39
29+
- cp310
30+
- cp311
31+
- cp312
32+
builder:
33+
- runner: codebuild-${{ vars.CODEBUILD_PROJECT_NAME }}-ubuntu-7.0-large
34+
arch: x86_64
35+
- runner: codebuild-${{ vars.CODEBUILD_PROJECT_NAME }}-arm-3.0-large
36+
arch: aarch64
3237
permissions:
3338
id-token: write
3439
contents: read
@@ -54,12 +59,27 @@ jobs:
5459
run: |
5560
mv NOTICE_DEFAULT THIRD-PARTY-LICENSES
5661
57-
- name: Build wheels for s3torchconnectorclient
58-
uses: pypa/[email protected]
59-
env:
60-
CIBW_BUILD: ${{ matrix.build_target }}
62+
# actions/setup-python doesn't yet support ARM
63+
# https://github.com/actions/setup-python/issues/678
64+
- if: ${{ matrix.builder.arch != 'aarch64' }}
65+
uses: actions/setup-python@v4
6166
with:
62-
package-dir: s3torchconnectorclient
67+
python-version: "3.11"
68+
69+
- name: Install pipx
70+
run: |
71+
python -m pip install --upgrade pipx
72+
73+
# Run cibuildwheel manually, as the current runner uses setup-python
74+
# https://github.com/pypa/cibuildwheel/issues/1623
75+
- run: >
76+
python -m pipx run
77+
cibuildwheel
78+
"s3torchconnectorclient"
79+
--output-dir "wheelhouse"
80+
--only "${{ matrix.build_prefix }}-manylinux_${{ matrix.builder.arch }}"
81+
2>&1
82+
shell: bash
6383
6484
- uses: actions/upload-artifact@v3
6585
with:

0 commit comments

Comments
 (0)