forked from espressif/arduino-esp32
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'espressif:release/v2.x' into release/v2.x
- Loading branch information
Showing
17 changed files
with
212 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
# Get all boards | ||
boards_array=() | ||
|
||
for line in `grep '.tarch=' boards.txt`; do | ||
board_name=$(echo "$line" | cut -d '.' -f1 | cut -d '#' -f1) | ||
boards_array+=("espressif:esp32:$board_name") | ||
echo "Added 'espressif:esp32:$board_name' to array" | ||
done | ||
|
||
# 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 | ||
|
||
if [ $board_count -gt 0 ] | ||
then | ||
json_matrix='[' | ||
for board in ${boards_array[@]} | ||
do | ||
json_matrix+='"'$board'"' | ||
if [ $board_count -gt 1 ] | ||
then | ||
json_matrix+="," | ||
fi | ||
board_count=$(($board_count - 1)) | ||
done | ||
json_matrix+=']' | ||
|
||
echo $json_matrix | ||
echo "FQBNS=${json_matrix}" >> $GITHUB_ENV | ||
else | ||
echo "FQBNS=" >> $GITHUB_ENV | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Boards Test - Remote trigger | ||
|
||
# The workflow will run on remote dispath with event-type set to "test-boards" | ||
on: | ||
repository_dispatch: | ||
types: [test-boards] | ||
|
||
jobs: | ||
find-boards: | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
fqbns: ${{ env.FQBNS }} | ||
board-count: ${{ env.BOARD-COUNT }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.client_payload.branch }} | ||
|
||
- name: Get boards fqbns | ||
run: | ||
bash .github/scripts/find_all_boards.sh | ||
|
||
setup-chunks: | ||
needs: find-boards | ||
runs-on: ubuntu-latest | ||
if: needs.find-boards.outputs.fqbns != '' | ||
|
||
outputs: | ||
test-chunks: ${{ steps['set-test-chunks'].outputs['test-chunks'] }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: npm install | ||
- name: Setup jq | ||
uses: dcarbone/[email protected] | ||
|
||
- id: set-test-chunks | ||
name: Set Chunks | ||
run: | ||
echo "test-chunks<<EOF" >> $GITHUB_OUTPUT | ||
|
||
echo "$( jq -nc '${{ needs.find-boards.outputs.fqbns }} | [_nwise( ${{ needs.find-boards.outputs.board-count }}/15 | ceil)]')" >> $GITHUB_OUTPUT | ||
|
||
echo "EOF" >> $GITHUB_OUTPUT | ||
|
||
test-boards: | ||
needs: setup-chunks | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
REPOSITORY: | | ||
- source-path: '.' | ||
name: "espressif:esp32" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chunk: ${{ fromJSON(needs.setup-chunks.outputs['test-chunks']) }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Echo FQBNS to file | ||
run: | ||
echo "$FQBN" > fqbns.json | ||
env: | ||
FQBN: ${{ toJSON(matrix.chunk) }} | ||
|
||
- name: Compile sketch | ||
uses: P-R-O-C-H-Y/compile-sketches@main | ||
with: | ||
platforms: | | ||
${{ env.REPOSITORY }} | ||
multiple-fqbn: true | ||
multiple-fqbn-path: "fqbns.json" | ||
use-json-file: false | ||
enable-deltas-report: false | ||
enable-warnings-report: false | ||
cli-compile-flags: | | ||
- --warnings="all" | ||
sketch-paths: | ||
"- ./libraries/ESP32/examples/CI/CIBoardsTest/CIBoardsTest.ino" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters