Skip to content

Commit f2618af

Browse files
Build multi arch packages on native GitHub runners
Like how we build images on native runners, this change builds packages (dep, rpm, tarballs) on native runners. Signed-off-by: Rajath Agasthya <[email protected]>
1 parent 13adb3e commit f2618af

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ on:
2020
branches:
2121
- main
2222
- release-*
23+
- "pull-request/[0-9]+"
2324

2425
jobs:
2526
packages:
26-
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29+
arch:
30+
- amd64
31+
- arm64
2932
package:
3033
- deb
3134
- rpm
3235
- tarball
3336
ispr:
3437
- ${{github.event_name == 'pull_request'}}
3538
fail-fast: false
39+
runs-on: linux-${{ matrix.arch }}-cpu4
3640
steps:
3741
- uses: actions/checkout@v5
3842
name: Check out code
@@ -43,10 +47,10 @@ jobs:
4347
run: |
4448
sudo apt-get install -y coreutils build-essential sed git bash make
4549
echo "Building packages"
46-
make -f deployments/systemd/packages/Makefile ${{ matrix.package }}
50+
make -f deployments/systemd/packages/Makefile ${{ matrix.package }}-${{ matrix.arch }}
4751
- name: 'Upload Artifacts'
4852
uses: actions/upload-artifact@v4
4953
with:
5054
compression-level: 0
51-
name: mig-parted-${{ matrix.package }}-${{ github.run_id }}
55+
name: mig-parted-${{ matrix.package }}-${{ matrix.arch }}-${{ github.run_id }}
5256
path: ${{ github.workspace }}/dist/*

.github/workflows/image.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323
- release-*
2424

2525
jobs:
26-
build:
26+
image:
2727
strategy:
2828
matrix:
2929
arch:
@@ -76,7 +76,7 @@ jobs:
7676
make -f deployments/container/Makefile build
7777
7878
create-manifest:
79-
needs: [ build ]
79+
needs: [ image ]
8080
runs-on: ubuntu-latest
8181
steps:
8282
- uses: actions/checkout@v5

deployments/systemd/packages/Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ tarball-%: DOCKERFILE = $(CURDIR)/deployments/systemd/packages/Dockerfile.tarbal
4848
##### Public rules #####
4949

5050
TARGETS = tarball deb rpm
51-
$(TARGETS): %: %-amd64 %-arm64
5251

5352
AMD64_TARGETS = $(patsubst %,%-amd64,$(TARGETS))
5453
ARM64_TARGETS = $(patsubst %,%-arm64,$(TARGETS))
5554

56-
5755
$(AMD64_TARGETS): ARCH = amd64
5856
$(ARM64_TARGETS): ARCH = arm64
5957

@@ -65,7 +63,6 @@ all: $(VALID_TARGETS)
6563
$(VALID_TARGETS): %:
6664
@echo "Building for $(TARGET_PLATFORM)"
6765
docker pull --platform=linux/$(ARCH) $(BASE_IMAGE)
68-
DOCKER_BUILDKIT=1 \
6966
$(DOCKER) build --pull \
7067
--platform=linux/$(ARCH) \
7168
--build-arg BASE_IMAGE=$(BASE_IMAGE) \

0 commit comments

Comments
 (0)