Skip to content

Commit 185399c

Browse files
authored
CI: Add compile-examples action for smoke test CI build. (#12)
1 parent 159de67 commit 185399c

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-examples.yml"
7+
- "examples/**"
8+
- "src/**"
9+
push:
10+
paths:
11+
- ".github/workflows/compile-examples.yml"
12+
- "examples/**"
13+
- "src/**"
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
SKETCHES_REPORTS_PATH: sketches-reports
21+
22+
strategy:
23+
fail-fast: false
24+
25+
matrix:
26+
board:
27+
- fqbn: arduino:samd:mkr1000
28+
platforms: |
29+
- name: arduino:samd
30+
- fqbn: arduino:samd:mkrzero
31+
platforms: |
32+
- name: arduino:samd
33+
- fqbn: arduino:samd:mkrwifi1010
34+
platforms: |
35+
- name: arduino:samd
36+
- fqbn: arduino:samd:mkrfox1200
37+
platforms: |
38+
- name: arduino:samd
39+
- fqbn: arduino:samd:mkrwan1300
40+
platforms: |
41+
- name: arduino:samd
42+
- fqbn: arduino:samd:mkrwan1310
43+
platforms: |
44+
- name: arduino:samd
45+
- fqbn: arduino:samd:mkrgsm1400
46+
platforms: |
47+
- name: arduino:samd
48+
- fqbn: arduino:samd:mkrnb1500
49+
platforms: |
50+
- name: arduino:samd
51+
- fqbn: arduino:samd:mkrvidor4000
52+
platforms: |
53+
- name: arduino:samd
54+
- fqbn: arduino:mbed_portenta:envie_m7
55+
platforms: |
56+
- name: arduino:mbed_portenta
57+
- fqbn: arduino:mbed_portenta:envie_m4
58+
platforms: |
59+
- name: arduino:mbed_portenta
60+
- fqbn: arduino:mbed_nano:nano33ble
61+
platforms: |
62+
- name: arduino:mbed_nano
63+
- fqbn: arduino:mbed_nano:nanorp2040connect
64+
platforms: |
65+
- name: arduino:mbed_nano
66+
- fqbn: arduino:mbed_edge:edge_control
67+
platforms: |
68+
- name: arduino:mbed_edge
69+
- fqbn: esp32:esp32:esp32
70+
platforms: |
71+
- name: esp32:esp32
72+
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
73+
- fqbn: rp2040:rp2040:rpipico
74+
platforms: |
75+
- name: rp2040:rp2040
76+
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
77+
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@v3
81+
82+
- name: Install ESP32 platform dependencies
83+
if: startsWith(matrix.board.fqbn, 'esp32:esp32')
84+
run: pip3 install pyserial
85+
86+
- name: Compile examples
87+
uses: arduino/compile-sketches@main
88+
with:
89+
fqbn: ${{ matrix.board.fqbn }}
90+
platforms: ${{ matrix.board.platforms }}
91+
enable-deltas-report: true
92+
github-token: ${{ secrets.GITHUB_TOKEN }}
93+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
94+
95+
- name: Save memory usage change report as artifact
96+
if: github.event_name == 'pull_request'
97+
uses: actions/upload-artifact@v3
98+
with:
99+
name: ${{ env.SKETCHES_REPORTS_PATH }}
100+
path: ${{ env.SKETCHES_REPORTS_PATH }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
Combined Bosch BMI270 and BMM150 Library for Arduino
22
====================================================
3+
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions/workflows/compile-examples.yml)
34
[![Spell Check](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions/workflows/spell-check.yml)
45
[![Sync Labels status](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions/workflows/sync-labels.yml)
56
[![Arduino Lint](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/workflows/Arduino%20Lint/badge.svg)](https://github.com/arduino-libraries/Arduino_BMI270_BMM150/actions?workflow=Arduino+Lint)

0 commit comments

Comments
 (0)