diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 000000000..2f45bd609 --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,21 @@ +name: Check Makefile + +on: + push: + branches: [ master, release/v8.* ] + pull_request: + branches: [ master, release/v8.* ] + +jobs: + build: + if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} + runs-on: ubuntu-latest + name: Build using Makefile + steps: + - uses: actions/checkout@v2 + - uses: ammaraskar/gcc-problem-matcher@master + - name: Install prerequisites + run: scripts/install-prerequisites.sh + - name: Build + working-directory: tests/makefile + run: make test_file diff --git a/tests/makefile/Makefile b/tests/makefile/Makefile new file mode 100644 index 000000000..bcfe5da3a --- /dev/null +++ b/tests/makefile/Makefile @@ -0,0 +1,9 @@ +LVGL_DIR := $(CURDIR)/../.. +include ../../lvgl.mk + +CSRCS += test.c +CFLAGS += -DLV_CONF_SKIP=1 -I$(LVGL_DIR)/.. +COBJS := $(patsubst %.c, %.o, $(CSRCS)) + +test_file: $(COBJS) + $(CC) -o $@ $^ diff --git a/tests/makefile/test.c b/tests/makefile/test.c new file mode 100644 index 000000000..a9f6aa298 --- /dev/null +++ b/tests/makefile/test.c @@ -0,0 +1,7 @@ +#include +#include "lvgl/lvgl.h" + +int main(void) { + lv_init(); + return 0; +}