diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml new file mode 100644 index 0000000..5a0fbb1 --- /dev/null +++ b/.github/workflows/compile.yml @@ -0,0 +1,7 @@ +name: compile +on: [push] +jobs: + compile: + runs-on: ubuntu-latest + steps: + - run: make -C tests/compile diff --git a/tests/compile/Makefile b/tests/compile/Makefile new file mode 100644 index 0000000..7538aa5 --- /dev/null +++ b/tests/compile/Makefile @@ -0,0 +1,10 @@ +all: main-clang main-gcc + +CLANG_WARNINGS = -Weverything -Wno-padded -Wno-poison-system-directories +GCC_WARNINGS = -Wall -Wextra + +main-clang: main.c ../../webgpu.h Makefile + clang -std=c99 $(CLANG_WARNINGS) -o $@ $< + +main-gcc: main.c ../../webgpu.h Makefile + gcc -std=c99 $(GCC_WARNINGS) -o $@ $< diff --git a/tests/compile/main.c b/tests/compile/main.c new file mode 100644 index 0000000..3b9006b --- /dev/null +++ b/tests/compile/main.c @@ -0,0 +1,3 @@ +#include "../../webgpu.h" + +int main(void) {}