mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Fix Windows CI build (#6927)
Remove chocolatey (Win package manager) usage because it seems to often have issues. Use the main sources for Python3 and sed, instead. Fix size printouts to use a simpler script which should work under Windows and all UNIX-like OSes.
This commit is contained in:
parent
1d0bc5efdf
commit
ba22113f21
@ -34,17 +34,11 @@ function print_size_info()
|
|||||||
elf_name=$(basename $elf_file)
|
elf_name=$(basename $elf_file)
|
||||||
sketch_name="${elf_name%.*}"
|
sketch_name="${elf_name%.*}"
|
||||||
# echo $sketch_name
|
# echo $sketch_name
|
||||||
|
xtensa-lx106-elf-size --format=sysv $elf_file | sed s/irom0.text/irom0text/g > size.txt
|
||||||
declare -A segments
|
declare -A segments
|
||||||
while read -a tokens; do
|
for seg in data rodata bss text irom0text; do
|
||||||
seg=${tokens[0]}
|
segments[$seg]=$(grep ^.$seg size.txt | awk '{sum += $2} END {print sum}')
|
||||||
seg=${seg//./}
|
done
|
||||||
size=${tokens[1]}
|
|
||||||
addr=${tokens[2]}
|
|
||||||
if [ "$addr" -eq "$addr" -a "$addr" -ne "0" ] 2>/dev/null; then
|
|
||||||
segments[$seg]=$size
|
|
||||||
fi
|
|
||||||
|
|
||||||
done < <(xtensa-lx106-elf-size --format=sysv $elf_file | sed 's/\r//g' )
|
|
||||||
|
|
||||||
total_ram=$((${segments[data]} + ${segments[rodata]} + ${segments[bss]}))
|
total_ram=$((${segments[data]} + ${segments[rodata]} + ${segments[bss]}))
|
||||||
total_flash=$((${segments[data]} + ${segments[rodata]} + ${segments[text]} + ${segments[irom0text]}))
|
total_flash=$((${segments[data]} + ${segments[rodata]} + ${segments[text]} + ${segments[irom0text]}))
|
||||||
@ -165,16 +159,20 @@ function install_ide()
|
|||||||
local core_path=$2
|
local core_path=$2
|
||||||
local debug=$3
|
local debug=$3
|
||||||
if [ "$WINDOWS" = "1" ]; then
|
if [ "$WINDOWS" = "1" ]; then
|
||||||
# Acquire needed packages from Windows package manager
|
mkdir /c/mybin
|
||||||
choco install --no-progress python3 >& pylog.txt
|
pushd /c/mybin
|
||||||
# Parse the python instrall dir from the output log. Sorry, can't set it via choco on the free version
|
# Use Python.org to install python3 and make sure it is in path
|
||||||
PYDIR=$(cat pylog.txt | grep "^Installed to:" | cut -f2 -d"'" | sed 's/C:\\/\/c\//')
|
wget -nv https://www.python.org/ftp/python/3.8.1/python-3.8.1-embed-win32.zip
|
||||||
echo "Detected python3 install dir: $PYDIR"
|
unzip -q python-3.8.1-embed-win32.zip
|
||||||
export PATH="$PYDIR:$PATH" # Ensure it's live from now on...
|
cp "python.exe" "python3.exe"
|
||||||
cp "$PYDIR/python.exe" "$PYDIR/python3.exe"
|
wget -nv -O sed.exe https://github.com/mbuilov/sed-windows/raw/master/sed-4.7-x64.exe
|
||||||
choco install --no-progress unzip
|
#wget -nv https://fossies.org/windows/misc/unz600xn.exe
|
||||||
choco install --no-progress sed
|
#unzip -q ./unz600xn.exe
|
||||||
#choco install --no-progress golang
|
popd
|
||||||
|
export PATH="c:\\mybin:$PATH" # Ensure it's live from now on...
|
||||||
|
python3 --version
|
||||||
|
sed --version
|
||||||
|
awk --version
|
||||||
test -r arduino-windows.zip || wget -nv -O arduino-windows.zip "${ideurl}-windows.zip"
|
test -r arduino-windows.zip || wget -nv -O arduino-windows.zip "${ideurl}-windows.zip"
|
||||||
unzip -q arduino-windows.zip
|
unzip -q arduino-windows.zip
|
||||||
mv arduino-${idever} arduino-distrib
|
mv arduino-${idever} arduino-distrib
|
||||||
|
Loading…
x
Reference in New Issue
Block a user