From a78f17f076d803d80c95e308bb6b4cd5fe211c29 Mon Sep 17 00:00:00 2001 From: Stas Sergeev Date: Sun, 21 Jun 2026 20:54:50 +0300 Subject: [PATCH] ci: test that demos actually work [closes #63] Test hello demo with dj64-host. --- .github/workflows/ci-build.yml | 2 +- ci_test.sh | 15 +++++++++++++++ ci_test_prereq.sh | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100755 ci_test.sh diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 2f4179e6..6d59ccbb 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -32,4 +32,4 @@ jobs: - name: Set up test environment run: | ./ci_test_prereq.sh - make demos -j 9 + ./ci_test.sh diff --git a/ci_test.sh b/ci_test.sh new file mode 100755 index 00000000..fc5247c2 --- /dev/null +++ b/ci_test.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e -x + +make demos -j 9 +cd demos/hello +ls -l hello +make host.elf +RESULT=`DJ64_DUMB_VIDEO=1 ./host.elf | dos2unix` +if [ "$RESULT" != "Hello World!" ]; then + echo "bad test output: $RESULT" + echo "Test FAILED" + exit 1 +fi +echo "Test PASSED" diff --git a/ci_test_prereq.sh b/ci_test_prereq.sh index e09ff8f2..e098537b 100755 --- a/ci_test_prereq.sh +++ b/ci_test_prereq.sh @@ -1,5 +1,5 @@ #!/bin/sh sudo add-apt-repository ppa:stsp-0/dj64 -sudo apt install -y \ - djstub +sudo add-apt-repository ppa:dosemu2/ppa +sudo apt install -y djstub dj64-host dos2unix