From 7878131406fd38a5ed564f3feea6f53984e56a92 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 | 78 +++++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd8ad41..faddaf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,65 @@ 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: 'Set up wine' + run: | + mkdir wrappers + cat >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 gcc' run: make linux - name: 'Run tests with gcc' @@ -70,22 +129,15 @@ jobs: run: make clean && make linux LINUX_CC=powerpc64-linux-gnu-gcc-10 LDFLAGS=-static - name: 'Run tests with gcc-powerpc64' run: make test TESTWRAPPER=qemu-ppc64 - - name: 'Set up wine' - run: | - cat >wine-wrapper <