From f43689fbbcd393bc636be4cb9974b814ecfe53dc Mon Sep 17 00:00:00 2001 From: dzid26 Date: Wed, 10 Apr 2024 14:15:15 +0100 Subject: [PATCH] CI: warnings as errors for safety --- .github/workflows/build.yaml | 11 +++++++---- src/controller/Makefile | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e97c97fd..e88c7d1f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,14 +25,17 @@ 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" + echo "Adding sdcc to PATH" + Add-Content $env:GITHUB_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 + name: firmware_compiled_on_windows path: bin/main.ihx @@ -53,8 +56,8 @@ jobs: run: | cd src/controller make clean - make + make CFLAGS=--Werror - uses: actions/upload-artifact@v3 with: - name: firmware + name: firmware_compiled_on_linux path: bin/main.ihx 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