Skip to content

Commit 855da42

Browse files
authored
Merge branch 'master' into release/v3.1.x
2 parents 22fb402 + 4e9eb35 commit 855da42

File tree

93 files changed

+1070
-237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1070
-237
lines changed

Diff for: .github/scripts/on-push.sh

+12-20
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ export ARDUINO_BUILD_DIR="$HOME/.arduino/build.tmp"
66

77
function build(){
88
local target=$1
9-
local fqbn=$2
10-
local chunk_index=$3
11-
local chunks_cnt=$4
12-
local build_log=$5
13-
local sketches_file=$6
14-
shift; shift; shift; shift; shift; shift;
9+
local chunk_index=$2
10+
local chunks_cnt=$3
11+
local build_log=$4
12+
local sketches_file=$5
13+
shift; shift; shift; shift; shift;
1514
local sketches=$*
1615

1716
local BUILD_SKETCH="${SCRIPTS_DIR}/sketch_utils.sh build"
1817
local BUILD_SKETCHES="${SCRIPTS_DIR}/sketch_utils.sh chunk_build"
1918

2019
local args="-ai $ARDUINO_IDE_PATH -au $ARDUINO_USR_PATH"
2120

22-
args+=" -t $target -fqbn $fqbn"
21+
args+=" -t $target"
2322

2423
if [ "$OS_IS_LINUX" == "1" ]; then
2524
args+=" -p $ARDUINO_ESP32_PATH/libraries"
@@ -77,13 +76,6 @@ if [ "$BUILD_PIO" -eq 0 ]; then
7776
source ${SCRIPTS_DIR}/install-arduino-cli.sh
7877
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh
7978

80-
FQBN_ESP32="espressif:esp32:esp32:PSRAM=enabled,PartitionScheme=huge_app"
81-
FQBN_ESP32S2="espressif:esp32:esp32s2:PSRAM=enabled,PartitionScheme=huge_app"
82-
FQBN_ESP32S3="espressif:esp32:esp32s3:PSRAM=opi,USBMode=default,PartitionScheme=huge_app"
83-
FQBN_ESP32C3="espressif:esp32:esp32c3:PartitionScheme=huge_app"
84-
FQBN_ESP32C6="espressif:esp32:esp32c6:PartitionScheme=huge_app"
85-
FQBN_ESP32H2="espressif:esp32:esp32h2:PartitionScheme=huge_app"
86-
8779
SKETCHES_ESP32="\
8880
$ARDUINO_ESP32_PATH/libraries/NetworkClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
8981
$ARDUINO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino\
@@ -99,12 +91,12 @@ if [ "$BUILD_PIO" -eq 0 ]; then
9991
fi
10092

10193
#build sketches for different targets
102-
build "esp32s3" $FQBN_ESP32S3 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
103-
build "esp32s2" $FQBN_ESP32S2 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
104-
build "esp32c3" $FQBN_ESP32C3 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
105-
build "esp32c6" $FQBN_ESP32C6 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
106-
build "esp32h2" $FQBN_ESP32H2 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
107-
build "esp32" $FQBN_ESP32 "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
94+
build "esp32s3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
95+
build "esp32s2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
96+
build "esp32c3" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
97+
build "esp32c6" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
98+
build "esp32h2" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
99+
build "esp32" "$CHUNK_INDEX" "$CHUNKS_CNT" "$BUILD_LOG" "$SKETCHES_FILE" "$SKETCHES_ESP32"
108100

109101
if [ "$BUILD_LOG" -eq 1 ]; then
110102
#remove last comma from the last JSON object

Diff for: .github/scripts/sketch_utils.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -416,10 +416,17 @@ function build_sketches(){ # build_sketches <ide_path> <user_path> <target> <pat
416416
echo "Start Sketch: $start_num"
417417
echo "End Sketch : $end_index"
418418

419+
#if fqbn is not passed then set it to default for compilation log
420+
if [ -z $fqbn ]; then
421+
log_fqbn="espressif:esp32:$target"
422+
else
423+
log_fqbn=$fqbn
424+
fi
425+
419426
sizes_file="$GITHUB_WORKSPACE/cli_compile_$chunk_index.json"
420427
if [ $log_compilation ]; then
421428
#echo board,target and start of sketches to sizes_file json
422-
echo "{ \"board\": \"$fqbn\",
429+
echo "{ \"board\": \"$log_fqbn\",
423430
\"target\": \"$target\",
424431
\"sketches\": [" >> "$sizes_file"
425432
fi

Diff for: .github/workflows/docs_deploy.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: Documentation Build and Production Deploy CI
22

33
on:
4-
release:
5-
types: [published]
4+
workflow_run:
5+
workflows: ["ESP32 Arduino Release"]
6+
types:
7+
- completed
68
push:
79
branches:
810
- release/v2.x
@@ -12,14 +14,18 @@ on:
1214
- '.github/workflows/docs_deploy.yml'
1315

1416
jobs:
15-
1617
deploy-prod-docs:
1718
name: Deploy Documentation on Production
1819
runs-on: ubuntu-22.04
1920
defaults:
2021
run:
2122
shell: bash
2223
steps:
24+
- name: Check if release workflow is successful
25+
if: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.conclusion != 'success' }}
26+
run: |
27+
echo "Release workflow failed. Exiting..."
28+
exit 1
2329
- uses: actions/checkout@v4
2430
with:
2531
submodules: true

Diff for: .github/workflows/upload-idf-component.yml

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,35 @@
11
name: Push components to https://components.espressif.com
2+
23
on:
3-
push:
4-
tags:
5-
- '*'
4+
workflow_run:
5+
workflows: ["ESP32 Arduino Release"]
6+
types:
7+
- completed
8+
69
jobs:
710
upload_components:
811
runs-on: ubuntu-latest
912
steps:
13+
- name: Get the release tag
14+
run: |
15+
if [ "${{ github.event.workflow_run.conclusion }}" != "success" ]; then
16+
echo "Release workflow failed. Exiting..."
17+
exit 1
18+
fi
19+
20+
branch=${{ github.event.workflow_run.head_branch }}
21+
if [[ $branch == refs/tags/* ]]; then
22+
tag="${branch#refs/tags/}"
23+
elif [[ $branch =~ ^[0-9]+\.[0-9]+\.[0-9]+.*$ ]]; then
24+
tag=$branch
25+
else
26+
echo "Tag not found in $branch. Exiting..."
27+
exit 1
28+
fi
29+
30+
echo "Tag: $tag"
31+
echo "RELEASE_TAG=$tag" >> $GITHUB_ENV
32+
1033
- uses: actions/checkout@v4
1134
with:
1235
submodules: "recursive"
@@ -15,6 +38,6 @@ jobs:
1538
uses: espressif/upload-components-ci-action@v1
1639
with:
1740
name: arduino-esp32
18-
version: ${{ github.ref_name }}
41+
version: ${{ env.RELEASE_TAG }}
1942
namespace: espressif
2043
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}

Diff for: .pre-commit-config.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ repos:
2525
args: [--fix=lf]
2626
- id: trailing-whitespace
2727
args: [--markdown-linebreak-ext=md]
28+
- id: pretty-format-json
29+
args: [--autofix]
30+
types_or: [json]
31+
exclude: |
32+
(?x)(
33+
diagram\..*\.json$|
34+
package\.json$|
35+
^package\/.*$
36+
)
2837
- repo: https://github.com/codespell-project/codespell
2938
rev: "v2.3.0"
3039
hooks:

0 commit comments

Comments
 (0)