Skip to content

Commit

Permalink
Try using arduino-cli to avoid ESP32 internal changes
Browse files Browse the repository at this point in the history
  • Loading branch information
earlephilhower committed Apr 17, 2024
1 parent abe0689 commit 3f39d63
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,13 @@ function install_esp32()
local ide_path=$1
pip install pyserial
pip3 install pyserial
cd $ide_path/hardware
mkdir espressif
cd espressif
git clone https://github.com/espressif/arduino-esp32.git esp32
pushd esp32
# Set custom warnings for all builds

echo "compiler.c.extra_flags=-Wall -Wextra -Werror $debug_flags" > platform.local.txt
echo "compiler.cpp.extra_flags=-Wall -Wextra -Werror $debug_flags" >> platform.local.txt
echo -e "\n----platform.local.txt----"
cat platform.local.txt
git submodule update --init
cd tools
python3 get.py
export PATH="$ide_path/hardware/espressif/esp32/tools/xtensa-esp32-elf/bin/:$PATH"
mkdir -p ~/bin
pushd ~/bin
wget https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz
tar xvf arduino-cli_latest_Linux_64bit.tar.gz
export PATH=$PATH:$PWD
popd
cd esp32
arduino-cli core install --log --additional-urls https://espressif.github.io/arduino-esp32/package_esp32_index.json esp32:esp32
}

function install_arduino()
Expand Down Expand Up @@ -119,10 +109,14 @@ elif [ "$BUILD_TYPE" = "build_esp32" ]; then
install_esp32 "$HOME/arduino_ide"
mkdir -p "$HOME/Arduino/hardware"
install_esp32 "$HOME/Arduino"
export FQBN="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
mkdir -p "$GITHUB_WORKSPACE/hardware"
ln -s "$GITHUB_WORKSPACE/../" "$GITHUB_WORKSPACE/libraries"
source "$HOME/arduino_ide/hardware/espressif/esp32/.github/scripts/sketch_utils.sh" chunk_build -ai "$HOME/arduino_ide" -au "$GITHUB_WORKSPACE" -fqbn "$FQBN" -t esp32 -p "$GITHUB_WORKSPACE" -i $BUILD_REM -m $BUILD_MOD
export testcnt=0
for i in $(find ~/Arduino/libraries/ESP8266Audio -name "*.ino"); do
testcnt=$(( ($testcnt + 1) % $BUILD_MOD ))
if [ $testcnt -ne $BUILD_REM ]; then
continue # Not ours to do
fi
arduino-cli compile --fqbn esp32:esp32:esp32 --log --verbose --warnings all $i
done
elif [ "$BUILD_TYPE" = "build_rp2040" ]; then
install_arduino
install_rp2040 "$HOME/arduino_ide"
Expand Down

0 comments on commit 3f39d63

Please sign in to comment.