From ea79cee01a6bec9b3ce5b6c232dd7ca0d020d5c9 Mon Sep 17 00:00:00 2001 From: embeddedt <42941056+embeddedt@users.noreply.github.com> Date: Fri, 29 Apr 2022 19:38:04 -0400 Subject: [PATCH] ci add Makefile test --- .github/workflows/makefile.yml | 21 +++++++++++++++++++++ tests/makefile/Makefile | 9 +++++++++ tests/makefile/test.c | 7 +++++++ 3 files changed, 37 insertions(+) create mode 100644 .github/workflows/makefile.yml create mode 100644 tests/makefile/Makefile create mode 100644 tests/makefile/test.c 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; +}