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 a118f5b commit bb743ac
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 32 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,34 @@ concurrency:
cancel-in-progress: true

jobs:
build_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.matrix.outputs.matrix }}
steps:
- id: matrix
run: |
JSON=$(cat << EOF | jq -c '[foreach .[] as $platform (0; foreach $platform.policies.[] as $policy (0; {policy: $policy, platform: $platform.platform, runner: $platform.runner}))]'
[
{"platform": "x86_64", "runner": "ubuntu-22.04", "policies": ["manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2"]},
{"platform": "aarch64", "runner": "ubuntu-22.04", "policies": ["manylinux2014", "manylinux_2_28", "manylinux_2_34", "musllinux_1_2"]},
{"platform": "i686", "runner": "ubuntu-22.04", "policies": ["manylinux2014", "musllinux_1_2"]},
{"platform": "armv7l", "runner": "ubuntu-22.04", "policies": ["manylinux_2_31", "musllinux_1_2"]}
]
EOF
)
echo "matrix=${JSON}" >> $GITHUB_OUTPUT
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 bb743ac

Please sign in to comment.