-
-
Notifications
You must be signed in to change notification settings - Fork 64
Add CI workflows #81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add CI workflows #81
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
7e4c423
Add workflow for CI
giulcioffi 48cdeda
FONAtest search path
giulcioffi b2ea934
Install latest version of libraries
giulcioffi c654b79
Remove 'size-report-sketch' entry and 'Save memory usage change repor…
giulcioffi 9497c8c
Add board target Arduino Nano Every
giulcioffi cfd3a8d
Add step to download basic examples + add UNIVERSAL paths
giulcioffi ce359ad
Add step to remove incompatible basic examples
giulcioffi d68d967
Add most used libraries + examples
giulcioffi 95445d2
Add step to save memory usage change
giulcioffi 9f728df
Remove board type specific customization
giulcioffi 39e1395
Remove condition to execute report artifact only with a PR
giulcioffi fb15914
Use list format also for sketch paths
giulcioffi 72cd7c0
Run workflow only after modification of the workflow or of a file rel…
giulcioffi 945db37
Remove not necessary libraries and variables
giulcioffi 964531a
Split remove commands + add comments
giulcioffi c9587a2
Compile WiFiNINA library
giulcioffi a18eccc
Reinsert types to compile WiFiNINA examples only for Uno WiFi Rev2
giulcioffi 283703a
Try to compile all the libraries examples
giulcioffi 0eb5c64
Remove incompatible examples
giulcioffi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,152 @@ | ||
name: Compile Examples | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/compile-examples.yml" | ||
- "cores/**" | ||
- "libraries/**" | ||
- "variants/**" | ||
- "boards.txt" | ||
- "platform.txt" | ||
push: | ||
paths: | ||
- ".github/workflows/compile-examples.yml" | ||
- "cores/**" | ||
- "libraries/**" | ||
- "variants/**" | ||
- "boards.txt" | ||
- "platform.txt" | ||
|
||
jobs: | ||
compile-test: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
# sketch paths to compile (recursive) for all boards | ||
UNIVERSAL_SKETCH_PATHS: | | ||
- extras/examples | ||
- libraries/Wire | ||
- libraries/SPI | ||
- libraries/SoftwareSerial | ||
- libraries/EEPROM | ||
- ~/Arduino/libraries/Servo/examples | ||
- ~/Arduino/libraries/LiquidCrystal/examples | ||
- ~/Arduino/libraries/MFRC522/examples | ||
- ~/Arduino/libraries/Ethernet/examples | ||
- ~/Arduino/libraries/Adafruit_MQTT_Library/examples/mqtt_ethernet | ||
- ~/Arduino/libraries/ArduinoBearSSL/examples/SHA1 | ||
- ~/Arduino/libraries/ArduinoBearSSL/examples/SHA256 | ||
- ~/Arduino/libraries/Arduino_LSM9DS1/examples | ||
- ~/Arduino/libraries/SD/examples | ||
- ~/Arduino/libraries/Arduino_JSON/examples | ||
- ~/Arduino/libraries/TFT/examples/Arduino/TFTBitmapLogo | ||
- ~/Arduino/libraries/TFT/examples/Arduino/TFTColorPicker | ||
- ~/Arduino/libraries/TFT/examples/Arduino/TFTDisplayText | ||
- ~/Arduino/libraries/TFT/examples/Arduino/TFTEtchASketch | ||
- ~/Arduino/libraries/TFT/examples/Arduino/TFTGraph | ||
- ~/Arduino/libraries/TFT/examples/Arduino/TFTPong | ||
- ~/Arduino/libraries/Arduino_CRC32/examples | ||
- ~/Arduino/libraries/Arduino_LSM6DS3/examples | ||
- ~/Arduino/libraries/Stepper/examples | ||
- ~/Arduino/libraries/Arduino_HTS221/examples | ||
- ~/Arduino/libraries/Arduino_DebugUtils/examples | ||
- ~/Arduino/libraries/Arduino_LPS22HB/examples | ||
- ~/Arduino/libraries/ArduinoDMX/examples | ||
- ~/Arduino/libraries/ArduinoRS485/examples | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
board: [ | ||
{"fqbn": "arduino:megaavr:uno2018:mode=on", "type": "UnoWiFiRev2"}, | ||
{"fqbn": "arduino:megaavr:uno2018:mode=off", "type": "UnoWiFiRev2"}, | ||
{"fqbn": "arduino:megaavr:nona4809", "type": "NanoEvery"} | ||
] | ||
|
||
# make board type-specific customizations to the matrix jobs | ||
include: | ||
# Uno WiFi Rev2 | ||
- board: | ||
type: "UnoWiFiRev2" | ||
additional-sketch-paths: | | ||
- ~/Arduino/libraries/WiFiNINA/examples | ||
- ~/Arduino/libraries/ArduinoMqttClient/examples | ||
- ~/Arduino/libraries/Arduino_OAuth/examples/Tweeter | ||
# Nano Every | ||
- board: | ||
type: "NanoEvery" | ||
additional-sketch-paths: | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# The source files are in a subfolder of the ArduinoCore-API repository, so it's not possible to clone it directly to the final destination in the core | ||
- name: Checkout ArduinoCore-API | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: arduino/ArduinoCore-API | ||
path: extras/ArduinoCore-API | ||
|
||
- name: Install ArduinoCore-API | ||
run: mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino" | ||
|
||
- name: Checkout Basic examples | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: arduino/arduino-examples | ||
path: extras | ||
|
||
- name: Delete incompatible examples | ||
run: | | ||
# These boards do not support native USB | ||
rm -r "$GITHUB_WORKSPACE/extras/examples/09.USB" | ||
# The next command can be removed after the core integration with ArduinoCore-API | ||
rm -r "$GITHUB_WORKSPACE/extras/examples/10.StarterKit_BasicKit/p11_CrystalBall" | ||
# CapacitiveSensor library does not support megaAVR core yet | ||
rm -r "$GITHUB_WORKSPACE/extras/examples/10.StarterKit_BasicKit/p13_TouchSensorLamp" | ||
- name: Compile examples | ||
uses: arduino/actions/libraries/compile-examples@master | ||
with: | ||
fqbn: ${{ matrix.board.fqbn }} | ||
libraries: | | ||
- name: Adafruit MQTT Library | ||
- name: Servo | ||
- name: LiquidCrystal | ||
- name: MFRC522 | ||
- name: Ethernet | ||
- name: ArduinoBearSSL | ||
- name: Arduino_LSM9DS1 | ||
- name: TFT | ||
- name: ArduinoMqttClient | ||
- name: Arduino_CRC32 | ||
- name: Arduino_LSM6DS3 | ||
- name: Stepper | ||
- name: SD | ||
- name: Arduino_JSON | ||
- name: Arduino_HTS221 | ||
- name: Arduino_DebugUtils | ||
- name: Arduino_LPS22HB | ||
- name: ArduinoDMX | ||
- name: ArduinoRS485 | ||
- name: Arduino_OAuth | ||
- name: WiFiNINA | ||
platforms: | | ||
# Use Board Manager to install the latest release of Arduino megaAVR Boards to get the toolchain | ||
- name: "arduino:megaavr" | ||
# Overwrite the Board Manager installation with the local platform | ||
- source-path: "./" | ||
name: "arduino:megaavr" | ||
sketch-paths: | | ||
${{ env.UNIVERSAL_SKETCH_PATHS }} | ||
${{ matrix.additional-sketch-paths }} | ||
enable-deltas-report: 'true' | ||
verbose: 'true' | ||
|
||
- name: Save memory usage change report as artifact | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: size-deltas-reports | ||
path: size-deltas-reports |
This file contains hidden or 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,13 @@ | ||
name: Report PR Size Deltas | ||
|
||
on: | ||
schedule: | ||
- cron: '*/5 * * * *' | ||
|
||
jobs: | ||
report: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Comment size deltas reports to PRs | ||
uses: arduino/actions/libraries/report-size-deltas@master |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This goes along with my matrix restructuring suggestion above.