Skip to content

Commit 7a7d356

Browse files
authored
Merge branch 'master' into HW-Test-CI-update
2 parents 53565af + af47658 commit 7a7d356

File tree

48 files changed

+1496
-235
lines changed

Some content is hidden

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

48 files changed

+1496
-235
lines changed

.github/workflows/lib.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
[
2+
{
3+
"name": "Adafruit NeoPixel",
4+
"version": "1.10.6",
5+
"exclude_targets": [],
6+
"sketch_path": [
7+
"~/Arduino/libraries/Adafruit_NeoPixel/examples/strandtest/strandtest.ino"
8+
]
9+
},
10+
{
11+
"name": "ArduinoBLE",
12+
"exclude_targets": [
13+
"esp32s2"
14+
],
15+
"sketch_path": [
16+
"~/Arduino/libraries/ArduinoBLE/examples/Central/Scan/Scan.ino"
17+
]
18+
},
19+
{
20+
"name": "ESP32Servo",
21+
"exclude_targets": [],
22+
"sketch_path": [
23+
"~/Arduino/libraries/ESP32Servo/examples/Knob/Knob.ino",
24+
"~/Arduino/libraries/ESP32Servo/examples/Sweep/Sweep.ino",
25+
"~/Arduino/libraries/ESP32Servo/examples/PWMExample/PWMExample.ino",
26+
"~/Arduino/libraries/ESP32Servo/examples/Multiple-Servo-Example-Arduino/Multiple-Servo-Example-Arduino.ino"
27+
]
28+
},
29+
{
30+
"source-url": "https://github.com/me-no-dev/ESPAsyncWebServer.git",
31+
"required-libs": [
32+
{"source-url": "https://github.com/me-no-dev/AsyncTCP.git"}
33+
],
34+
"exclude_targets": [],
35+
"sketch_path": [
36+
"~/Arduino/libraries/ESPAsyncWebServer/examples/CaptivePortal/CaptivePortal.ino",
37+
"~/Arduino/libraries/ESPAsyncWebServer/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino",
38+
"~/Arduino/libraries/ESPAsyncWebServer/examples/regex_patterns/regex_patterns.ino",
39+
"~/Arduino/libraries/ESPAsyncWebServer/examples/simple_server/simple_server.ino"
40+
]
41+
},
42+
{
43+
"name": "FastLED",
44+
"exclude_targets": [],
45+
"sketch_path": [
46+
"~/Arduino/libraries/FastLED/examples/Blink/Blink.ino"
47+
]
48+
},
49+
{
50+
"name": "IRremote",
51+
"exclude_targets": [],
52+
"sketch_path": [
53+
"~/Arduino/libraries/IRremote/examples/SendDemo/SendDemo.ino"
54+
]
55+
}
56+
]

