Skip to content

Commit

Permalink
Test that webgpu.h compiles (in C99 with warnings)
Browse files Browse the repository at this point in the history
Fixes 12
  • Loading branch information
kainino0x committed Aug 3, 2023
1 parent 8e9025e commit c7295df
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: compile
on: [push]
jobs:
compile:
runs-on: ubuntu-latest
steps:
- run: make -C tests/compile
10 changes: 10 additions & 0 deletions tests/compile/Makefile
Original file line number Diff line number Diff line change
@@ -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 $@ $<
3 changes: 3 additions & 0 deletions tests/compile/main.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "../../webgpu.h"

int main(void) {}

0 comments on commit c7295df

Please sign in to comment.