From 1efae8ab2865d471dabd6ad42b760757ca84daf5 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 08:34:11 +0100 Subject: [PATCH 01/19] use artifact@v4 actions --- .github/workflows/build-and-release.yml | 101 ++++++++++++------------ 1 file changed, 50 insertions(+), 51 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index ac1a2b4..e23e694 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -6,8 +6,8 @@ env: ARTIFACTS_NAME: job-artifacts ARTIFACTS_PATH: artifacts ZIP_ARTIFACT_NAME: game-boy-test-roms.zip - RGBDS_ARTIFACT_NAME: rgbds - WLADX_ARTIFACT_NAME: wladx + RGBDS_ARTIFACT_NAME: artifact-rgbds + WLADX_ARTIFACT_NAME: artifact-wladx jobs: @@ -23,9 +23,9 @@ jobs: run: src/assemble.sh rgbds - name: upload RGBDS artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.RGBDS_ARTIFACT_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -40,9 +40,9 @@ jobs: run: src/assemble.sh wla-dx - name: upload WLA-DX artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.WLADX_ARTIFACT_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -57,9 +57,9 @@ jobs: run: src/assemble.sh blargg-roms - name: upload Blargg artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -81,9 +81,9 @@ jobs: run: src/assemble.sh bully - name: upload bully.gb artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -98,9 +98,9 @@ jobs: run: src/assemble.sh gambatte-roms - name: upload Gambatte artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -113,7 +113,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -122,9 +122,9 @@ jobs: run: src/assemble.sh age-test-roms - name: upload age-test-roms artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -137,7 +137,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -146,9 +146,9 @@ jobs: run: src/assemble.sh dmg-acid2 - name: upload dmg-acid2 artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -161,7 +161,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -170,9 +170,9 @@ jobs: run: src/assemble.sh cgb-acid2 - name: upload cgb-acid2 artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -185,7 +185,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -194,9 +194,9 @@ jobs: run: src/assemble.sh cgb-acid-hell - name: upload cgb-acid-hell artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -209,7 +209,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -218,9 +218,9 @@ jobs: run: src/assemble.sh little-things-gb - name: upload little-things-gb artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -233,7 +233,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -242,9 +242,9 @@ jobs: run: src/assemble.sh mealybug-tearoom-tests - name: upload mealybug-tearoom-tests artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -257,7 +257,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.WLADX_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -266,9 +266,9 @@ jobs: run: src/assemble.sh mooneye-test-suite - name: upload Mooneye Test Suite artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -281,7 +281,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.WLADX_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -290,9 +290,9 @@ jobs: run: src/assemble.sh gbmicrotest - name: upload GBMicrotest artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -307,9 +307,9 @@ jobs: run: src/assemble.sh mooneye-test-suite-wilbertpol - name: upload Mooneye Test Suite (wilbertpol) artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -324,9 +324,9 @@ jobs: run: src/assemble.sh rtc3test - name: upload rtc3test artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -339,7 +339,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -348,9 +348,9 @@ jobs: run: src/assemble.sh same-suite - name: upload same-suite artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -363,7 +363,7 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.RGBDS_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }} @@ -372,9 +372,9 @@ jobs: run: src/assemble.sh strikethrough - name: upload strikethrough.gb artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} + name: artifact-${{ github.job }} path: ${{ env.ARTIFACTS_PATH }} @@ -403,16 +403,15 @@ jobs: uses: actions/checkout@v4 - name: download artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: ${{ env.ARTIFACTS_NAME }} path: ${{ env.ARTIFACTS_PATH }} - name: zip artifacts run: src/assemble.sh release-zip $ZIP_ARTIFACT_NAME - name: upload zipped artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.ZIP_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }}/${{ env.ZIP_ARTIFACT_NAME }} @@ -437,7 +436,7 @@ jobs: if: startsWith( github.ref, 'refs/tags/v' ) steps: - name: download zipped artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.ZIP_ARTIFACT_NAME }} path: ./ From 707f4a51c91e9795d0bdcae97a9bfa9654e6c714 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 08:36:06 +0100 Subject: [PATCH 02/19] fix referenced wla-dx artifact name --- .github/workflows/build-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index e23e694..62a9abc 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -7,7 +7,7 @@ env: ARTIFACTS_PATH: artifacts ZIP_ARTIFACT_NAME: game-boy-test-roms.zip RGBDS_ARTIFACT_NAME: artifact-rgbds - WLADX_ARTIFACT_NAME: artifact-wladx + WLADX_ARTIFACT_NAME: artifact-wla-dx jobs: From 390a6c4fa0b6a7ed003f8fd0ca02ffb619de6af0 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:18:34 +0100 Subject: [PATCH 03/19] no manual compression, minor fixes --- src/assemble.sh | 136 +++++++++++++++++++----------------------------- 1 file changed, 54 insertions(+), 82 deletions(-) diff --git a/src/assemble.sh b/src/assemble.sh index e51f35b..3fcccd9 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -40,6 +40,13 @@ print_usage_and_exit() exit 1 } +print_cmd_title() +{ + echo "---------------------------------------------------------" + echo "$CMD" + echo "---------------------------------------------------------" +} + mkdir_artifact() { if [ -z "$1" ]; then @@ -58,34 +65,6 @@ mkdir_artifact() echo "$ART_DIR" } -tar_rm_artifact() -{ - ARTIFACT_NAME=$1 - if [ -z "$ARTIFACT_NAME" ]; then - echo "artifact name not specified" - exit 1 - fi - ART_DIR="$ARTIFACTS_DIR/$ARTIFACT_NAME" - - # tar artifact - cd "$ARTIFACTS_DIR" - tar -czf "$ARTIFACT_NAME.tar.gz" "$ARTIFACT_NAME" - - # remove untar'd artifact files as they - # should not be uploaded - rm -rf "$ARTIFACT_NAME" -} - -untar_all_artifacts() -{ - # untar and remove all tar files in the current directory - for f in *.tar*; do - if [ -f "$f" ]; then - tar -xvf "$f" && rm "$f" - fi - done -} - ############################################################################### @@ -96,9 +75,8 @@ untar_all_artifacts() build_age_test_roms() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=age-test-roms @@ -122,13 +100,14 @@ build_age_test_roms() rm -rf "$ARTIFACT/_in-progress" cp "$SRC_DIR/howto/age-test-roms.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_blargg() { + print_cmd_title + ARTIFACT_NAME=blargg ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME) @@ -144,16 +123,14 @@ build_blargg() rsync -am ./ "$ARTIFACT" cp "$SRC_DIR/howto/blargg.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_bully() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=bully @@ -171,16 +148,14 @@ build_bully() cp bully-expected/bully.png "$ARTIFACT" cp "$SRC_DIR/howto/bully.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_cgb_acid2() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=cgb-acid2 @@ -199,16 +174,14 @@ build_cgb_acid2() cp img/reference.png "$ARTIFACT/cgb-acid2.png" cp "$SRC_DIR/howto/cgb-acid2.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_cgb_acid_hell() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=cgb-acid-hell @@ -232,16 +205,14 @@ build_cgb_acid_hell() cp img/reference.png "$ARTIFACT/cgb-acid-hell.png" cp "$SRC_DIR/howto/cgb-acid-hell.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_dmg_acid2() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=dmg-acid2 @@ -261,13 +232,14 @@ build_dmg_acid2() cp img/reference-dmg.png "$ARTIFACT/dmg-acid2-dmg.png" cp "$SRC_DIR/howto/dmg-acid2.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_gambatte_hwtests() { + print_cmd_title + ARTIFACT_NAME=gambatte ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME) @@ -287,16 +259,14 @@ build_gambatte_hwtests() cp README "$ARTIFACT" cp "$SRC_DIR/howto/gambatte.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_gbmicrotest() { - # extract WLA-DX artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=gbmicrotest @@ -313,16 +283,14 @@ build_gbmicrotest() cp bin/* "$ARTIFACT" cp "$SRC_DIR/howto/gbmicrotest.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_little_things_gb() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=little-things-gb @@ -344,16 +312,14 @@ build_little_things_gb() cp little-things-gb-expected/*.png "$ARTIFACT" cp "$SRC_DIR/howto/little-things-gb.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_mealybug_tearoom_tests() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=mealybug-tearoom-tests @@ -405,16 +371,14 @@ build_mealybug_tearoom_tests() rm "$ARTIFACT/ppu/m3_wx_6_change_cgb_d.png" cp "$SRC_DIR/howto/mealybug-tearoom-tests.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_mooneye_test_suite() { - # extract WLA-DX artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=mooneye-test-suite @@ -436,20 +400,31 @@ build_mooneye_test_suite() rm -f "$ARTIFACT/manual-only/sprite_priority-expected.png" cp "$SRC_DIR/howto/mooneye-test-suite.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_mooneye_test_suite_wilbertpol() { + print_cmd_title + # we need WLA-DX v9.6 for compatibility reasons REPO_WLA_DX=$(mktemp -d) + echo "building wla-dx 9.6 in $REPO_WLA_DX" cd "$REPO_WLA_DX" git clone https://github.com/vhelin/wla-dx.git . git checkout v9.6 + + # stack.c is encoded as iso-8859-1, we convert it to utf-8 to prevent possible compiler errors + echo "converting stack.c to utf-8" + iconv -f iso-8859-1 -t utf-8 stack.c > stack-utf8.c + mv stack-utf8.c stack.c + + # compile WLA-DX v9.6 ./unix.sh 8 + PATH="$REPO_WLA_DX/binaries:$PATH" + echo "path is $PATH" ARTIFACT_NAME=mooneye-test-suite-wilbertpol ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME) @@ -471,13 +446,14 @@ build_mooneye_test_suite_wilbertpol() rm -f "$ARTIFACT/manual-only/sprite_priority-expected.png" cp "$SRC_DIR/howto/mooneye-test-suite-wilbertpol.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_release_zip() { + print_cmd_title + ZIP_FILE=$1 if [ -z "$ZIP_FILE" ]; then print_usage_and_exit @@ -491,7 +467,6 @@ build_release_zip() rm -rf "$ZIP_FILE" # create new zip file - untar_all_artifacts rm -rf rgbds wla-dx zip -r "$ZIP_FILE" . } @@ -500,6 +475,8 @@ build_release_zip() build_rgbds() { + print_cmd_title + ARTIFACT_NAME=rgbds ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME) @@ -517,14 +494,14 @@ build_rgbds() cmake --build build cp build/src/rgbasm build/src/rgbfix build/src/rgbgfx build/src/rgblink "$ARTIFACT" - - tar_rm_artifact $ARTIFACT_NAME } build_rtc3test() { + print_cmd_title + # use RGBDS 0.4 as rtc3test is not compatible to RGBDS 0.5 # (RGBDS 0.5 "PRINT" macro vs. rtc3test "Print:" label) REPO_RGBDS=$(mktemp -d) @@ -554,16 +531,14 @@ build_rtc3test() cp rtc3test-expected/*.png "$ARTIFACT" cp "$SRC_DIR/howto/rtc3test.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_same_suite() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=same-suite @@ -581,16 +556,14 @@ build_same_suite() rsync -am --include='README.md' --include='*/' --exclude='*' ./ "$ARTIFACT" cp "$SRC_DIR/howto/same-suite.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_strikethrough() { - # extract RGBDS artifacts - cd "$ARTIFACTS_DIR" - untar_all_artifacts + print_cmd_title + PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=strikethrough @@ -608,13 +581,14 @@ build_strikethrough() cp strikethrough-expected/strikethrough*.png "$ARTIFACT" cp "$SRC_DIR/howto/strikethrough.md" "$ARTIFACT/game-boy-test-roms-howto.md" - tar_rm_artifact $ARTIFACT_NAME } build_wla_dx() { + print_cmd_title + ARTIFACT_NAME=wla-dx ARTIFACT=$(mkdir_artifact $ARTIFACT_NAME) @@ -622,7 +596,7 @@ build_wla_dx() cd "$REPO_WLA_DX" git clone https://github.com/vhelin/wla-dx.git . git checkout d8b51a99ff1d8c9cb64ba4db90191718508f9c98 - # in case of this error on macOS: + # in case of this error (e.g. on macOS): # wlalink/write.c:3576:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] # use another compiler, e.g. # ./assemble.sh wla-dx -DCMAKE_C_COMPILER=/usr/local/bin/gcc-13 @@ -630,8 +604,6 @@ build_wla_dx() make wla-gb wlalink cp binaries/wla-gb binaries/wlalink "$ARTIFACT" - - tar_rm_artifact $ARTIFACT_NAME } From e39a8a5595132400abbf60bb7b5a2bdffcf51ea8 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:26:46 +0100 Subject: [PATCH 04/19] set executable bit for binaries in artifacts --- src/assemble.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/assemble.sh b/src/assemble.sh index 3fcccd9..284deb2 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -77,6 +77,7 @@ build_age_test_roms() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=age-test-roms @@ -131,6 +132,7 @@ build_bully() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=bully @@ -156,6 +158,7 @@ build_cgb_acid2() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=cgb-acid2 @@ -182,6 +185,7 @@ build_cgb_acid_hell() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=cgb-acid-hell @@ -213,6 +217,7 @@ build_dmg_acid2() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=dmg-acid2 @@ -267,6 +272,7 @@ build_gbmicrotest() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/wla-dx/*" PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=gbmicrotest @@ -291,6 +297,7 @@ build_little_things_gb() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=little-things-gb @@ -320,6 +327,7 @@ build_mealybug_tearoom_tests() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=mealybug-tearoom-tests @@ -379,6 +387,7 @@ build_mooneye_test_suite() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/wla-dx/*" PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=mooneye-test-suite @@ -539,6 +548,7 @@ build_same_suite() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=same-suite @@ -564,6 +574,7 @@ build_strikethrough() { print_cmd_title + chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=strikethrough From 54e6decc28bb25bf9882220f35c5577616b5d3a9 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:30:26 +0100 Subject: [PATCH 05/19] ci debugging --- src/assemble.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assemble.sh b/src/assemble.sh index 284deb2..34a5cf0 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -132,6 +132,7 @@ build_bully() { print_cmd_title + ls -lsah "$ARTIFACTS_DIR/rgbds" chmod +x "$ARTIFACTS_DIR/rgbds/*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" From 79222be93d192493e64d325fdaa95d89717e49c7 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:31:51 +0100 Subject: [PATCH 06/19] ci debugging --- src/assemble.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assemble.sh b/src/assemble.sh index 34a5cf0..40a7be1 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -133,7 +133,7 @@ build_bully() print_cmd_title ls -lsah "$ARTIFACTS_DIR/rgbds" - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/rgb*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=bully From 9f4f2dd3e251ba176866cd4b745761d8d034e0e2 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:39:42 +0100 Subject: [PATCH 07/19] ci debugging --- src/assemble.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/assemble.sh b/src/assemble.sh index 40a7be1..8ac64be 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -133,6 +133,7 @@ build_bully() print_cmd_title ls -lsah "$ARTIFACTS_DIR/rgbds" + chmod +x "$ARTIFACTS_DIR/rgbds/rgbasm" chmod +x "$ARTIFACTS_DIR/rgbds/rgb*" PATH="$ARTIFACTS_DIR/rgbds:$PATH" From 644999a7a52b07ef5e0d8cf1acf930c0742d4631 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:42:35 +0100 Subject: [PATCH 08/19] ci debugging --- src/assemble.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assemble.sh b/src/assemble.sh index 8ac64be..4fa433f 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -133,8 +133,8 @@ build_bully() print_cmd_title ls -lsah "$ARTIFACTS_DIR/rgbds" - chmod +x "$ARTIFACTS_DIR/rgbds/rgbasm" - chmod +x "$ARTIFACTS_DIR/rgbds/rgb*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* + ls -lsah "$ARTIFACTS_DIR/rgbds" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=bully From f96c77c5baaef53083c7b2099c24c4614bc09c79 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:44:52 +0100 Subject: [PATCH 09/19] fix setting executable bit --- src/assemble.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/assemble.sh b/src/assemble.sh index 4fa433f..9c40dd7 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -77,7 +77,7 @@ build_age_test_roms() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=age-test-roms @@ -132,9 +132,7 @@ build_bully() { print_cmd_title - ls -lsah "$ARTIFACTS_DIR/rgbds" chmod +x "$ARTIFACTS_DIR/rgbds/"* - ls -lsah "$ARTIFACTS_DIR/rgbds" PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=bully @@ -160,7 +158,7 @@ build_cgb_acid2() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=cgb-acid2 @@ -187,7 +185,7 @@ build_cgb_acid_hell() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=cgb-acid-hell @@ -219,7 +217,7 @@ build_dmg_acid2() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=dmg-acid2 @@ -274,7 +272,7 @@ build_gbmicrotest() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/wla-dx/*" + chmod +x "$ARTIFACTS_DIR/wla-dx/"* PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=gbmicrotest @@ -299,7 +297,7 @@ build_little_things_gb() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=little-things-gb @@ -329,7 +327,7 @@ build_mealybug_tearoom_tests() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=mealybug-tearoom-tests @@ -389,7 +387,7 @@ build_mooneye_test_suite() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/wla-dx/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=mooneye-test-suite @@ -550,7 +548,7 @@ build_same_suite() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=same-suite @@ -576,7 +574,7 @@ build_strikethrough() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/*" + chmod +x "$ARTIFACTS_DIR/rgbds/"* PATH="$ARTIFACTS_DIR/rgbds:$PATH" ARTIFACT_NAME=strikethrough From 89713e8b815e2e2b47b41c83af7cb340ca88ee97 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:46:32 +0100 Subject: [PATCH 10/19] fix setting executable bit (mooneye) --- src/assemble.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assemble.sh b/src/assemble.sh index 9c40dd7..e0a4f70 100755 --- a/src/assemble.sh +++ b/src/assemble.sh @@ -387,7 +387,7 @@ build_mooneye_test_suite() { print_cmd_title - chmod +x "$ARTIFACTS_DIR/rgbds/"* + chmod +x "$ARTIFACTS_DIR/wla-dx/"* PATH="$ARTIFACTS_DIR/wla-dx:$PATH" ARTIFACT_NAME=mooneye-test-suite From b997a862400eae27ddc7b8b6433b1cdf19cd1fd4 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:51:18 +0100 Subject: [PATCH 11/19] merge artifacts when building a release zip --- .github/workflows/build-and-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 62a9abc..0c8462c 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -406,6 +406,7 @@ jobs: uses: actions/download-artifact@v4 with: path: ${{ env.ARTIFACTS_PATH }} + merge-multiple: true - name: zip artifacts run: src/assemble.sh release-zip $ZIP_ARTIFACT_NAME From 491715f32bab45ba5c77e5a89d8337061c2fd63d Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 17:04:36 +0100 Subject: [PATCH 12/19] use a matrix for building tools --- .github/workflows/build-and-release.yml | 63 +++++++++---------------- 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 0c8462c..9af3d17 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -6,43 +6,24 @@ env: ARTIFACTS_NAME: job-artifacts ARTIFACTS_PATH: artifacts ZIP_ARTIFACT_NAME: game-boy-test-roms.zip - RGBDS_ARTIFACT_NAME: artifact-rgbds - WLADX_ARTIFACT_NAME: artifact-wla-dx + RGBDS_ARTIFACT_NAME: artifact-tools-rgbds + WLADX_ARTIFACT_NAME: artifact-tools-wla-dx jobs: - rgbds: - name: build RGBDS + tools: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + tool: rgbds, wla-dx steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: build RGBDS - run: src/assemble.sh rgbds - - - name: upload RGBDS artifact - uses: actions/upload-artifact@v4 - with: - name: artifact-${{ github.job }} - path: ${{ env.ARTIFACTS_PATH }} - - - wla-dx: - name: build WLA-DX - runs-on: ubuntu-latest - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: build WLA-DX - run: src/assemble.sh wla-dx - - - name: upload WLA-DX artifact - uses: actions/upload-artifact@v4 + - uses: actions/checkout@v4 + - run: src/assemble.sh {{ matrix.tool }} + - uses: actions/upload-artifact@v4 with: - name: artifact-${{ github.job }} + name: artifact-${{ github.job }}-{{ matrix.tool }} path: ${{ env.ARTIFACTS_PATH }} @@ -66,7 +47,7 @@ jobs: bully: name: build bully.gb runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -107,7 +88,7 @@ jobs: age-test-roms: name: build age-test-roms runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -131,7 +112,7 @@ jobs: dmg-acid2: name: build dmg-acid2 test rom runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -155,7 +136,7 @@ jobs: cgb-acid2: name: build cgb-acid2 test rom runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -179,7 +160,7 @@ jobs: cgb-acid-hell: name: build cgb-acid-hell test rom runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -203,7 +184,7 @@ jobs: little-things-gb: name: build (parts of) little-things-gb runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -227,7 +208,7 @@ jobs: mealybug-tearoom-tests: name: build mealybug-tearoom-tests runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -251,7 +232,7 @@ jobs: mooneye-test-suite: name: build Mooneye Test Suite runs-on: ubuntu-latest - needs: [ wla-dx ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -275,7 +256,7 @@ jobs: gbmicrotest: name: build GBMicrotest runs-on: ubuntu-latest - needs: [ wla-dx ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -333,7 +314,7 @@ jobs: same-suite: name: build same-suite runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 @@ -357,7 +338,7 @@ jobs: strikethrough: name: build strikethrough.gb runs-on: ubuntu-latest - needs: [ rgbds ] + needs: [ tools ] steps: - name: checkout code uses: actions/checkout@v4 From 888badb56d99b3f254ffbd2f8e6bb2d66bc1a904 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 17:05:46 +0100 Subject: [PATCH 13/19] fix ci syntax error --- .github/workflows/build-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 9af3d17..8e883d6 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -17,7 +17,7 @@ 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 }} From 6e2068c174a0f287606f4adc2032928eb9dbfd2f Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 17:10:10 +0100 Subject: [PATCH 14/19] dereference matrix variable --- .github/workflows/build-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 8e883d6..20ec923 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -20,7 +20,7 @@ jobs: tool: [rgbds, wla-dx] steps: - uses: actions/checkout@v4 - - run: src/assemble.sh {{ matrix.tool }} + - run: src/assemble.sh ${{ matrix.tool }} - uses: actions/upload-artifact@v4 with: name: artifact-${{ github.job }}-{{ matrix.tool }} From 832159e9c7ff7a85e03149833e68b3180fca8d3e Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 17:11:56 +0100 Subject: [PATCH 15/19] dereference matrix variable --- .github/workflows/build-and-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 20ec923..3937912 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -23,7 +23,7 @@ jobs: - run: src/assemble.sh ${{ matrix.tool }} - uses: actions/upload-artifact@v4 with: - name: artifact-${{ github.job }}-{{ matrix.tool }} + name: artifact-${{ github.job }}-${{ matrix.tool }} path: ${{ env.ARTIFACTS_PATH }} From f2ff061bdd3c7241ae9e9d96fe435a2c1ac50a38 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 19:32:00 +0100 Subject: [PATCH 16/19] use a matrix for building some test roms --- .github/workflows/build-and-release.yml | 81 ++++--------------------- 1 file changed, 13 insertions(+), 68 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 3937912..715522f 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -10,8 +10,7 @@ env: WLADX_ARTIFACT_NAME: artifact-tools-wla-dx jobs: - - + # make the tools required for some build jobs tools: runs-on: ubuntu-latest strategy: @@ -26,21 +25,21 @@ jobs: name: artifact-${{ github.job }}-${{ matrix.tool }} path: ${{ env.ARTIFACTS_PATH }} + # build test roms using the tools created above - blargg-suite: - name: create Blargg suite + # build test roms (no tools required) + test-roms-no-tools: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + suite: [blargg-roms, gambatte-roms, mooneye-test-suite-wilbertpol, rtc3test] steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: assemble Blargg test suite - run: src/assemble.sh blargg-roms - - - name: upload Blargg artifact - uses: actions/upload-artifact@v4 + - uses: actions/checkout@v4 + - run: src/assemble.sh ${{ matrix.suite }} + - uses: actions/upload-artifact@v4 with: - name: artifact-${{ github.job }} + name: artifact-${{ github.job }}-${{ matrix.suite }} path: ${{ env.ARTIFACTS_PATH }} @@ -68,23 +67,6 @@ jobs: path: ${{ env.ARTIFACTS_PATH }} - gambatte-suite: - name: build Gambatte suite - runs-on: ubuntu-latest - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: assemble Gambatte test suite - run: src/assemble.sh gambatte-roms - - - name: upload Gambatte 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 @@ -277,40 +259,6 @@ jobs: path: ${{ env.ARTIFACTS_PATH }} - mooneye-test-suite-wilbertpol: - name: build Mooneye Test Suite (wilbertpol) - runs-on: ubuntu-latest - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: assemble Mooneye Test Suite (wilbertpol) - run: src/assemble.sh mooneye-test-suite-wilbertpol - - - name: upload Mooneye Test Suite (wilbertpol) artifact - uses: actions/upload-artifact@v4 - with: - name: artifact-${{ github.job }} - path: ${{ env.ARTIFACTS_PATH }} - - - rtc3test: - name: build rtc3test - runs-on: ubuntu-latest - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: build rtc3test - run: src/assemble.sh rtc3test - - - name: upload rtc3test 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 @@ -363,19 +311,16 @@ jobs: name: create release zip runs-on: ubuntu-latest needs: [ + test-roms-no-tools, age-test-roms, - blargg-suite, bully, cgb-acid2, cgb-acid-hell, dmg-acid2, little-things-gb, - gambatte-suite, gbmicrotest, mealybug-tearoom-tests, mooneye-test-suite, - mooneye-test-suite-wilbertpol, - rtc3test, same-suite, strikethrough ] From 898684082d17fa36c653c109ebbc675f65b1a347 Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 19:46:15 +0100 Subject: [PATCH 17/19] build all test roms using matrices --- .github/workflows/build-and-release.yml | 327 ++++-------------------- 1 file changed, 43 insertions(+), 284 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 715522f..96914e6 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -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 @@ -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 From e18c519ea8d922bf15982d6b325852e86351e3bd Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 19:47:51 +0100 Subject: [PATCH 18/19] remove failing 'ls' --- .github/workflows/build-and-release.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 96914e6..d2732f6 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -17,7 +17,6 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - ls ${{ env.ARTIFACTS_PATH }} -lsah src/assemble.sh ${{ matrix.tool }} ls ${{ env.ARTIFACTS_PATH }} -lsah - uses: actions/upload-artifact@v4 @@ -52,7 +51,6 @@ jobs: path: ${{ env.ARTIFACTS_PATH }} merge-multiple: true - run: | - ls ${{ env.ARTIFACTS_PATH }} -lsah src/assemble.sh ${{ matrix.suite }} ls ${{ env.ARTIFACTS_PATH }} -lsah - uses: actions/upload-artifact@v4 @@ -70,7 +68,6 @@ jobs: steps: - 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 @@ -94,7 +91,9 @@ jobs: merge-multiple: true - name: zip artifacts - run: src/assemble.sh release-zip $ZIP_ARTIFACT_NAME + run: | + src/assemble.sh release-zip $ZIP_ARTIFACT_NAME + ls ${{ env.ARTIFACTS_PATH }} -lsah - name: upload zipped artifacts uses: actions/upload-artifact@v4 From a12a220d5ba4885e3efd8c3b67af7521191d0b8b Mon Sep 17 00:00:00 2001 From: Christoph Sprenger <66515552+c-sp@users.noreply.github.com> Date: Sat, 30 Dec 2023 19:55:20 +0100 Subject: [PATCH 19/19] remove expendable workflow code --- .github/workflows/build-and-release.yml | 31 +++++++------------------ 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index d2732f6..f2b1123 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -81,27 +81,19 @@ jobs: runs-on: ubuntu-latest needs: [ test-roms, test-roms-no-tools ] steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: download artifacts - uses: actions/download-artifact@v4 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: path: ${{ env.ARTIFACTS_PATH }} merge-multiple: true - - - name: zip artifacts - run: | + - run: | src/assemble.sh release-zip $ZIP_ARTIFACT_NAME ls ${{ env.ARTIFACTS_PATH }} -lsah - - - name: upload zipped artifacts - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v4 with: name: ${{ env.ZIP_ARTIFACT_NAME }} path: ${{ env.ARTIFACTS_PATH }}/${{ env.ZIP_ARTIFACT_NAME }} - # Releases are created automatically for each pushed tag. # Creating a new tag without any additional release information is # (as of 2020-06-13) not possible using the github.com website. @@ -120,17 +112,12 @@ jobs: needs: [ create-release-zip ] if: startsWith( github.ref, 'refs/tags/v' ) steps: - - name: download zipped artifacts - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v4 with: name: ${{ env.ZIP_ARTIFACT_NAME }} path: ./ - - - name: get release version - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - - name: create release ${{ env.RELEASE_VERSION }} - id: create_release + - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -139,9 +126,7 @@ jobs: release_name: ${{ env.RELEASE_VERSION }} draft: false prerelease: false - - - name: upload release ${{ env.RELEASE_VERSION }} asset - uses: actions/upload-release-asset@v1 + - uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: