Skip to content

Commit 599e83e

Browse files
committed
do not reapeat use matrix
1 parent aa0db87 commit 599e83e

1 file changed

Lines changed: 34 additions & 83 deletions

File tree

.github/workflows/build.yml

Lines changed: 34 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -69,95 +69,46 @@ jobs:
6969
python scripts/tester.py -vv --exe bin/binjgb-tester
7070
if: matrix.os != 'windows-latest'
7171

72-
build-wasm:
73-
name: build-wasm
72+
build-wasm-variants:
73+
name: build-${{ matrix.target }}
7474
runs-on: ubuntu-latest
75-
steps:
76-
- uses: actions/checkout@v4
77-
with:
78-
submodules: true
79-
80-
- name: install packages
81-
run: sudo apt-get install ninja-build
82-
83-
- name: setup cache
84-
uses: actions/cache@v4
85-
with:
86-
path: ${{env.EM_CACHE_FOLDER}}
87-
key: ${{env.EM_VERSION}}-${{ runner.os }}
88-
- name: emsdk install
89-
uses: mymindstorm/setup-emsdk@v14
90-
with:
91-
version: ${{env.EM_VERSION}}
92-
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
93-
94-
- name: mkdir
95-
run: mkdir -p out
96-
97-
- name: cmake
98-
run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWASM=true
99-
100-
- name: build
101-
run: emmake cmake --build out
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
target: [wasm, rgbds-live, gbstudio]
79+
include:
80+
- target: wasm
81+
cmake_flags: ""
82+
- target: rgbds-live
83+
cmake_flags: '-DWERROR=ON -DRGBDS_LIVE=ON -DCMAKE_C_FLAGS="-DBREAKPOINTS_MAX_BANKS_NUMBER=256"'
84+
- target: gbstudio
85+
cmake_flags: "-DWERROR=ON -DGBSTUDIO=ON"
10286

103-
build-rgbds-live:
104-
name: build-rgbds-live
105-
runs-on: ubuntu-latest
10687
steps:
107-
- uses: actions/checkout@v4
108-
with:
109-
submodules: true
88+
- uses: actions/checkout@v4
89+
with:
90+
submodules: true
11091

111-
- name: install packages
112-
run: sudo apt-get install ninja-build
92+
- name: install packages
93+
run: sudo apt-get install ninja-build
11394

114-
- name: setup cache
115-
uses: actions/cache@v4
116-
with:
117-
path: ${{env.EM_CACHE_FOLDER}}
118-
key: ${{env.EM_VERSION}}-${{ runner.os }}
119-
- name: emsdk install
120-
uses: mymindstorm/setup-emsdk@v14
121-
with:
122-
version: ${{env.EM_VERSION}}
123-
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
95+
- name: setup cache
96+
uses: actions/cache@v4
97+
with:
98+
path: ${{ env.EM_CACHE_FOLDER }}
99+
key: ${{ env.EM_VERSION }}-${{ runner.os }}
124100

125-
- name: mkdir
126-
run: mkdir -p out
101+
- name: emsdk install
102+
uses: mymindstorm/setup-emsdk@v14
103+
with:
104+
version: ${{ env.EM_VERSION }}
105+
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}
127106

128-
- name: cmake
129-
run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DWASM=true -DRGBDS_LIVE=ONs -DCMAKE_C_FLAGS="-DBREAKPOINTS_MAX_BANKS_NUMBER=256"
107+
- name: mkdir
108+
run: mkdir -p out
130109

131-
- name: build
132-
run: emmake cmake --build out
110+
- name: cmake
111+
run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWASM=true ${{ matrix.cmake_flags }}
133112

134-
build-gbstudio:
135-
name: build-gbstudio
136-
runs-on: ubuntu-latest
137-
steps:
138-
- uses: actions/checkout@v4
139-
with:
140-
submodules: true
141-
142-
- name: install packages
143-
run: sudo apt-get install ninja-build
144-
145-
- name: setup cache
146-
uses: actions/cache@v4
147-
with:
148-
path: ${{env.EM_CACHE_FOLDER}}
149-
key: ${{env.EM_VERSION}}-${{ runner.os }}
150-
- name: emsdk install
151-
uses: mymindstorm/setup-emsdk@v14
152-
with:
153-
version: ${{env.EM_VERSION}}
154-
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
155-
156-
- name: mkdir
157-
run: mkdir -p out
158-
159-
- name: cmake
160-
run: emcmake cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DWERROR=ON -DWASM=true -DGBSTUDIO=ON
161-
162-
- name: build
163-
run: emmake cmake --build out
113+
- name: build
114+
run: emmake cmake --build out

0 commit comments

Comments
 (0)