Skip to content

Commit

Permalink
CI: build ARM platforms on GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Nov 24, 2024
1 parent 4707fb1 commit 84b132c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 32 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,38 @@ concurrency:
cancel-in-progress: true

jobs:
build_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- id: matrix
name: build matrix
shell: python
run: |
import os
import json
reduced = [
("x86_64", "ubuntu-22.04", ("manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2")),
("aarch64", "ubuntu-22.04", ("manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2")),
("i686", "ubuntu-22.04", ("manylinux2014", "musllinux_1_2")),
("armv7l", "ubuntu-22.04", ("manylinux_2_31", "musllinux_1_2")),
]
expanded = [{"policy": policy, "platform": platform, "runner": runner} for platform, runner, policies in reduced for policy in policies]
print(json.dumps(expanded, indent=2))
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
f.write(f"matrix={json.dumps(expanded)}")
build_manylinux:
name: ${{ matrix.policy }}_${{ matrix.platform }}
runs-on: ubuntu-22.04
needs: build_matrix
runs-on: ${{ matrix.runner }}
permissions:
actions: write # this permission is needed to delete cache
strategy:
fail-fast: false
matrix:
policy: ["manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2"]
platform: ["x86_64"]
include:
- policy: "manylinux2014"
platform: "i686"
- policy: "musllinux_1_2"
platform: "i686"
include: ${{ fromJson(needs.build_matrix.outputs.matrix) }}
env:
POLICY: ${{ matrix.policy }}
PLATFORM: ${{ matrix.platform }}
Expand Down
24 changes: 0 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,18 @@ env:

jobs:
include:
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux2014" PLATFORM="aarch64"
- arch: s390x
env: POLICY="manylinux2014" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux2014" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux_2_28" PLATFORM="aarch64"
- arch: s390x
env: POLICY="manylinux_2_28" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux_2_28" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux_2_31" PLATFORM="armv7l"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="manylinux_2_34" PLATFORM="aarch64"
- arch: s390x
env: POLICY="manylinux_2_34" PLATFORM="s390x"
- arch: ppc64le
env: POLICY="manylinux_2_34" PLATFORM="ppc64le"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="musllinux_1_2" PLATFORM="aarch64"
- arch: arm64-graviton2
virt: vm
group: edge
env: POLICY="musllinux_1_2" PLATFORM="armv7l"
- arch: s390x
env: POLICY="musllinux_1_2" PLATFORM="s390x"
- arch: ppc64le
Expand Down

0 comments on commit 84b132c

Please sign in to comment.