Tools: fix esp32 CI build

install gevent as a package first seems to allow it to avoid issues.
also 3.11 is reqd, and 3.10 usn't good enough.
This commit is contained in:
David 'Buzz' Bussenschutt 2024-01-06 09:33:45 +10:00 committed by Andrew Tridgell
parent 535a6a3316
commit 6d4747a38c
2 changed files with 28 additions and 7 deletions

View File

@ -161,11 +161,26 @@ jobs:
- name: Install Prerequisites - name: Install Prerequisites
shell: bash shell: bash
run: | run: |
sudo apt-get install git wget libncurses-dev flex bison gperf python3 python3-pip python3-setuptools python3-serial python3-cryptography python3-future python3-pyparsing python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 sudo apt-get install git wget libncurses-dev flex bison gperf python3 python3-pip python3-venv python3-setuptools python3-serial python3-gevent python3-cryptography python3-future python3-pyparsing python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10
update-alternatives --query python
python --version
pip3 install gevent
# we actualy want 3.11 .. but the above only gave us 3.10, not ok with esp32 builds.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11 python3.11-venv python3.11-distutils -y
sudo apt-get install python3 python3-pip python3-venv python3-setuptools python3-serial python3-cryptography python3-future python3-pyparsing python3-pyelftools
update-alternatives --query python
pip3 install gevent
python --version
python3.11 --version
which python3.11
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 11
update-alternatives --query python
rm -rf /usr/local/bin/cmake rm -rf /usr/local/bin/cmake
sudo apt remove --purge --auto-remove cmake sudo apt remove --purge --auto-remove cmake
sudo apt update && \ sudo apt update && \
sudo apt install -y software-properties-common lsb-release && \ sudo apt install -y software-properties-common lsb-release && \
@ -183,7 +198,7 @@ jobs:
cd modules/esp_idf cd modules/esp_idf
echo "Installing ESP-IDF tools...." echo "Installing ESP-IDF tools...."
./install.sh 2>&1 > /dev/null ./install.sh esp32,esp32s3 2>&1 > /dev/null
cd ../.. cd ../..

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
# if you have modules/esp_idf setup as a submodule, then leave it as a submodule and switch branches # if you have modules/esp_idf setup as a submodule, then leave it as a submodule and switch branches
if [ ! -d modules ]; then if [ ! -d modules ]; then
echo "this script needs to be run from the root of your repo, sorry, giving up." echo "this script needs to be run from the root of your repo, sorry, giving up."
@ -25,26 +26,31 @@ else
# add esp_idf as almost submodule, depths uses less space # add esp_idf as almost submodule, depths uses less space
#git clone -b v4.4 --single-branch --depth 10 https://github.com/espressif/esp-idf.git esp_idf #git clone -b v4.4 --single-branch --depth 10 https://github.com/espressif/esp-idf.git esp_idf
git clone -b 'release/v4.4' https://github.com/espressif/esp-idf.git esp_idf git clone -b 'release/v4.4' https://github.com/espressif/esp-idf.git esp_idf
git checkout 6d853f
# check if we've got v4.4 checked out, only this version of esp_idf is tested and works? # check if we've got v4.4 checked out, only this version of esp_idf is tested and works?
fi fi
fi fi
echo "inspecting possible IDF... " echo "inspecting possible IDF... "
cd esp_idf cd esp_idf
echo `git rev-parse HEAD` echo `git rev-parse HEAD`
# these are a selection of possible specific commit/s that represent v4.4 branch of the esp_idf # these are a selection of possible specific commit/s that represent v4.4 branch of the esp_idf
if [ `git rev-parse HEAD` == 'f98ec313f2a9bc50151349c404a8f2f10ed99649' ]; then if [ `git rev-parse HEAD` == '6d853f0525b003afaeaed4fb59a265c8522c2da9' ]; then
echo "IDF version 'release/4.4' found OK, great."; echo "IDF version 'release/4.4' found OK, great.";
else else
echo "looks like an idf, but not v4.4 branch, trying to switch branch and reflect upstream"; echo "looks like an idf, but not v4.4 branch, or wrong commit , trying to switch branch and reflect upstream";
../../Tools/gittools/submodule-sync.sh >/dev/null ../../Tools/gittools/submodule-sync.sh >/dev/null
git fetch ; git checkout -f release/v4.4 git fetch ; git checkout -f release/v4.4
git checkout 6d853f
# retry same as above # retry same as above
echo `git rev-parse HEAD` echo `git rev-parse HEAD`
if [ `git rev-parse HEAD` == 'f98ec313f2a9bc50151349c404a8f2f10ed99649' ]; then if [ `git rev-parse HEAD` == '6d853f0525b003afaeaed4fb59a265c8522c2da9' ]; then
echo "IDF version 'release/4.4' found OK, great."; echo "IDF version 'release/4.4' found OK, great.";
git checkout 6d853f
fi fi
fi fi
cd ../.. cd ../..