-
-
Notifications
You must be signed in to change notification settings - Fork 714
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
Add CI workflows (to be used with ArduinoCore-API integration) #567
Changes from 18 commits
cc557a4
2691b30
64f2aee
3139e35
f7c8d00
e9e9e8b
1a6ef45
7d18af8
0ed98c2
4f861fd
c3f8a97
c8693a3
0bff8ae
00dca72
f2dd55a
2990e4c
6db378e
d7d471b
01f3e74
b47b2af
da63a92
dbf2e79
857c994
0dc7e00
fb59c13
50d5867
6769704
e62bb96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,265 @@ | ||||||||||
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/USBHost | ||||||||||
- libraries/SPI | ||||||||||
- libraries/SFU/examples/SFU_LoadBinary | ||||||||||
- libraries/SAMD_AnalogCorrection | ||||||||||
- ~/Arduino/libraries/Keyboard/examples/Serial | ||||||||||
- ~/Arduino/libraries/Servo/examples | ||||||||||
- ~/Arduino/libraries/LiquidCrystal/examples | ||||||||||
- ~/Arduino/libraries/Ethernet/examples | ||||||||||
- ~/Arduino/libraries/SD/examples | ||||||||||
- ~/Arduino/libraries/WiFi/examples | ||||||||||
- ~/Arduino/libraries/Arduino_LSM9DS1/examples | ||||||||||
- ~/Arduino/libraries/Arduino_JSON/examples | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/ChangeUID | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/DumpInfo | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/FixBrickedUID | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/MifareClassicValueBlock | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/MinimalInterrupt | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/Ntag216_AUTH | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/RFID-Cloner | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/ReadAndWrite | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/ReadNUID | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/ReadUidMultiReader | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/firmware_check | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/rfid_default_keys | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/rfid_read_personal_data | ||||||||||
- ~/Arduino/libraries/MFRC522/examples/rfid_write_personal_data | ||||||||||
- ~/Arduino/libraries/WiFi101/examples | ||||||||||
|
||||||||||
strategy: | ||||||||||
fail-fast: false | ||||||||||
|
||||||||||
matrix: | ||||||||||
board: [ | ||||||||||
{"fqbn": "arduino:samd:arduino_zero_edbg", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:arduino_zero_native", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:mkr1000", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:mkrzero", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:mkrwifi1010", "type": "mkrWiFi1010"}, | ||||||||||
{"fqbn": "arduino:samd:nano_33_iot", "type": "nano33IoT"}, | ||||||||||
{"fqbn": "arduino:samd:mkrfox1200", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:mkrwan1300", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:mkrwan1310", "type": "mkrwan1310"}, | ||||||||||
{"fqbn": "arduino:samd:mkrgsm1400", "type": "usb"}, | ||||||||||
{"fqbn": "arduino:samd:mkrnb1500", "type": "mkrNB1500"}, | ||||||||||
{"fqbn": "arduino:samd:mkrvidor4000", "type": "vidor"}, | ||||||||||
{"fqbn": "arduino:samd:adafruit_circuitplayground_m0", "type": "adafruit_playg"}, | ||||||||||
{"fqbn": "arduino:samd:mzero_pro_bl_dbg", "type": "mzero"}, | ||||||||||
{"fqbn": "arduino:samd:mzero_pro_bl", "type": "mzero"}, | ||||||||||
{"fqbn": "arduino:samd:mzero_bl", "type": "mzero"}, | ||||||||||
{"fqbn": "arduino:samd:tian", "type": "tian"} | ||||||||||
] | ||||||||||
|
||||||||||
# make board type-specific customizations to the matrix jobs | ||||||||||
include: | ||||||||||
# Normal USB boards with all the general libraries | ||||||||||
- board: | ||||||||||
type: "usb" | ||||||||||
additional-sketch-paths: | | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmataPlus | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmataEthernet | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/SimpleDigitalFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/SimpleAnalogFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/ServoFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/EchoString | ||||||||||
- ~/Arduino/libraries/Firmata/examples/AnalogFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/AllInputsFirmata | ||||||||||
- libraries/I2S/examples | ||||||||||
- libraries/SDU/examples | ||||||||||
# Vidor board | ||||||||||
- board: | ||||||||||
type: "vidor" | ||||||||||
additional-sketch-paths: | | ||||||||||
- libraries/SAMD_BootloaderUpdater/examples | ||||||||||
- libraries/I2S/examples | ||||||||||
# mkrwifi1010 | ||||||||||
- board: | ||||||||||
type: "mkrWiFi1010" | ||||||||||
additional-sketch-paths: | | ||||||||||
- libraries/I2S/examples | ||||||||||
- libraries/SDU/examples | ||||||||||
- ~/Arduino/libraries/WiFiNINA/examples | ||||||||||
# mkrnb1500 boards | ||||||||||
- board: | ||||||||||
type: "mkrNB1500" | ||||||||||
additional-sketch-paths: | | ||||||||||
- libraries/I2S/examples | ||||||||||
- libraries/SDU/examples | ||||||||||
# nano_33_iot | ||||||||||
- board: | ||||||||||
type: "nano33IoT" | ||||||||||
additional-sketch-paths: | | ||||||||||
- libraries/I2S/examples | ||||||||||
- ~/Arduino/libraries/WiFiNINA/examples | ||||||||||
# mkrwan1310 | ||||||||||
- board: | ||||||||||
type: "mkrwan1310" | ||||||||||
additional-sketch-paths: | | ||||||||||
- libraries/I2S/examples | ||||||||||
# adafruit_cicrcuitplayground board | ||||||||||
- board: | ||||||||||
type: "adafruit_playg" | ||||||||||
additional-sketch-paths: | | ||||||||||
- libraries/SDU/examples | ||||||||||
# mzero boards | ||||||||||
- board: | ||||||||||
type: "mzero" | ||||||||||
additional-sketch-paths: | | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmataPlus | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmataEthernet | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/SimpleDigitalFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/SimpleAnalogFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/ServoFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/EchoString | ||||||||||
- ~/Arduino/libraries/Firmata/examples/AnalogFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/AllInputsFirmata | ||||||||||
- libraries/SDU/examples | ||||||||||
# tian board | ||||||||||
- board: | ||||||||||
type: "tian" | ||||||||||
additional-sketch-paths: | | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmataPlus | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmataEthernet | ||||||||||
- ~/Arduino/libraries/Firmata/examples/StandardFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/SimpleDigitalFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/SimpleAnalogFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/ServoFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/EchoString | ||||||||||
- ~/Arduino/libraries/Firmata/examples/AnalogFirmata | ||||||||||
- ~/Arduino/libraries/Firmata/examples/AllInputsFirmata | ||||||||||
# MKRGSM1400 board | ||||||||||
- board: | ||||||||||
fqbn: "arduino:samd:mkrgsm1400" | ||||||||||
additional-sketch-paths: | | ||||||||||
- ~/Arduino/libraries/MKRGSM/examples | ||||||||||
# MKRNB1500 board | ||||||||||
- board: | ||||||||||
fqbn: "arduino:samd:mkrnb1500" | ||||||||||
additional-sketch-paths: | | ||||||||||
- ~/Arduino/libraries/MKRNB/examples | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same issue as I described above for |
||||||||||
# MKRWAN board | ||||||||||
- board: | ||||||||||
fqbn: '"arduino:samd:mkrwan1300" "arduino:samd:mkrwan1310"' | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since none of the existing matrix items match the Apparently the You could add a general "WAN" attribute property to the matrix, something like what I did in this workflow: You could also just add a separate This also has the same issue as I described above for |
||||||||||
additional-sketch-paths: | | ||||||||||
- ~/Arduino/libraries/MKRWAN/examples | ||||||||||
|
||||||||||
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: Compile examples | ||||||||||
uses: arduino/actions/libraries/compile-examples@master | ||||||||||
giulcioffi marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
with: | ||||||||||
fqbn: ${{ matrix.board.fqbn }} | ||||||||||
libraries: | | ||||||||||
- source-url: https://github.com/giulcioffi/WiFi101.git | ||||||||||
version: namespaced_api | ||||||||||
- name: MFRC522 | ||||||||||
- name: Arduino_MKRMEM | ||||||||||
- name: FlashStorage | ||||||||||
- source-url: https://github.com/arduino-libraries/Keyboard.git | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm guess that the use of the development version of the Keyboard library is because that version has an example sketch added: but that example sketch is just a copy/paste of the KeyboardSerial example in the built-in examples: So there would be no loss of coverage from using the release version of the library and removing the |
||||||||||
- name: Mouse | ||||||||||
- name: Servo | ||||||||||
- name: LiquidCrystal | ||||||||||
- name: CapacitiveSensor | ||||||||||
- name: Ethernet | ||||||||||
- name: ArduinoBearSSL | ||||||||||
- name: Arduino_APDS9960 | ||||||||||
- name: Arduino_LSM9DS1 | ||||||||||
- name: ArduinoHttpClient | ||||||||||
- name: NTPClient | ||||||||||
- name: TFT | ||||||||||
- name: ArduinoMqttClient | ||||||||||
- name: Arduino_CRC32 | ||||||||||
- name: Arduino_LSM6DS3 | ||||||||||
- name: Stepper | ||||||||||
- name: SD | ||||||||||
- name: Arduino_JSON | ||||||||||
- name: Arduino_HTS221 | ||||||||||
- name: Firmata | ||||||||||
- name: ArduinoMotorCarrier | ||||||||||
- name: ArduinoCloudThing | ||||||||||
- name: Arduino_DebugUtils | ||||||||||
- name: WiFi Link | ||||||||||
- name: Arduino_LPS22HB | ||||||||||
- name: CTC GO MOTIONS | ||||||||||
- name: ArduinoModbus | ||||||||||
- name: ArduinoIoTCloudBearSSL | ||||||||||
- name: ArduinoDMX | ||||||||||
- name: ArduinoRS485 | ||||||||||
- name: Arduino_OAuth | ||||||||||
- name: CTC GO CORE | ||||||||||
- name: WiFi | ||||||||||
- name: Bridge | ||||||||||
- name: Temboo | ||||||||||
- name: ArduinoIoTCloud | ||||||||||
- name: Madgwick | ||||||||||
- name: MKRGSM | ||||||||||
- name: MKRNB | ||||||||||
- name: LoRa | ||||||||||
- name: MKRWAN | ||||||||||
- name: WiFiNINA | ||||||||||
platforms: | | ||||||||||
# Use Board Manager to install the latest release of Arduino megaAVR Boards to get the toolchain | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
- name: "arduino:samd" | ||||||||||
# Overwrite the Board Manager installation with the local platform | ||||||||||
- source-path: "./" | ||||||||||
name: "arduino:samd" | ||||||||||
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 | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
The default sketches report path of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, I see I forgot about this and made a duplicate suggestion for the same change in my newer review below: |
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 | ||
giulcioffi marked this conversation as resolved.
Show resolved
Hide resolved
|
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.
Since you set
matrix.board.type
tousb
for this board, I suspect you intended for the paths undermatrix.include[].board.type.usb
to be compiled for it, but what is happening is the value of thematrix.board.additional-sketch-paths
key is being overwritten. So it only ends up containing the single path~/Arduino/libraries/MKRGSM/examples
, as you can see from this workflow log;https://github.com/giulcioffi/ArduinoCore-samd/runs/1263161053?#step:7:16602
You can fix this by using a dedicated key for each, like
matrix.board.additional-usb-sketch-paths
andmatrix.board.additional-sketch-paths
. You can see an example of that here:https://github.com/arduino/arduino-examples/blob/main/.github/workflows/compile-examples.yml