Skip to content

Commit 0725b16

Browse files
authored
Merge branch 'espressif:master' into master
2 parents 4efc5ca + bc769fd commit 0725b16

File tree

321 files changed

+16014
-4109
lines changed

Some content is hidden

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

321 files changed

+16014
-4109
lines changed

.github/scripts/on-release.sh

+36-13
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ echo "Event: $GITHUB_EVENT_NAME, Repo: $GITHUB_REPOSITORY, Path: $GITHUB_WORKSPA
3535
echo "Action: $action, Branch: $RELEASE_BRANCH, ID: $RELEASE_ID"
3636
echo "Tag: $RELEASE_TAG, Draft: $draft, Pre-Release: $RELEASE_PRE"
3737

38+
# Try extracting something like a JSON with a "boards" array/element and "vendor" fields
39+
BOARDS=`echo $RELEASE_BODY | grep -Pzo '(?s){.*}' | jq -r '.boards[]? // .boards? // empty' | xargs echo -n 2>/dev/null`
40+
VENDOR=`echo $RELEASE_BODY | grep -Pzo '(?s){.*}' | jq -r '.vendor? // empty' | xargs echo -n 2>/dev/null`
41+
if ! [ -z "${BOARDS}" ]; then echo "Releasing board(s): $BOARDS" ; fi
42+
if ! [ -z "${VENDOR}" ]; then echo "Setting packager: $VENDOR" ; fi
43+
3844
function get_file_size(){
3945
local file="$1"
4046
if [[ "$OSTYPE" == "darwin"* ]]; then
@@ -170,12 +176,26 @@ mkdir -p "$PKG_DIR/tools"
170176

171177
# Copy all core files to the package folder
172178
echo "Copying files for packaging ..."
173-
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
179+
if [ -z "${BOARDS}" ]; then
180+
# Copy all variants
181+
cp -f "$GITHUB_WORKSPACE/boards.txt" "$PKG_DIR/"
182+
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
183+
else
184+
# Remove all entries not starting with any board code or "menu." from boards.txt
185+
cat "$GITHUB_WORKSPACE/boards.txt" | grep "^menu\." > "$PKG_DIR/boards.txt"
186+
for board in ${BOARDS} ; do
187+
cat "$GITHUB_WORKSPACE/boards.txt" | grep "^${board}\." >> "$PKG_DIR/boards.txt"
188+
done
189+
# Copy only relevant variant files
190+
mkdir "$PKG_DIR/variants/"
191+
for variant in `cat ${PKG_DIR}/boards.txt | grep "\.variant=" | cut -d= -f2` ; do
192+
cp -Rf "$GITHUB_WORKSPACE/variants/${variant}" "$PKG_DIR/variants/"
193+
done
194+
fi
174195
cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
175196
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
176197
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
177198
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
178-
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
179199
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
180200
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
181201
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
@@ -201,19 +221,22 @@ RVTC_NEW_NAME="esp-rv32"
201221
echo "Generating platform.txt..."
202222
cat "$GITHUB_WORKSPACE/platform.txt" | \
203223
sed "s/version=.*/version=$RELEASE_TAG/g" | \
204-
sed 's/tools.esp32-arduino-libs.path={runtime.platform.path}\/tools\/esp32-arduino-libs/tools.esp32-arduino-libs.path=\{runtime.tools.esp32-arduino-libs.path\}/g' | \
205-
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
206-
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
207-
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
208-
sed 's/tools.xtensa-esp-elf-gdb.path={runtime.platform.path}\/tools\/xtensa-esp-elf-gdb/tools.xtensa-esp-elf-gdb.path=\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
209-
sed "s/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\\/tools\\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g" | \
210-
sed 's/tools.riscv32-esp-elf-gdb.path={runtime.platform.path}\/tools\/riscv32-esp-elf-gdb/tools.riscv32-esp-elf-gdb.path=\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
211-
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' | \
212-
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g' | \
213-
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g' | \
214-
sed 's/debug.server.openocd.scripts_dir.windows={runtime.platform.path}\\tools\\openocd-esp32\\share\\openocd\\scripts\\/debug.server.openocd.scripts_dir.windows=\{runtime.tools.openocd-esp32.path\}\\share\\openocd\\scripts\\/g' \
224+
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \
225+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
226+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
227+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
228+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
229+
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
230+
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g" | \
231+
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g' | \
232+
sed 's/{runtime\.platform\.path}.tools.openocd-esp32/\{runtime.tools.openocd-esp32.path\}/g' \
215233
> "$PKG_DIR/platform.txt"
216234

235+
if ! [ -z ${VENDOR} ]; then
236+
# Append vendor name to platform.txt to create a separate section
237+
sed -i "/^name=.*/s/$/ ($VENDOR)/" "$PKG_DIR/platform.txt"
238+
fi
239+
217240
# Add header with version information
218241
echo "Generating core_version.h ..."
219242
ver_define=`echo $RELEASE_TAG | tr "[:lower:].\055" "[:upper:]_"`

.github/workflows/allboards.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
ref: ${{ github.event.client_payload.branch }}
2121

@@ -33,7 +33,7 @@ jobs:
3333

3434
steps:
3535
- name: Checkout repository
36-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3737
with:
3838
ref: ${{ github.event.client_payload.branch }}
3939

@@ -66,7 +66,7 @@ jobs:
6666

6767
steps:
6868
- name: Checkout repository
69-
uses: actions/checkout@v3
69+
uses: actions/checkout@v4
7070
with:
7171
ref: ${{ github.event.client_payload.branch }}
7272

.github/workflows/boards.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
# This step makes the contents of the repository available to the workflow
2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222

2323
- name: Setup jq
2424
uses: dcarbone/[email protected]
@@ -43,7 +43,7 @@ jobs:
4343
steps:
4444
# This step makes the contents of the repository available to the workflow
4545
- name: Checkout repository
46-
uses: actions/checkout@v3
46+
uses: actions/checkout@v4
4747

4848
- name: Check if build.board is uppercase
4949
run: |

.github/workflows/build_py_tools.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
all_changed_files: ${{ steps.verify-changed-files.outputs.all_changed_files }}
1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 2
2323
ref: ${{ github.event.pull_request.head.ref }}
2424
- name: Verify Python Tools Changed
25-
uses: tj-actions/changed-files@v36
25+
uses: tj-actions/changed-files@v41
2626
id: verify-changed-files
2727
with:
2828
fetch_depth: '2'
@@ -87,7 +87,7 @@ jobs:
8787
echo "tool $tool was changed"
8888
done
8989
- name: Checkout repository
90-
uses: actions/checkout@v3
90+
uses: actions/checkout@v4
9191
with:
9292
ref: ${{ github.event.pull_request.head.ref }}
9393
- name: Set up Python 3.8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ReadTheDocs CI
1+
name: Documentation Build and Deploy CI
22

33
on:
44
push:
@@ -7,25 +7,25 @@ on:
77
- release/*
88
paths:
99
- 'docs/**'
10-
- '.github/workflows/docs.yml'
10+
- '.github/workflows/docs_build.yml'
1111
pull_request:
1212
paths:
1313
- 'docs/**'
14-
- '.github/workflows/docs.yml'
14+
- '.github/workflows/docs_build.yml'
1515

1616
jobs:
1717

1818
build-docs:
19-
name: Build ReadTheDocs
19+
name: Build ESP-Docs
2020
runs-on: ubuntu-22.04
2121
defaults:
2222
run:
2323
shell: bash
2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626
with:
2727
submodules: true
28-
- uses: actions/setup-python@v4
28+
- uses: actions/setup-python@v5
2929
with:
3030
python-version: '3.10'
3131
- name: Build
@@ -34,5 +34,11 @@ jobs:
3434
sudo apt install python3-pip python3-setuptools
3535
# GitHub CI installs pip3 and setuptools outside the path.
3636
# Update the path to include them and run.
37-
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt
38-
cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html
37+
cd ./docs
38+
PATH=/home/runner/.local/bin:$PATH pip3 install -r requirements.txt --prefer-binary
39+
PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" build-docs -l en
40+
- name: Archive Docs
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: docs
44+
path: docs

.github/workflows/docs_deploy.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Documentation Build and Production Deploy CI
2+
3+
on:
4+
release:
5+
types: [published]
6+
push:
7+
branches:
8+
- release/*
9+
- master
10+
paths:
11+
- 'docs/**'
12+
- '.github/workflows/docs_deploy.yml'
13+
14+
jobs:
15+
16+
deploy-prod-docs:
17+
name: Deploy Documentation on Production
18+
runs-on: ubuntu-22.04
19+
defaults:
20+
run:
21+
shell: bash
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: true
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.10'
29+
- name: Deploy Documentation
30+
env:
31+
# Deploy to production server
32+
# DOCS_BUILD_DIR: "./docs/_build/"
33+
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
34+
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
35+
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
36+
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
37+
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
38+
run: |
39+
sudo apt update
40+
sudo apt install python3-pip python3-setuptools
41+
source ./docs/utils.sh
42+
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
43+
export GIT_VER=$(git describe --always)
44+
echo "PIP install requirements..."
45+
pip3 install --user -r ./docs/requirements.txt
46+
echo "Building the Docs..."
47+
cd ./docs && build-docs -l en
48+
echo "Deploy the Docs..."
49+
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/
50+
cd $GITHUB_WORKSPACE/docs
51+
deploy-docs

.github/workflows/gh-pages.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
name: Build GitHub Pages
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- uses: actions/checkout@v4
2020
- name: Copy Files
2121
env:
2222
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/hil.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
chunks: ${{ steps.gen-chunks.outputs.chunks }}
2626
steps:
2727
- name: Checkout Repository
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: Generate Chunks matrix
3131
id: gen-chunks
@@ -51,7 +51,7 @@ jobs:
5151
chunks: ${{fromJson(needs.gen_chunks.outputs.chunks)}}
5252
steps:
5353
- name: Checkout Repository
54-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
5555
- name: Build sketches
5656
run: |
5757
bash .github/scripts/tests_build.sh -c -t ${{matrix.chip}} -i ${{matrix.chunks}} -m ${{env.MAX_CHUNKS}}
@@ -78,7 +78,7 @@ jobs:
7878

7979
steps:
8080
- name: Checkout repository
81-
uses: actions/checkout@v3
81+
uses: actions/checkout@v4
8282

8383
- name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts
8484
uses: actions/download-artifact@v3

.github/workflows/lib.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
steps:
5858
# This step makes the contents of the repository available to the workflow
5959
- name: Checkout repository
60-
uses: actions/checkout@v3
60+
uses: actions/checkout@v4
6161

6262
- name: Compile sketch
6363
uses: P-R-O-C-H-Y/compile-sketches@main
@@ -87,7 +87,7 @@ jobs:
8787
steps:
8888
# Check out repository
8989
- name: Checkout repository
90-
uses: actions/checkout@v3
90+
uses: actions/checkout@v4
9191
with:
9292
token: ${{ env.GITHUB_TOKEN }}
9393
fetch-depth: '0'

.github/workflows/push.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Check cmake file
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- run: bash ./.github/scripts/check-cmakelists.sh
2323

2424
# Ubuntu
@@ -31,13 +31,13 @@ jobs:
3131
chunk: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
3232

3333
steps:
34-
- uses: actions/checkout@v3
35-
- uses: actions/setup-python@v4
34+
- uses: actions/checkout@v4
35+
- uses: actions/setup-python@v5
3636
with:
3737
python-version: '3.x'
3838
- name: Cache tools
3939
id: cache-linux
40-
uses: actions/cache@v3
40+
uses: actions/cache@v4
4141
with:
4242
path: |
4343
./tools/dist
@@ -58,8 +58,8 @@ jobs:
5858
os: [windows-latest, macOS-latest]
5959

6060
steps:
61-
- uses: actions/checkout@v3
62-
- uses: actions/setup-python@v4
61+
- uses: actions/checkout@v4
62+
- uses: actions/setup-python@v5
6363
with:
6464
python-version: '3.x'
6565
- name: Build Sketches
@@ -75,8 +75,8 @@ jobs:
7575
os: [ubuntu-latest, windows-latest, macOS-latest]
7676

7777
steps:
78-
- uses: actions/checkout@v3
79-
- uses: actions/setup-python@v4
78+
- uses: actions/checkout@v4
79+
- uses: actions/setup-python@v5
8080
with:
8181
python-version: '3.x'
8282
- name: Build Sketches
@@ -97,7 +97,7 @@ jobs:
9797
container: espressif/idf:${{ matrix.idf_ver }}
9898
steps:
9999
- name: Check out arduino-esp32 as a component
100-
uses: actions/checkout@v3
100+
uses: actions/checkout@v4
101101
with:
102102
submodules: recursive
103103
path: components/arduino-esp32

.github/workflows/release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
16-
- uses: actions/setup-python@v4
16+
- uses: actions/setup-python@v5
1717
with:
1818
python-version: '3.x'
1919
- name: Build Release

.github/workflows/upload-idf-component.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
upload_components:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
with:
1212
submodules: "recursive"
1313

0 commit comments

Comments
 (0)