Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try multiarch builds #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ on:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
build_manylinux:
name: ${{ matrix.policy }}_${{ matrix.platform }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 1380
permissions:
actions: write # this permission is needed to delete cache
packages: write
Expand All @@ -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 }}
Expand All @@ -56,6 +60,7 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
image: ghcr.io/karellen/binfmt:qemu-v9.0.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
38 changes: 30 additions & 8 deletions build.yml.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 7364c19..0ab1ce1 100644
index 7364c19..c05e850 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:
Expand All @@ -20,13 +20,17 @@ 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:
runs-on: ubuntu-22.04
@@ -30,17 +20,23 @@ concurrency:
jobs:
build_manylinux:
name: ${{ matrix.policy }}_${{ matrix.platform }}
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-latest
+ timeout-minutes: 1380
permissions:
actions: write # this permission is needed to delete cache
+ packages: write
Expand All @@ -35,7 +39,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,12 +48,19 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 50
Expand All @@ -48,7 +63,14 @@ index 7364c19..0ab1ce1 100644

- name: Set up emulation
if: matrix.platform != 'i686' && matrix.platform != 'x86_64'
@@ -66,33 +64,38 @@ jobs:
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
+ image: tonistiigi/binfmt:qemu-v8.1.5

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -66,33 +69,38 @@ jobs:
if: github.event_name != 'workflow_dispatch' || fromJSON(github.event.inputs.useCache)
uses: actions/cache/restore@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions patch_build_yml.sh
Original file line number Diff line number Diff line change
@@ -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

Loading