Added GitHub workflows to run tests

Mostly taken from .travis.yml, biggest changes were around how to get
the status updates to work.

We can't use a token on PRs the same way we could in Travis, so instead
we use a second workflow that checks every pull request for "status"
artifacts, and create the actual statuses in the "workflow_run" event,
where we have full access to repo secrets.
This commit is contained in:
Christopher Haster
2020-12-20 02:03:20 -06:00
parent d804c2d3b7
commit b2235e956d
6 changed files with 345 additions and 11 deletions

View File

@@ -29,8 +29,7 @@ override CFLAGS += -std=c99 -Wall -pedantic
override CFLAGS += -Wextra -Wshadow -Wjump-misses-init -Wundef
ifdef VERBOSE
override TFLAGS += -v
override SFLAGS += -v
override SCRIPTFLAGS += -v
endif
@@ -41,14 +40,14 @@ asm: $(ASM)
size: $(OBJ)
$(SIZE) -t $^
code_size:
./scripts/code_size.py $(SFLAGS)
code:
./scripts/code.py $(SCRIPTFLAGS)
test:
./scripts/test.py $(TFLAGS)
./scripts/test.py $(EXEC:%=--exec=%) $(SCRIPTFLAGS)
.SECONDEXPANSION:
test%: tests/test$$(firstword $$(subst \#, ,%)).toml
./scripts/test.py $@ $(TFLAGS)
./scripts/test.py $@ $(EXEC:%=--exec=%) $(SCRIPTFLAGS)
-include $(DEP)