From eed6fb97ac93ec2553915ad698c0500013a697aa Mon Sep 17 00:00:00 2001 From: jn Date: Tue, 31 Jan 2023 05:13:33 +0100 Subject: [PATCH] GitHub CI: Run cputest to catch regressions early --- .github/workflows/fox32-run-cputest.yml | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/fox32-run-cputest.yml diff --git a/.github/workflows/fox32-run-cputest.yml b/.github/workflows/fox32-run-cputest.yml new file mode 100644 index 0000000..6ae8425 --- /dev/null +++ b/.github/workflows/fox32-run-cputest.yml @@ -0,0 +1,42 @@ +on: [push] + +name: run cputest + +jobs: + fox32-run-cputest: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Download latest fox32rom artifact + uses: dawidd6/action-download-artifact@v2 + with: + repo: fox32-arch/fox32rom + workflow: fox32rom-unstable.yml + workflow_conclusion: success + + - name: Download latest cputest artifact + uses: dawidd6/action-download-artifact@v2 + with: + repo: fox32-arch/demos + workflow: demos-unstable.yml + workflow_conclusion: success + + - name: Move fox32.rom into the root folder + run: | + mv fox32.rom/ download/ + cp download/fox32.rom ./fox32.rom + + - name: Install libsdl2-dev and vim + run: | + sudo apt update + sudo apt install -y libsdl2-dev vim + + - name: Build + run: make + + - name: Test + run: | + ./fox32 --headless --rom cputest/cputest.bin | tee cputest.log + grep 'All tests passed' cputest.log