Skip to content

Commit

Permalink
Merge branch 'master' into feature/rtos-cbuf
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed Feb 2, 2024
2 parents aa8b968 + d14873a commit a0c6ae3
Show file tree
Hide file tree
Showing 337 changed files with 15,004 additions and 3,841 deletions.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
2. [ ] Please provide related links (*eg. Issue which will be closed by this Pull Request*)
3. [ ] Please **update relevant Documentation** if applicable
4. [ ] Please check [Contributing guide](https://docs.espressif.com/projects/arduino-esp32/en/latest/contributing.html)
5. [ ] Please **confirm option to "Allow edits and access to secrets by maintainers"** when opening a Pull Request

*This entire section above can be deleted if all items are checked.*

Expand Down
18 changes: 6 additions & 12 deletions .github/scripts/on-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,16 @@ if [ "$BUILD_PIO" -eq 0 ]; then

SKETCHES_ESP32="\
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
$ARDUINO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino\
$ARDUINO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino\
$ARDUINO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino\
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
"

SKETCHES_ESP32XX="\
$ARDUINO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino\
$ARDUINO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino\
$ARDUINO_ESP32_PATH/libraries/Insights/examples/MinimalDiagnostics/MinimalDiagnostics.ino\
"

build "esp32s3" $FQBN_ESP32S3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32XX
build "esp32s2" $FQBN_ESP32S2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32c3" $FQBN_ESP32C3 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32c6" $FQBN_ESP32C6 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32h2" $FQBN_ESP32H2 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
build "esp32" $FQBN_ESP32 $CHUNK_INDEX $CHUNKS_CNT $SKETCHES_ESP32
else
source ${SCRIPTS_DIR}/install-platformio-esp32.sh
Expand All @@ -98,7 +92,7 @@ else
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFi/examples/WiFiClient/WiFiClient.ino" && \
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/WiFiClientSecure/examples/WiFiClientSecure/WiFiClientSecure.ino" && \
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BluetoothSerial/examples/SerialToSerialBT/SerialToSerialBT.ino" && \
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/BLE_server/BLE_server.ino" && \
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/BLE/examples/Server/Server.ino" && \
build_pio_sketch "$BOARD" "$OPTIONS" "$PLATFORMIO_ESP32_PATH/libraries/ESP32/examples/Camera/CameraWebServer/CameraWebServer.ino"

# Basic sanity testing for other series
Expand Down
16 changes: 16 additions & 0 deletions .github/scripts/sketch_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
# of configuration built in case of a multiconfiguration test.

sketchname=$(basename $sketchdir)

if [[ -n $target ]] && [[ -f "$sketchdir/.skip.$target" ]]; then
echo "Skipping $sketchname for target $target"
exit 0
fi

ARDUINO_CACHE_DIR="$HOME/.arduino/cache.tmp"
if [ -n "$ARDUINO_BUILD_DIR" ]; then
Expand Down Expand Up @@ -159,6 +164,12 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
--build-cache-path "$ARDUINO_CACHE_DIR" \
--build-path "$build_dir" \
$xtra_opts "${sketchdir}"

exit_status=$?
if [ $exit_status -ne 0 ]; then
echo ""ERROR: Compilation failed with error code $exit_status""
exit $exit_status
fi
elif [ -f "$ide_path/arduino-builder" ]; then
echo "Building $sketchname with arduino-builder and FQBN=$currfqbn"
echo "Build path = $build_dir"
Expand All @@ -173,6 +184,11 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
-build-path "$build_dir" \
$xtra_opts "${sketchdir}/${sketchname}.ino"

exit_status=$?
if [ $exit_status -ne 0 ]; then
echo ""ERROR: Compilation failed with error code $exit_status""
exit $exit_status
fi
# $ide_path/arduino-builder -compile -logger=human -core-api-version=10810 \
# -fqbn=\"$currfqbn\" \
# -warnings="all" \
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/tests_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ while [ ! -z "$1" ]; do
shift
done

source ${SCRIPTS_DIR}/install-arduino-ide.sh
#source ${SCRIPTS_DIR}/install-arduino-ide.sh
source ${SCRIPTS_DIR}/install-arduino-cli.sh
source ${SCRIPTS_DIR}/install-arduino-core-esp32.sh

args="-ai $ARDUINO_IDE_PATH -au $ARDUINO_USR_PATH"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/allboards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}

