From a99d5f6bd4691565f4abbd30b2517ddaecd4733f Mon Sep 17 00:00:00 2001 From: Arcadiy Ivanov Date: Mon, 9 Sep 2024 20:52:31 -0400 Subject: [PATCH] Try multiarch builds --- .github/workflows/build.yml | 6 +++++- build.yml.patch | 27 ++++++++++++++++++++------- patch_build_yml.sh | 4 ++++ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ab1ce1..e9ea8d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,7 @@ on: branches: [master] pull_request: branches: [master] + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true @@ -20,6 +21,7 @@ jobs: build_manylinux: name: ${{ matrix.policy }}_${{ matrix.platform }} runs-on: ubuntu-22.04 + timeout-minutes: 1380 permissions: actions: write # this permission is needed to delete cache packages: write @@ -29,10 +31,12 @@ jobs: fail-fast: false matrix: policy: ["manylinux2014", "musllinux_1_1", "musllinux_1_2"] - platform: ["i686", "x86_64"] + platform: ["i686", "x86_64", "aarch64", "ppc64le", "s390x"] include: - policy: "manylinux_2_28" platform: "x86_64" + - policy: "manylinux_2_28" + platform: "aarch64" env: POLICY: ${{ matrix.policy }} diff --git a/build.yml.patch b/build.yml.patch index 4235613..4a16294 100644 --- a/build.yml.patch +++ b/build.yml.patch @@ -1,8 +1,8 @@ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml -index 7364c19..0ab1ce1 100644 +index 7364c19..e9ea8d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml -@@ -9,20 +9,9 @@ on: +@@ -9,19 +9,9 @@ on: required: false default: true push: @@ -20,13 +20,15 @@ index 7364c19..0ab1ce1 100644 - - "docker/**" - - "tests/**" - - "*.sh" -- + branches: [master] + concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true -@@ -33,6 +22,9 @@ jobs: +@@ -31,16 +21,22 @@ jobs: + build_manylinux: + name: ${{ matrix.policy }}_${{ matrix.platform }} runs-on: ubuntu-22.04 ++ timeout-minutes: 1380 permissions: actions: write # this permission is needed to delete cache + packages: write @@ -35,7 +37,18 @@ index 7364c19..0ab1ce1 100644 strategy: fail-fast: false matrix: -@@ -52,6 +44,12 @@ jobs: + policy: ["manylinux2014", "musllinux_1_1", "musllinux_1_2"] +- platform: ["i686", "x86_64"] ++ platform: ["i686", "x86_64", "aarch64", "ppc64le", "s390x"] + include: + - policy: "manylinux_2_28" + platform: "x86_64" ++ - policy: "manylinux_2_28" ++ platform: "aarch64" + + env: + POLICY: ${{ matrix.policy }} +@@ -52,6 +48,12 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 50 @@ -48,7 +61,7 @@ index 7364c19..0ab1ce1 100644 - name: Set up emulation if: matrix.platform != 'i686' && matrix.platform != 'x86_64' -@@ -66,33 +64,38 @@ jobs: +@@ -66,33 +68,38 @@ jobs: if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache) uses: actions/cache/restore@v4 with: diff --git a/patch_build_yml.sh b/patch_build_yml.sh index dd43001..3fdc4b0 100755 --- a/patch_build_yml.sh +++ b/patch_build_yml.sh @@ -1,5 +1,9 @@ #!/bin/bash -eEu +pushd manylinux +git restore .github/workflows/build.yml +popd + cp manylinux/.github/workflows/build.yml .github/workflows/build.yml patch -p1 < build.yml.patch