.github/workflows/lib.yml

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
name: External Libraries Test
2+
3+
# The workflow will run on schedule and labeled pull requests
4+
on:
5+
pull_request:
6+
types: [opened, reopened, synchronize, labeled]
7+
8+
# Schedule weekly builds on every Sunday at 4 am
9+
schedule:
10+
- cron: '0 4 * * SUN'
11+
12+
env:
13+
# It's convenient to set variables for values used multiple times in the workflow
14+
SKETCHES_REPORTS_PATH: libraries-report
15+
SKETCHES_REPORTS_ARTIFACT_NAME: libraries-report
16+
RESULT_LIBRARY_TEST_FILE: LIBRARIES_TEST.md
17+
JSON_LIBRARY_LIST_FILE: .github/workflows/lib.json
18+
jobs:
19+
compile-sketch:
20+
if: |
21+
contains(github.event.pull_request.labels.*.name, 'lib_test') ||
22+
(github.event_name == 'schedule' && github.repository == 'espressif/arduino-esp32')
23+
runs-on: ubuntu-latest
24+
25+
env:
26+
REPOSITORY: |
27+
- source-path: '.'
28+
name: "espressif:esp32"
29+
30+
strategy:
31+
matrix:
32+
target:
33+
- esp32
34+
- esp32s2
35+
- esp32c3
36+
- esp32s3
37+
38+
include:
39+
- target: esp32
40+
fqbn: espressif:esp32:esp32
41+
- target: esp32s2
42+
fqbn: espressif:esp32:esp32s2
43+
- target: esp32c3
44+
fqbn: espressif:esp32:esp32c3
45+
- target: esp32s3
46+
fqbn: espressif:esp32:esp32s3
47+
48+
49+
steps:
50+
# This step makes the contents of the repository available to the workflow
51+
- name: Checkout repository
52+
uses: actions/checkout@v3
53+
54+
- name: Compile sketch
55+
uses: P-R-O-C-H-Y/compile-sketches@main
56+
with:
57+
platforms: |
58+
${{ env.REPOSITORY }}
59+
target: ${{ matrix.target }}
60+
fqbn: ${{ matrix.fqbn }}
61+
use-json-file: true
62+
json-path: ${{ env.JSON_LIBRARY_LIST_FILE }}
63+
enable-deltas-report: true
64+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
65+
enable-warnings-report: true
66+
cli-compile-flags: |
67+
- --warnings="all"
68+
69+
- name: Upload artifact
70+
uses: actions/upload-artifact@v3
71+
with:
72+
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
73+
path: ${{ env.SKETCHES_REPORTS_PATH }}
74+
75+
report-comment:
76+
needs: compile-sketch # Wait for the compile job to finish to get the data for the report
77+
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
78+
runs-on: ubuntu-latest
79+
steps:
80+
# This step is needed to get the size data produced by the compile jobs
81+
- name: Download sketches reports artifact
82+
uses: actions/download-artifact@v3
83+
with:
84+
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
85+
path: ${{ env.SKETCHES_REPORTS_PATH }}
86+
87+
- name: Report results
88+
uses: P-R-O-C-H-Y/report-size-deltas@main
89+
with:
90+
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
91+
92+
report-to-file:
93+
needs: compile-sketch # Wait for the compile job to finish to get the data for the report
94+
if: github.event_name == 'schedule' # Only run the job when the workflow is triggered by a schedule
95+
runs-on: ubuntu-latest
96+
steps:
97+
# Check out repository
98+
- name: Checkout repository
99+
uses: actions/checkout@v3
100+
101+
# This step is needed to get the size data produced by the compile jobs
102+
- name: Download sketches reports artifact
103+
uses: actions/download-artifact@v3
104+
with:
105+
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
106+
path: ${{ env.SKETCHES_REPORTS_PATH }}
107+
108+
- name: Report results
109+
uses: P-R-O-C-H-Y/report-size-deltas@main
110+
with:
111+
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
112+
destination-file: ${{ env.RESULT_LIBRARY_TEST_FILE }}
113+
114+
- name: Append file with action URL
115+
uses: DamianReeves/write-file-action@master
116+
with:
117+
path: ${{ env.RESULT_LIBRARY_TEST_FILE }}
118+
contents: |
119+
/ [GitHub Action Link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
120+
write-mode: append
121+
122+
- name: Push to github repo
123+
run: |
124+
git config user.name github-actions
125+
git config user.email [email protected]
126+
git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
127+
git commit -m "Generated External Libraries Test Results"
128+
git push

LIBRARIES_TEST.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Empty file

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Arduino core for the ESP32, ESP32-S2, ESP32-S3 and ESP32-C3
22

33
![Build Status](https://github.com/espressif/arduino-esp32/workflows/ESP32%20Arduino%20CI/badge.svg) [![Documentation Status](https://readthedocs.com/projects/espressif-arduino-esp32/badge/?version=latest)](https://docs.espressif.com/projects/arduino-esp32/en/latest/?badge=latest)
4+
[![External Libraries Test](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml/badge.svg?branch=master&event=schedule)](https://github.com/espressif/arduino-esp32/actions/workflows/lib.yml?link=http://https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md)
45

56
### Need help or have a question? Join the chat at [Gitter](https://gitter.im/espressif/arduino-esp32) or [open a new Discussion](https://github.com/espressif/arduino-esp32/discussions)
67

@@ -51,6 +52,11 @@ Before reporting an issue, make sure you've searched for similar one that was al
5152

5253
Finally, if you are sure no one else had the issue, follow the **Issue template** or **Feature request template** while reporting any [new Issue](https://github.com/espressif/arduino-esp32/issues/new/choose).
5354

55+
### External libraries compilation test
56+
57+
We have set-up CI testing for external libraries for ESP32 Arduino core. You can check test results in the file [LIBRARIES_TEST](https://github.com/espressif/arduino-esp32/blob/master/LIBRARIES_TEST.md).
58+
For more information and how to add your library to the test see [external library testing](https://docs.espressif.com/projects/arduino-esp32/en/latest/external_library_test.html) in the documentation.
59+
5460
### Contributing
5561

5662
We welcome contributions to the Arduino ESP32 project!

0 commit comments

Comments
 (0)