Expand All @@ -33,7 +33,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}

Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.client_payload.branch }}

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/boards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup jq
uses: dcarbone/[email protected]
Expand All @@ -43,7 +43,17 @@ jobs:
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Check if build.board is uppercase
run: |
board_name=$(echo ${{ matrix.fqbn }} | awk -F':' '{print $NF}')
if grep -q "^$board_name.build.board=[A-Z0-9_]*$" boards.txt; then
echo "$board_name.build.board is valid.";
else
echo "Error: $board_name.build.board is not uppercase!";
exit 1;
fi
- name: Compile sketch
uses: P-R-O-C-H-Y/compile-sketches@main
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_py_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ jobs:
all_changed_files: ${{ steps.verify-changed-files.outputs.all_changed_files }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.event.pull_request.head.ref }}
- name: Verify Python Tools Changed
uses: tj-actions/changed-files@v36
uses: tj-actions/changed-files@v41
id: verify-changed-files
with:
fetch_depth: '2'
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
echo "tool $tool was changed"
done
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Python 3.8
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/dangerjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: DangerJS Pull Request linter
on:
pull_request_target:
types: [opened, edited, reopened, synchronize]

permissions:
pull-requests: write
contents: write

jobs:
pull-request-style-linter:
runs-on: ubuntu-latest
steps:
- name: Check out PR head
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: DangerJS pull request linter
uses: espressif/shared-github-dangerjs@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 14 additions & 8 deletions .github/workflows/docs.yml → .github/workflows/docs_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ReadTheDocs CI
name: Documentation Build and Deploy CI

on:
push:
Expand All @@ -7,25 +7,25 @@ on:
- release/*
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
- '.github/workflows/docs_build.yml'
pull_request:
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
- '.github/workflows/docs_build.yml'

jobs:

build-docs:
name: Build ReadTheDocs
name: Build ESP-Docs
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build
Expand All @@ -34,5 +34,11 @@ jobs:
sudo apt install python3-pip python3-setuptools
# GitHub CI installs pip3 and setuptools outside the path.
# Update the path to include them and run.
PATH=/home/runner/.local/bin:$PATH pip3 install --user -r ./docs/requirements.txt
cd ./docs && PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" make html
cd ./docs
PATH=/home/runner/.local/bin:$PATH pip3 install -r requirements.txt --prefer-binary
PATH=/home/runner/.local/bin:$PATH SPHINXOPTS="-W" build-docs -l en
- name: Archive Docs
uses: actions/upload-artifact@v2
with:
name: docs
path: docs
51 changes: 51 additions & 0 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Documentation Build and Production Deploy CI

on:
release:
types: [published]
push:
branches:
- release/*
- master
paths:
- 'docs/**'
- '.github/workflows/docs_deploy.yml'

jobs:

deploy-prod-docs:
name: Deploy Documentation on Production
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Deploy Documentation
env:
# Deploy to production server
# DOCS_BUILD_DIR: "./docs/_build/"
DOCS_DEPLOY_PRIVATEKEY: ${{ secrets.DOCS_KEY }}
DOCS_DEPLOY_PATH: ${{ secrets.DOCS_PATH }}
DOCS_DEPLOY_SERVER: ${{ secrets.DOCS_SERVER }}
DOCS_DEPLOY_SERVER_USER: ${{ secrets.DOCS_USER }}
DOCS_DEPLOY_URL_BASE: ${{ secrets.DOCS_URL }}
run: |
sudo apt update
sudo apt install python3-pip python3-setuptools
source ./docs/utils.sh
add_doc_server_ssh_keys $DOCS_DEPLOY_PRIVATEKEY $DOCS_DEPLOY_SERVER $DOCS_DEPLOY_SERVER_USER
export GIT_VER=$(git describe --always)
echo "PIP install requirements..."
pip3 install --user -r ./docs/requirements.txt
echo "Building the Docs..."
cd ./docs && build-docs -l en
echo "Deploy the Docs..."
export DOCS_BUILD_DIR=$GITHUB_WORKSPACE/docs/
cd $GITHUB_WORKSPACE/docs
deploy-docs
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Build GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Copy Files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
chunks: ${{ steps.gen-chunks.outputs.chunks }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

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

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download ${{matrix.chip}}-${{matrix.chunks}} artifacts
uses: actions/download-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
steps:
# This step makes the contents of the repository available to the workflow
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Compile sketch
uses: P-R-O-C-H-Y/compile-sketches@main
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
steps:
# Check out repository
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
token: ${{ env.GITHUB_TOKEN }}
fetch-depth: '0'
Expand Down
Loading

0 comments on commit a0c6ae3

Please sign in to comment.