From 8df6189f35c22dadc162661c451da947e709cf11 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 1 Feb 2024 01:58:43 -0800 Subject: [PATCH] Add a CP/M CI job --- .github/workflows/ci.yml | 60 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd8ad41..d451afe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,22 @@ jobs: libc6-dev-powerpc-cross gcc-10-powerpc64-linux-gnu libc6-dev-ppc64-cross + unzip + xz-utils + - name: 'Install binaries' + # z88dk only releases OS X and Windows binaries, so use the Windows ones + run: | + curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/z88dk/z88dk/releases/download/v2.3/z88dk-win32-2.3.zip + unzip -q z88dk-win32-2.3.zip + + - name: 'Build CP/M emulator' + run: | + GITHASH=7f15e5aa45972b2fdfa4dd5537ce7a3b730fc4a0 + curl -LOJsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/jhallen/cpm/archive/"$GITHASH".tar.gz + tar -xaf cpm-"$GITHASH".tar.gz + cd cpm-"$GITHASH" + make + cp cpm .. - name: 'Compile with gcc' run: make linux - name: 'Run tests with gcc' @@ -72,20 +88,56 @@ jobs: run: make test TESTWRAPPER=qemu-ppc64 - name: 'Set up wine' run: | - cat >wine-wrapper <wrappers/wine-test-wrapper <wrappers/zcc <wrappers/cpm-test-wrapper < prompt + # TODO: fix tests + "$PWD/cpm" "\$@" |& tail +13c | dos2unix -q + rc=$? + if [[ -n "$NEWDIR" ]]; then + # remove the copied binary + rm -f "$1" + fi + exit "$rc" + EOF + chmod 755 wrappers/* # Run wine once to set it up, which displays some logs that would mess up tests WINEDEBUG=-all wine cmd /c exit - name: 'Compile with mingw32' run: make clean && make linux LINUX_CC=x86_64-w64-mingw32-gcc - name: 'Run tests with mingw32+wine' - run: make test TESTWRAPPER=./wine-wrapper + run: make test TESTWRAPPER=wrappers/wine-test-wrapper - name: 'Compile with mingw32-posix' run: make clean && make linux LINUX_CC=x86_64-w64-mingw32-gcc-10-posix - name: 'Run tests with mingw32-posix+wine' - run: make test TESTWRAPPER=./wine-wrapper + run: make test TESTWRAPPER=wrappers/wine-test-wrapper + - name: 'Compile with z88dk' + run: make clean && PATH="$PATH:$PWD/wrappers" make cpm + - name: 'Run tests with z88dk' + run: make test TESTWRAPPER=wrappers/cpm-test-wrapper