Skip to content

Commit

Permalink
build all test roms using matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
c-sp committed Dec 30, 2023
1 parent f2ff061 commit 8986840
Showing 1 changed file with 43 additions and 284 deletions.
327 changes: 43 additions & 284 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ name: build and release
on: push

env:
ARTIFACTS_NAME: job-artifacts
ARTIFACTS_PATH: artifacts
ZIP_ARTIFACT_NAME: game-boy-test-roms.zip
RGBDS_ARTIFACT_NAME: artifact-tools-rgbds
WLADX_ARTIFACT_NAME: artifact-tools-wla-dx

jobs:
# make the tools required for some build jobs
Expand All @@ -16,314 +13,76 @@ jobs:
strategy:
fail-fast: false
matrix:
tool: [rgbds, wla-dx]
tool: [ rgbds, wla-dx ]
steps:
- uses: actions/checkout@v4
- run: src/assemble.sh ${{ matrix.tool }}
- run: |
ls ${{ env.ARTIFACTS_PATH }} -lsah
src/assemble.sh ${{ matrix.tool }}
ls ${{ env.ARTIFACTS_PATH }} -lsah
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}-${{ matrix.tool }}
path: ${{ env.ARTIFACTS_PATH }}

# build test roms using the tools created above

# build test roms (no tools required)
test-roms-no-tools:
test-roms:
runs-on: ubuntu-latest
needs: [ tools ]
strategy:
fail-fast: false
matrix:
suite: [blargg-roms, gambatte-roms, mooneye-test-suite-wilbertpol, rtc3test]
suite:
- age-test-roms
- bully
- cgb-acid-hell
- cgb-acid2
- dmg-acid2
- gbmicrotest
- little-things-gb
- mealybug-tearoom-tests
- mooneye-test-suite
- same-suite
- strikethrough
steps:
- uses: actions/checkout@v4
- run: src/assemble.sh ${{ matrix.suite }}
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}-${{ matrix.suite }}
path: ${{ env.ARTIFACTS_PATH }}


bully:
name: build bully.gb
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build bully.gb
run: src/assemble.sh bully

- name: upload bully.gb artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


age-test-roms:
name: build age-test-roms
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build age-test-roms
run: src/assemble.sh age-test-roms

- name: upload age-test-roms artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


dmg-acid2:
name: build dmg-acid2 test rom
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build dmg-acid2 test rom
run: src/assemble.sh dmg-acid2

- name: upload dmg-acid2 artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


cgb-acid2:
name: build cgb-acid2 test rom
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build cgb-acid2 test rom
run: src/assemble.sh cgb-acid2

- name: upload cgb-acid2 artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


cgb-acid-hell:
name: build cgb-acid-hell test rom
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build cgb-acid-hell test rom
run: src/assemble.sh cgb-acid-hell

- name: upload cgb-acid-hell artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


little-things-gb:
name: build (parts of) little-things-gb
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build (parts of) little-things-gb
run: src/assemble.sh little-things-gb

- name: upload little-things-gb artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


mealybug-tearoom-tests:
name: build mealybug-tearoom-tests
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build mealybug-tearoom-tests
run: src/assemble.sh mealybug-tearoom-tests

- name: upload mealybug-tearoom-tests artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


mooneye-test-suite:
name: build Mooneye Test Suite
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
- uses: actions/download-artifact@v4
with:
name: ${{ env.WLADX_ARTIFACT_NAME }}
pattern: artifact-tools-*
path: ${{ env.ARTIFACTS_PATH }}

- name: assemble Mooneye Test Suite
run: src/assemble.sh mooneye-test-suite

- name: upload Mooneye Test Suite artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


gbmicrotest:
name: build GBMicrotest
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.WLADX_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: assemble GBMicrotest
run: src/assemble.sh gbmicrotest

- name: upload GBMicrotest artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
path: ${{ env.ARTIFACTS_PATH }}


same-suite:
name: build same-suite
runs-on: ubuntu-latest
needs: [ tools ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build same-suite
run: src/assemble.sh same-suite

- name: upload same-suite artifact
uses: actions/upload-artifact@v4
merge-multiple: true
- run: |
ls ${{ env.ARTIFACTS_PATH }} -lsah
src/assemble.sh ${{ matrix.suite }}
ls ${{ env.ARTIFACTS_PATH }} -lsah
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
name: artifact-${{ github.job }}-${{ matrix.suite }}
path: ${{ env.ARTIFACTS_PATH }}


strikethrough:
name: build strikethrough.gb
# build test roms (no tools required)
test-roms-no-tools:
runs-on: ubuntu-latest
needs: [ tools ]
strategy:
fail-fast: false
matrix:
suite: [ blargg-roms, gambatte-roms, mooneye-test-suite-wilbertpol, rtc3test ]
steps:
- name: checkout code
uses: actions/checkout@v4

- name: download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.RGBDS_ARTIFACT_NAME }}
path: ${{ env.ARTIFACTS_PATH }}

- name: build strikethrough.gb
run: src/assemble.sh strikethrough

- name: upload strikethrough.gb artifact
uses: actions/upload-artifact@v4
- uses: actions/checkout@v4
- run: |
ls ${{ env.ARTIFACTS_PATH }} -lsah
src/assemble.sh ${{ matrix.suite }}
ls ${{ env.ARTIFACTS_PATH }} -lsah
- uses: actions/upload-artifact@v4
with:
name: artifact-${{ github.job }}
name: artifact-${{ github.job }}-${{ matrix.suite }}
path: ${{ env.ARTIFACTS_PATH }}


# create a releasable zip
create-release-zip:
name: create release zip
runs-on: ubuntu-latest
needs: [
test-roms-no-tools,
age-test-roms,
bully,
cgb-acid2,
cgb-acid-hell,
dmg-acid2,
little-things-gb,
gbmicrotest,
mealybug-tearoom-tests,
mooneye-test-suite,
same-suite,
strikethrough
]
needs: [ test-roms, test-roms-no-tools ]
steps:
- name: checkout code
uses: actions/checkout@v4
Expand Down

0 comments on commit 8986840

Please sign in to comment.