From 42cd22c8f1ad33e2a3ad572332cdb96e1c75622d Mon Sep 17 00:00:00 2001 From: pgattic Date: Wed, 22 May 2024 16:07:18 -0600 Subject: [PATCH] Checksum workflow --- .github/workflows/makefile.yml | 22 ++++++++++++++++++++++ Makefile | 16 ++++++++++++---- gfx/title.rle | Bin 305 -> 320 bytes smb.sha1 | 1 + 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/makefile.yml create mode 100644 smb.sha1 diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 0000000..f04200b --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,22 @@ +name: Verify Checksum + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: make + + - name: Run check + run: make check + diff --git a/Makefile b/Makefile index 868441c..c7a777c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ ROM_NAME := smb -ASM := asm6f/asm6f +ASM_DIR := asm6f +ASM := $(ASM_DIR)/asm6f +ASM_DIR_EXISTS := $(wildcard $(ASM_DIR)) ASM_EXISTS := $(wildcard $(ASM)) all: $(ROM_NAME).nes @@ -13,13 +15,19 @@ $(ROM_NAME).nes: asm clean: rm -f $(ROM_NAME).nes $(ROM_NAME).lst - make clean -C asm6f + make clean -C $(ASM_DIR) + +check: $(ROM_NAME).nes + @sha1sum -c smb.sha1 # Only build assembler if it doesn't already exist. Use its own makefile. asm: +ifndef ASM_DIR_EXISTS + git clone https://github.com/freem/asm6f.git $(ASM_DIR) +endif ifndef ASM_EXISTS - make -C asm6f + make -C $(ASM_DIR) endif -.PHONY: all clean asm +.PHONY: all clean check asm diff --git a/gfx/title.rle b/gfx/title.rle index 2f0c0d6c2e3d2a8875ae5b5b85bbce9e4654c52f..4b430bb660bc49372385e22f30a4a0a0398cdba1 100644 GIT binary patch delta 23 ScmdnUbbx7tAtV2PQ~&^}9T8Xn delta 7 OcmX@Ww2^6pAtL|_LjqU; diff --git a/smb.sha1 b/smb.sha1 new file mode 100644 index 0000000..1c8d9c0 --- /dev/null +++ b/smb.sha1 @@ -0,0 +1 @@ +ea343f4e445a9050d4b4fbac2c77d0693b1d0922 smb.nes