Skip to content

Commit

Permalink
Merge branch 'ci/dangerjs'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed Dec 12, 2024
2 parents fb6e977 + af2eb8a commit 078c111
Show file tree
Hide file tree
Showing 347 changed files with 11,129 additions and 3,138 deletions.
24 changes: 12 additions & 12 deletions .github/ISSUE_TEMPLATE/Issue-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ body:
- type: markdown
attributes:
value: |
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
* Before reporting a new issue please check and search in [List of existing issues](https://github.com/espressif/arduino-esp32/issues?q=is%3Aissue)
* Please check [Online Documentation](https://docs.espressif.com/projects/arduino-esp32/en/latest/index.html)
* Take a look on [Troubleshooting guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/troubleshooting.html)
* If still experiencing the issue, please provide as many details as possible below about your hardware, computer setup and code.
Expand All @@ -24,7 +24,7 @@ body:
description: What development board or other hardware is the chip attached to?
placeholder: ex. DevKitC, plain module on breadboard, etc. If your hardware is custom or unusual, please attach a photo.
validations:
required: true
required: true
- type: textarea
id: other-hw
attributes:
Expand Down Expand Up @@ -60,7 +60,7 @@ body:
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
Expand All @@ -77,7 +77,7 @@ body:
description: What IDE are you using?
placeholder: eg. Arduino IDE, VSCode, Sloeber...
validations:
required: true
required: true
- type: input
id: os
attributes:
Expand All @@ -95,13 +95,13 @@ body:
validations:
required: true
- type: dropdown
id: PSRAM
id: PSRAM
attributes:
label: PSRAM enabled
description: Is PSRAM enabled?
options:
- 'yes'
- 'no'
- "yes"
- "no"
validations:
required: true
- type: input
Expand All @@ -116,8 +116,8 @@ body:
id: Description
attributes:
label: Description
description: Please describe your problem here and expected behaviour
placeholder: ex. Can't connect/weird behaviour/wrong function/missing parameter..
description: Please describe your problem here and expected behavior
placeholder: ex. Can't connect/weird behavior/wrong function/missing parameter..
validations:
required: true
- type: textarea
Expand All @@ -128,7 +128,7 @@ body:
placeholder: ex. Related part of the code to replicate the issue
render: cpp
validations:
required: true
required: true
- type: textarea
id: Debug
attributes:
Expand All @@ -137,11 +137,11 @@ body:
placeholder: Enable Core debug level - Debug on tools menu of Arduino IDE, then put the serial output here.
render: plain
validations:
required: true
required: true
- type: textarea
id: other-remarks
attributes:
label: Other Steps to Reproduce
label: Other Steps to Reproduce
description: Is there any other information you can think of which will help us reproduce this problem? Any additional info can be added as well.
placeholder: ex. I also tried on other OS, HW...it works correctly on that setup.
- type: checkboxes
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ contact_links:
about: Community channel for questions and help
- name: ESP32 Forum - Arduino
url: https://esp32.com/viewforum.php?f=19
about: Official Forum for questions
about: Official Forum for questions
5 changes: 3 additions & 2 deletions .github/scripts/check-cmakelists.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

#
# This script is used in the CI workflow. It checks all non-examples source files in libraries/ and cores/ are listed in
# CMakeLists.txt for the cmake-based IDF component
Expand All @@ -12,10 +13,10 @@ set -e
git submodule update --init --recursive

# find all source files in repo
REPO_SRCS=`find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort`
REPO_SRCS=$(find cores/esp32/ libraries/ -name 'examples' -prune -o -name '*.c' -print -o -name '*.cpp' -print | sort)

# find all source files named in CMakeLists.txt COMPONENT_SRCS
CMAKE_SRCS=`cmake --trace-expand -P CMakeLists.txt 2>&1 | grep set\(srcs | cut -d'(' -f3 | sed 's/ )//' | sed 's/srcs //' | tr ' ;' '\n' | sort`
CMAKE_SRCS=$(cmake --trace-expand -P CMakeLists.txt 2>&1 | grep set\(srcs | cut -d'(' -f3 | sed 's/ )//' | sed 's/srcs //' | tr ' ;' '\n' | sort)

if ! diff -u0 --label "Repo Files" --label "srcs" <(echo "$REPO_SRCS") <(echo "$CMAKE_SRCS"); then
echo "Source files in repo (-) and source files in CMakeLists.txt (+) don't match"
Expand Down
25 changes: 12 additions & 13 deletions .github/scripts/find_all_boards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# Get all boards
boards_array=()

for line in `grep '.tarch=' boards.txt`; do
boards_list=$(grep '.tarch=' boards.txt)

while read -r line; do
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
# skip esp32c2 as we dont build libs for it
if [ "$board_name" == "esp32c2" ]; then
Expand All @@ -12,29 +14,26 @@ for line in `grep '.tarch=' boards.txt`; do
fi
boards_array+=("espressif:esp32:$board_name")
echo "Added 'espressif:esp32:$board_name' to array"
done
done <<< "$boards_list"

# Create JSON like string with all boards found and pass it to env variable
board_count=${#boards_array[@]}
echo "Boards found: $board_count"
echo "BOARD-COUNT=$board_count" >> $GITHUB_ENV
echo "BOARD-COUNT=$board_count" >> "$GITHUB_ENV"

if [ $board_count -gt 0 ]
then
if [ "$board_count" -gt 0 ]; then
json_matrix='['
for board in ${boards_array[@]}
do
for board in "${boards_array[@]}"; do
json_matrix+='"'$board'"'
if [ $board_count -gt 1 ]
then
if [ "$board_count" -gt 1 ]; then
json_matrix+=","
fi
board_count=$(($board_count - 1))
board_count=$((board_count - 1))
done
json_matrix+=']'

echo $json_matrix
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
echo "$json_matrix"
echo "FQBNS=${json_matrix}" >> "$GITHUB_ENV"
else
echo "FQBNS=" >> $GITHUB_ENV
echo "FQBNS=" >> "$GITHUB_ENV"
fi
37 changes: 15 additions & 22 deletions .github/scripts/find_new_boards.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ owner_repository=$1
base_ref=$2

# Download the boards.txt file from the base branch
curl -L -o boards_base.txt https://raw.githubusercontent.com/$owner_repository/$base_ref/boards.txt
curl -L -o boards_base.txt https://raw.githubusercontent.com/"$owner_repository"/"$base_ref"/boards.txt

# Compare boards.txt file in the repo with the modified file from PR
diff=$(diff -u boards_base.txt boards.txt)

# Check if the diff is empty
if [ -z "$diff" ]
then
if [ -z "$diff" ]; then
echo "No changes in boards.txt file"
echo "FQBNS="
exit 0
Expand All @@ -21,23 +20,20 @@ fi
# Extract added or modified lines (lines starting with '+' or '-')
modified_lines=$(echo "$diff" | grep -E '^[+-][^+-]')

# Print the modified lines for debugging
# Print the modified lines for debugging
echo "Modified lines:"
echo "$modified_lines"

boards_array=()
previous_board=""

# Extract board names from the modified lines, and add them to the boards_array
while read -r line
do
while read -r line; do
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1)
# remove + or - from the board name at the beginning
board_name=$(echo "$board_name" | sed 's/^[+-]//')
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]
then
if [ "$board_name" != "$previous_board" ]
then
board_name=${board_name#[-+]}
if [ "$board_name" != "" ] && [ "$board_name" != "+" ] && [ "$board_name" != "-" ] && [ "$board_name" != "esp32_family" ]; then
if [ "$board_name" != "$previous_board" ]; then
boards_array+=("espressif:esp32:$board_name")
previous_board="$board_name"
echo "Added 'espressif:esp32:$board_name' to array"
Expand All @@ -48,22 +44,19 @@ done <<< "$modified_lines"
# Create JSON like string with all boards found and pass it to env variable
board_count=${#boards_array[@]}

if [ $board_count -gt 0 ]
then
if [ "$board_count" -gt 0 ]; then
json_matrix='{"fqbn": ['
for board in ${boards_array[@]}
do
for board in "${boards_array[@]}"; do
json_matrix+='"'$board'"'
if [ $board_count -gt 1 ]
then
if [ "$board_count" -gt 1 ]; then
json_matrix+=","
fi
board_count=$(($board_count - 1))
board_count=$((board_count - 1))
done
json_matrix+=']}'

echo $json_matrix
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV
echo "$json_matrix"
echo "FQBNS=${json_matrix}" >> "$GITHUB_ENV"
else
echo "FQBNS=" >> $GITHUB_ENV
fi
echo "FQBNS=" >> "$GITHUB_ENV"
fi
3 changes: 1 addition & 2 deletions .github/scripts/install-arduino-cli.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

OSBITS=`uname -m`
OSBITS=$(uname -m)
if [[ "$OSTYPE" == "linux"* ]]; then
export OS_IS_LINUX="1"
if [[ "$OSBITS" == "i686" ]]; then
Expand Down Expand Up @@ -49,4 +49,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ] || [ ! -f "$ARDUINO_IDE_PATH/arduino-cli" ]; the
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$ARDUINO_IDE_PATH" sh
fi
fi

14 changes: 7 additions & 7 deletions .github/scripts/install-arduino-core-esp32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
echo "Installing ESP32 Arduino Core ..."
script_init_path="$PWD"
mkdir -p "$ARDUINO_USR_PATH/hardware/espressif"
cd "$ARDUINO_USR_PATH/hardware/espressif"
cd "$ARDUINO_USR_PATH/hardware/espressif" || exit

echo "Installing Python Serial ..."
pip install pyserial > /dev/null
Expand All @@ -15,25 +15,25 @@ if [ ! -d "$ARDUINO_ESP32_PATH" ]; then
pip install requests > /dev/null
fi

if [ ! -z "$GITHUB_REPOSITORY" ]; then
if [ -n "$GITHUB_REPOSITORY" ]; then
echo "Linking Core..."
ln -s $GITHUB_WORKSPACE esp32
ln -s "$GITHUB_WORKSPACE" esp32
else
echo "Cloning Core Repository..."
git clone https://github.com/espressif/arduino-esp32.git esp32 > /dev/null 2>&1
fi

#echo "Updating Submodules ..."
cd esp32
cd esp32 || exit
#git submodule update --init --recursive > /dev/null 2>&1

echo "Installing Platform Tools ..."
if [ "$OS_IS_WINDOWS" == "1" ]; then
cd tools && ./get.exe
cd tools && ./get.exe
else
cd tools && python get.py
cd tools && python get.py
fi
cd $script_init_path
cd "$script_init_path" || exit

echo "ESP32 Arduino has been installed in '$ARDUINO_ESP32_PATH'"
echo ""
Expand Down
3 changes: 1 addition & 2 deletions .github/scripts/install-arduino-ide.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#OSTYPE: 'msys', ARCH: 'x86_64' => win32
#OSTYPE: 'darwin18', ARCH: 'i386' => macos

OSBITS=`uname -m`
OSBITS=$(uname -m)
if [[ "$OSTYPE" == "linux"* ]]; then
export OS_IS_LINUX="1"
ARCHIVE_FORMAT="tar.xz"
Expand Down Expand Up @@ -77,4 +77,3 @@ if [ ! -d "$ARDUINO_IDE_PATH" ]; then
echo "Arduino IDE Installed in '$ARDUINO_IDE_PATH'"
echo ""
fi

Loading

0 comments on commit 078c111

Please sign in to comment.