From dfab74896b462321a1ff39413f2778150f71385b Mon Sep 17 00:00:00 2001 From: dzid26 Date: Wed, 10 Apr 2024 13:31:11 +0100 Subject: [PATCH] CI: warnings as errors for safety --- .github/workflows/build.yaml | 6 ++++-- src/controller/Makefile | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e97c97fd..d06b4331 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,11 +25,13 @@ jobs: run: | #install silent and then unpack missing installation libraries Invoke-WebRequest https://altushost-swe.dl.sourceforge.net/project/sdcc/sdcc-win64/$env:SDCC_VERSION/sdcc-$env:SDCC_VERSION-rc3-x64-setup.exe -OutFile sdcc_setup.exe Start-Process -wait -FilePath "sdcc_setup.exe" -ArgumentList "/S", "/D=C:\Program Files\SDCC" + $env:Path += ";C:\Program Files\SDCC\bin" - uses: actions/checkout@v2 - name: Build run: | cd src/controller - ./compile.bat + ../../tools/cygwin/bin/make.exe clean + ../../tools/cygwin/bin/make.exe CFLAGS=--Werror - uses: actions/upload-artifact@v3 with: name: firmware @@ -53,7 +55,7 @@ jobs: run: | cd src/controller make clean - make + make CFLAGS=--Werror - uses: actions/upload-artifact@v3 with: name: firmware diff --git a/src/controller/Makefile b/src/controller/Makefile index 15cad0ef..95c097ab 100644 --- a/src/controller/Makefile +++ b/src/controller/Makefile @@ -65,9 +65,9 @@ ebike_app.h pins.h eeprom.h lights.h config.h # The list of .rel files can be derived from the list of their source files RELS = $(addprefix $(ODIR)/,$(notdir $(EXTRASRCS:.c=.rel))) -INCLUDES = -I$(IDIR) -I$(IDIR1) -CFLAGS = -m$(PLATFORM) -D$(DEVICE) -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt -DEBUG_FLAGS = --out-fmt-ihx --debug +override INCLUDES += -I$(IDIR) -I$(IDIR1) +override CFLAGS += -m$(PLATFORM) -D$(DEVICE) -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt +override DEBUG_FLAGS += --out-fmt-ihx --debug LIBS = # This just provides the conventional target name "all"; it is optional