Skip to content

Commit dd450bd

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 dd450bd

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ on:
2323

2424
jobs:
2525
packages:
26-
runs-on: ubuntu-latest
2726
strategy:
2827
matrix:
28+
arch:
29+
- amd64
30+
- arm64
2931
package:
3032
- deb
3133
- rpm
3234
- tarball
3335
ispr:
3436
- ${{github.event_name == 'pull_request'}}
3537
fail-fast: false
38+
runs-on: linux-${{ matrix.arch }}-cpu4
3639
steps:
3740
- uses: actions/checkout@v5
3841
name: Check out code
@@ -43,10 +46,10 @@ jobs:
4346
run: |
4447
sudo apt-get install -y coreutils build-essential sed git bash make
4548
echo "Building packages"
46-
make -f deployments/systemd/packages/Makefile ${{ matrix.package }}
49+
make -f deployments/systemd/packages/Makefile ${{ matrix.package }}-${{ matrix.arch }}
4750
- name: 'Upload Artifacts'
4851
uses: actions/upload-artifact@v4
4952
with:
5053
compression-level: 0
51-
name: mig-parted-${{ matrix.package }}-${{ github.run_id }}
54+
name: mig-parted-${{ matrix.package }}-${{ matrix.arch }}-${{ github.run_id }}
5255
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)