Skip to content

Commit 4cad33b

Browse files
committed
Move matrix to compile workflow
1 parent 3174d75 commit 4cad33b

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,4 @@ on:
88

99
jobs:
1010
build:
11-
strategy:
12-
fail-fast: false
13-
matrix:
14-
platform: [atari, apple2, adam, coco, c64, rs232]
15-
1611
uses: ./.github/workflows/compile.yml
17-
with:
18-
platform: ${{ matrix.platform }}

.github/workflows/compile.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
name: Compile (Reusable)
22

33
on:
4-
worksflow_call:
4+
workflow_call:
55
inputs:
66
platform:
7-
description: "Target platform (atari, coco, apple2, adam, c64, rs232)"
8-
required: true
9-
type: string
7+
description: "Optional single platform to build"
8+
required: false
9+
type: string
1010

1111
jobs:
1212
compile:
1313
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
# If 'platform' input is empty, build all of these
19+
platform: ${{ fromJSON(inputs.platform) || '["atari","apple2","adam","coco","c64","rs232"]' }}
20+
1421
steps:
15-
- name: Checkout source
16-
uses: actions/checkout@v4
22+
- uses: actions/checkout@v4
1723

18-
- name: Compile with defoogi
24+
- name: Build inside Docker
1925
run: |
20-
docker run --rm \
21-
-v ${{ github.workspace }}:/workspace \
22-
fozztexx/defoogi:latest \
23-
make -f Makefile.${{ inputs.platform }
26+
docker run --rm \
27+
-v ${{ github.workspace }}:/workspace \
28+
fozztexx/defoogi:latest \
29+
make -f Makefile.${{ matrix.platform }

0 commit comments

Comments
 (0)