From bb743ac0d76e38ef442fbd9e2202eabb8bff45da Mon Sep 17 00:00:00 2001 From: mayeut Date: Sun, 24 Nov 2024 14:59:09 +0100 Subject: [PATCH] CI: build ARM platforms on GHA --- .github/workflows/build.yml | 29 +++++++++++++++++++++-------- .travis.yml | 24 ------------------------ 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9cecb242..e9e63264 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 }} diff --git a/.travis.yml b/.travis.yml index 6e0e97c1..63c3f842 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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