Skip to content

Commit 86b8a40

Browse files
committed
Add build matrix for Linux and macOS workflows
Introduce a strategy matrix (arch: x64, arm64) and use matrix.runner for runs-on. Add arch-specific runners for arm64 builds and tag uploaded artifacts with platform and arch (e.g. qemu-system-arm-linux-x64, pc-bios-linux-arm64, qemu-system-arm-macos-arm64)
1 parent a0da0db commit 86b8a40

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

.github/workflows/build-linux.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ on:
44
- master
55
jobs:
66
build:
7-
runs-on: ubuntu-22.04
7+
strategy:
8+
matrix:
9+
arch: [x64, arm64]
10+
include:
11+
- arch: x64
12+
runner: ubuntu-22.04
13+
- arch: arm64
14+
runner: ubuntu-22.04-arm64
15+
runs-on: ${{ matrix.runner }}
816
steps:
917
- uses: actions/checkout@v4
1018
with:
@@ -38,9 +46,9 @@ jobs:
3846
- run: make
3947
- uses: actions/upload-artifact@v4
4048
with:
41-
name: qemu-system-arm
49+
name: qemu-system-arm-linux-${{ matrix.arch }}
4250
path: arm-softmmu/qemu-system-arm
4351
- uses: actions/upload-artifact@v4
4452
with:
45-
name: pc-bios
53+
name: pc-bios-linux-${{ matrix.arch }}
4654
path: pc-bios/

.github/workflows/build-mac.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,15 @@ on:
44
- master
55
jobs:
66
build:
7-
runs-on: macos-15-intel
7+
strategy:
8+
matrix:
9+
arch: [x64, arm64]
10+
include:
11+
- arch: x64
12+
runner: macos-15-intel
13+
- arch: arm64
14+
runner: macos-15
15+
runs-on: ${{ matrix.runner }}
816
steps:
917
- uses: actions/checkout@v4
1018
with:
@@ -49,9 +57,9 @@ jobs:
4957
cp $(brew --prefix pcre2)/lib/libpcre2-8.0.dylib lib/
5058
- uses: actions/upload-artifact@v4
5159
with:
52-
name: qemu-system-arm
60+
name: qemu-system-arm-macos-${{ matrix.arch }}
5361
path: arm-softmmu/qemu-system-arm
5462
- uses: actions/upload-artifact@v4
5563
with:
56-
name: lib
64+
name: lib-macos-${{ matrix.arch }}
5765
path: lib/

0 commit comments

Comments
 (0)