Skip to content

Commit 602c479

Browse files
committed
Update "smoke test" examples compilation CI workflow
On every push or pull request that affects library source or example files, and periodically, compile all example sketches for the specified boards.
1 parent 4bc3146 commit 602c479

File tree

3 files changed

+53
-11
lines changed

3 files changed

+53
-11
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Compile Examples
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-examples.yml"
8+
- "examples/**"
9+
- "src/**"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "examples/**"
14+
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
jobs:
22+
build:
23+
name: ${{ matrix.board.fqbn }}
24+
runs-on: ubuntu-latest
25+
26+
strategy:
27+
fail-fast: false
28+
29+
matrix:
30+
board:
31+
- fqbn: esp8266:esp8266:huzzah
32+
platforms: |
33+
- name: esp8266:esp8266
34+
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
35+
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
39+
40+
- name: Compile examples
41+
uses: arduino/compile-sketches@v1
42+
with:
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
fqbn: ${{ matrix.board.fqbn }}
45+
platforms: ${{ matrix.board.platforms }}
46+
libraries: |
47+
# Install the library from the local path.
48+
- source-path: ./
49+
# Additional library dependencies can be listed here.
50+
# See: https://github.com/arduino/compile-sketches#libraries
51+
sketch-paths: |
52+
- examples

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NTPClient
22

3-
[![Build Status](https://travis-ci.org/arduino-libraries/NTPClient.svg?branch=master)](https://travis-ci.org/arduino-libraries/NTPClient)
3+
[![Compile Examples status](https://github.com/arduino-libraries/NTPClient/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/NTPClient/actions/workflows/compile-examples.yml)
44

55
Connect to a NTP server, here is how:
66

0 commit comments

Comments
 (0)