diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2b0217..0fca82c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,11 +23,6 @@ jobs: - name: Add msys64 to path run: | echo C:\msys64\usr\bin >> $env:GITHUB_PATH - - name: wget bgb - shell: bash - run: | - wget https://bgb.bircd.org/bgbw64.zip - unzip bgbw64.zip - name: pip install shell: bash run: | diff --git a/tests/Makefile b/tests/Makefile index 3e8134d..c7a64ce 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,6 +7,8 @@ TESTS = $(wildcard *.c) OBJS = $(TESTS:%.c=$(BLDDIR)/%.o) TESTROMS = $(TESTS:%.c=$(BLDDIR)/%.gb) +BGBDIR = ../bgb + all: clean mkdirs build-all @@ -18,7 +20,12 @@ clean: mkdirs: mkdir -p $(BLDDIR) -$(BLDDIR)/%.gb: $(MYDIR)/%.c mkdirs +$(BGBDIR): + wget https://bgb.bircd.org/bgbw64.zip + unzip -jo -qq bgbw64.zip -d ../bgb + rm bgbw64.zip + +$(BLDDIR)/%.gb: $(MYDIR)/%.c mkdirs $(BGBDIR) $(CC) -o $@ $< .PHONY: build-all