Skip to content

Commit a1545bf

Browse files
committed
gh: add compile/size diff actions
1 parent cdfdfd5 commit a1545bf

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed
+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-examples.yml"
7+
- "cores/**"
8+
- "libraries/**"
9+
- "variants/**"
10+
- "boards.txt"
11+
- "platform.txt"
12+
push:
13+
paths:
14+
- ".github/workflows/compile-examples.yml"
15+
- "cores/**"
16+
- "libraries/**"
17+
- "variants/**"
18+
- "boards.txt"
19+
- "platform.txt"
20+
21+
jobs:
22+
compile-test:
23+
runs-on: ubuntu-latest
24+
25+
env:
26+
# sketch paths to compile (recursive) for all boards
27+
UNIVERSAL_SKETCH_PATHS: |
28+
- libraries/AnalogWave
29+
- libraries/Arduino_CAN/CANRead
30+
- libraries/Arduino_CAN/CANWrite
31+
- libraries/Arduino_FreeRTOS
32+
- libraries/EEPROM
33+
- libraries/RTC
34+
- libraries/SoftwareSerial
35+
36+
strategy:
37+
fail-fast: false
38+
39+
matrix:
40+
board: [
41+
{"fqbn": "arduino:renesas:portenta_c33"},
42+
{"fqbn": "arduino:renesas:minima"},
43+
{"fqbn": "arduino:renesas:unor4wifi"},
44+
]
45+
46+
# make board type-specific customizations to the matrix jobs
47+
include:
48+
- board:
49+
fqbn: "arduino:renesas:portenta_c33"
50+
additional-sketch-paths: |
51+
- libraries/WiFi
52+
- libraries/UsbMsd
53+
- libraries/UsbHostMsd
54+
- libraries/Storage
55+
- libraries/SSLClient
56+
- libraries/SE05X
57+
- libraries/Ethernet
58+
- libraries/Arduino_CAN/CAN1Read
59+
- libraries/Arduino_CAN/CAN1Write
60+
- board:
61+
fqbn: "arduino:renesas:unor4wifi"
62+
additional-sketch-paths: |
63+
- libraries/WiFiS3
64+
- libraries/Arduino_LED_Matrix
65+
66+
steps:
67+
- name: Checkout repository
68+
uses: actions/checkout@v2
69+
70+
# 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
71+
- name: Checkout ArduinoCore-API
72+
uses: actions/checkout@v2
73+
with:
74+
repository: arduino/ArduinoCore-API
75+
path: extras/ArduinoCore-API
76+
77+
- name: Check if API should be compiled in the core
78+
id: checkapi
79+
run: |
80+
if [[ $(grep -r api platform.txt) ]]; then echo "::set-output name=IS_API::true"; fi
81+
82+
- name: Install ArduinoCore-API
83+
run: rm "$GITHUB_WORKSPACE/cores/arduino/api" && mv "$GITHUB_WORKSPACE/extras/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino"
84+
if: steps.checkapi.outputs.IS_API == 'true'
85+
86+
- name: Checkout Basic examples
87+
uses: actions/checkout@v2
88+
with:
89+
repository: arduino/arduino-examples
90+
path: extras
91+
92+
- name: Compile examples
93+
uses: arduino/compile-sketches@main
94+
with:
95+
fqbn: ${{ matrix.board.fqbn }}
96+
libraries: |
97+
- name: Keyboard
98+
- name: Mouse
99+
- name: Servo
100+
- name: LiquidCrystal
101+
- name: CapacitiveSensor
102+
- name: Ethernet
103+
- name: ArduinoBearSSL
104+
- name: ArduinoHttpClient
105+
- name: NTPClient
106+
- name: ArduinoMqttClient
107+
- name: Stepper
108+
- name: SD
109+
- name: Arduino_JSON
110+
- name: Arduino_HTS221
111+
- name: Firmata
112+
- name: ArduinoModbus
113+
- name: ArduinoDMX
114+
- name: ArduinoRS485
115+
- name: WiFi
116+
- name: ArduinoIoTCloud
117+
platforms: |
118+
# Use Board Manager to install the latest release of Arduino SAMD Boards to get the toolchain
119+
- name: "arduino:renesas"
120+
source-url: "https://downloads.arduino.cc/packages/package_renesas_secret_index.json"
121+
# Overwrite the Board Manager installation with the local platform
122+
- source-path: "./"
123+
name: "arduino:renesas"
124+
sketch-paths: |
125+
${{ env.UNIVERSAL_SKETCH_PATHS }}
126+
${{ matrix.additional-sketch-paths }}
127+
enable-deltas-report: 'true'
128+
verbose: 'false'
129+
github-token: ${{ secrets.GITHUB_TOKEN }}
130+
131+
- name: Save memory usage change report as artifact
132+
uses: actions/upload-artifact@v1
133+
with:
134+
name: sketches-reports
135+
path: sketches-reports
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Report PR Size Deltas
2+
3+
on:
4+
schedule:
5+
- cron: '*/5 * * * *'
6+
7+
jobs:
8+
report:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Comment size deltas reports to PRs
13+
uses: arduino/report-size-deltas@main

0 commit comments

Comments
 (0)