Add Werror, etc. to CI process (#779)
This commit is contained in:
1 parent
1255a4240a
commit
c19a6153c9
3 files changed
+19
-9
No files matched your search
@@ -44,7 +44,7 @@ jobs:
|
||||
cp -a /home/runner/work/ESP8266Audio/ESP8266Audio ~/Arduino/libraries/.
|
||||
- name: Build examples RP2040
|
||||
run: |
|
||||
./tests/build-ci.sh rp2040 ${{matrix.shift}} "rp2040:rp2040:rpipicow:flash=2097152_262144,freq=200,opt=Small,os=none,profile=Disabled,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,wificountry=worldwide,ipbtstack=ipv4only,uploadmethod=default"
|
||||
./tests/build-ci.sh rp2040 ${{matrix.shift}} "rp2040:rp2040:rpipicow:flash=2097152_262144,freq=200,opt=Small,os=none,profile=Disabled,rtti=Disabled,stackprotect=Disabled,exceptions=Disabled,dbgport=Disabled,dbglvl=None,usbstack=picosdk,wificountry=worldwide,ipbtstack=ipv4only,uploadmethod=default" 1
|
||||
|
||||
build-esp8266:
|
||||
name: Build all examples on Arduino-ESP8266 latest release
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
./get.py -q
|
||||
- name: Build examples ESP8266
|
||||
run: |
|
||||
./tests/build-ci.sh esp8266 ${{matrix.shift}} "esp8266com:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,optim=Smallest,wipe=none,baud=921600,iramfloat=no"
|
||||
./tests/build-ci.sh esp8266 ${{matrix.shift}} "esp8266com:esp8266:d1_mini:xtal=80,vt=flash,exception=disabled,stacksmash=disabled,ssl=all,mmu=3232,non32xfer=fast,eesz=4M2M,ip=lm2f,dbg=Disabled,lvl=None____,optim=Smallest,wipe=none,baud=921600,iramfloat=no" 1
|
||||
|
||||
build-esp32:
|
||||
name: Build all examples on Arduino-ESP32 latest release
|
||||
@@ -103,7 +103,8 @@ jobs:
|
||||
cp -a /home/runner/work/ESP8266Audio/ESP8266Audio ~/Arduino/libraries/.
|
||||
- name: Build examples ESP32C6
|
||||
run: |
|
||||
./tests/build-ci.sh esp32c6 ${{matrix.shift}} "esp32:esp32:esp32c6:PartitionScheme=huge_app"
|
||||
# TODO - Don't use -Werror on ESP32, I2S deprecation warnings
|
||||
./tests/build-ci.sh esp32c6 ${{matrix.shift}} "esp32:esp32:esp32c6:PartitionScheme=huge_app" 0
|
||||
|
||||
# Run host test suite under valgrind for runtime checking of code.
|
||||
host-tests:
|
||||
|
||||
+6
-5
@@ -41,11 +41,12 @@ public:
|
||||
return true;
|
||||
}
|
||||
virtual bool SetGain(float f) {
|
||||
if (f > 4.0) {
|
||||
f = 4.0;
|
||||
} if (f < 0.0) {
|
||||
f = 0.0;
|
||||
} gainF2P6 = (uint8_t)(f * (1 << 6));
|
||||
if (f > 4.0f) {
|
||||
f = 4.0f;
|
||||
} else if (f < 0.0f) {
|
||||
f = 0.0f;
|
||||
}
|
||||
gainF2P6 = (uint8_t)(f * (1 << 6));
|
||||
return true;
|
||||
}
|
||||
virtual bool begin() {
|
||||
|
||||
+9
-1
@@ -6,6 +6,7 @@ set -o pipefail
|
||||
outdir=$1; shift
|
||||
offset=$1; shift
|
||||
fqbn=$1; shift
|
||||
werror=$1; shift
|
||||
|
||||
mkdir $outdir
|
||||
rm -f *.elf
|
||||
@@ -17,7 +18,14 @@ sketches=$(find ~/Arduino/libraries/ESP8266Audio/examples -name "*.ino" | sort |
|
||||
while [ $(echo $sketches | wc -w) -gt 0 ]; do
|
||||
sketch=$(echo $sketches | cut -f1 -d " ")
|
||||
echo "::group::Compiling $(basename $sketch) for $fqbn into $outdir"
|
||||
./arduino-cli compile -b "$fqbn" -v --warnings all --build-path "$outdir" "$sketch" || exit 255
|
||||
if [ 0"$werror" -gt 0 ]; then
|
||||
./arduino-cli compile -b "$fqbn" -v --warnings all \
|
||||
--build-property "compiler.c.extra_flags=-Wall -Wextra -Werror -Wno-ignored-qualifiers" \
|
||||
--build-property "compiler.cpp.extra_flags=-Wall -Wextra -Werror -Wno-ignored-qualifiers -Wno-overloaded-virtual" \
|
||||
--build-path "$outdir" "$sketch" || exit 255
|
||||
else
|
||||
./arduino-cli compile -b "$fqbn" -v --warnings all --build-path "$outdir" "$sketch" || exit 255
|
||||
fi
|
||||
mv -f "$outdir"/*.elf .
|
||||
echo "::endgroup::"
|
||||
# Shift out 5
|
||||
|
||||
Reference in new issue
Block a user