From b1a01d3421ea0d3cbfca421340b899d0cf5b300f Mon Sep 17 00:00:00 2001 From: mooinglemur Date: Mon, 6 Mar 2023 21:53:39 -0700 Subject: [PATCH] Have CI do debug (-trace) and non-trace builds --- .github/workflows/build.yml | 98 ++++++++++++++++++++++++++++++++----- 1 file changed, 87 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0cfc21a2..0396e082 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,7 +40,7 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu Windows 64-bit + name: X16-Emu Windows 64-bit (Debug) path: emu_binaries/* build-win32-debug: runs-on: windows-latest @@ -83,7 +83,7 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu Windows 32-bit + name: X16-Emu Windows 32-bit (Debug) path: emu_binaries/* build-lin64-debug: runs-on: ubuntu-latest @@ -114,7 +114,7 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu Linux 64-bit + name: X16-Emu Linux 64-bit (Debug) path: emu_binaries/* build-darwin-11-x64-debug: # this is currently macos-11, Big Sur @@ -147,7 +147,7 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu MacOS 11 Big Sur Intel 64-bit + name: X16-Emu MacOS 11 Big Sur Intel 64-bit (Debug) path: emu_binaries/* build-darwin-12-x64-debug: # this is currently macos-12, Monterey @@ -180,7 +180,7 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu MacOS 12 Monterey Intel 64-bit + name: X16-Emu MacOS 12 Monterey Intel 64-bit (Debug) path: emu_binaries/* build-wasm: runs-on: ubuntu-latest @@ -208,7 +208,7 @@ jobs: with: name: X16-Emu WebAssembly path: emu_binaries/* - build-win64-notrace: + build-win64: runs-on: windows-latest defaults: run: @@ -246,9 +246,52 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu Windows 64-bit (no -trace) + name: X16-Emu Windows 64-bit path: emu_binaries/* - build-darwin-11-x64-notrace: + build-win32: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v3 + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: make mingw-w64-i686-toolchain mingw-w64-i686-libelf mingw-w64-i686-SDL2 + path-type: inherit + - name: Add /mingw32/bin to path + run: echo "/mingw32/bin" >> $GITHUB_PATH + - name: Download latest ROM + id: download + run: | + gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom + shell: cmd + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Copy ROM symbols + run: | + cp latest_rom/*.h src/. + - name: Build Emulator + run: | + WIN_SDL2=/mingw32 TARGET_CPU=x86 CROSS_COMPILE_WINDOWS=1 make V=1 -j2 + mkdir emu_binaries + cp $(which SDL2.dll) emu_binaries/. + cp $(which zlib1.dll) emu_binaries/. + cp sdcard.img.zip emu_binaries/. + cp x16emu.exe emu_binaries/. + cp makecart.exe emu_binaries/. + file emu_binaries/* + - name: Copy ROM + run: | + cp latest_rom/rom.bin emu_binaries/. + cp latest_rom/*.sym emu_binaries/. + - uses: actions/upload-artifact@v3 + with: + name: X16-Emu Windows 32-bit + path: emu_binaries/* + build-darwin-11-x64: # this is currently macos-11, Big Sur runs-on: macos-11 steps: @@ -279,9 +322,42 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu MacOS 11 Big Sur Intel 64-bit (no -trace) + name: X16-Emu MacOS 11 Big Sur Intel 64-bit + path: emu_binaries/* + build-darwin-12-x64: + # this is currently macos-12, Monterey + runs-on: macos-12 + steps: + - uses: actions/checkout@v3 + - name: Install Dependencies + run: | + brew install make sdl2 + - name: Download latest ROM + id: download + run: | + gh run download -R X16Community/x16-rom -n "ROM Image" --dir latest_rom + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Copy ROM symbols + run: | + cp latest_rom/*.h src/. + - name: Build Emulator + run: | + MAC_STATIC=1 LIBSDL_FILE=/usr/local/Cellar/sdl2/*/lib/libSDL2.a make V=1 -j3 + mkdir emu_binaries + cp sdcard.img.zip emu_binaries/. + cp x16emu emu_binaries/. + cp makecart emu_binaries/. + file emu_binaries/* + - name: Copy ROM + run: | + cp latest_rom/rom.bin emu_binaries/. + cp latest_rom/*.sym emu_binaries/. + - uses: actions/upload-artifact@v3 + with: + name: X16-Emu MacOS 12 Monterey Intel 64-bit path: emu_binaries/* - build-lin64-notrace: + build-lin64: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -310,5 +386,5 @@ jobs: cp latest_rom/*.sym emu_binaries/. - uses: actions/upload-artifact@v3 with: - name: X16-Emu Linux 64-bit (no -trace) + name: X16-Emu Linux 64-bit path: emu_binaries/*