Skip to content

Commit 7952cff

Browse files
authored
Merge pull request #4 from per1234/compile-sketches-demo
Add demonstration of arduino/compile-sketches action
2 parents ffe591b + 71c4305 commit 7952cff

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

.github/workflows/compile-sketch.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Compile Sketch
2+
3+
# The workflow will run on every push and pull request to the repository
4+
on:
5+
- push
6+
- pull_request
7+
8+
jobs:
9+
compile-sketch:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# This step makes the contents of the repository available to the workflow
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
17+
# For more information: https://github.com/arduino/compile-sketches#readme
18+
- name: Compile sketch
19+
uses: arduino/compile-sketches@v1
20+
with:
21+
# The default is to compile for the Arduino Uno board. If you want to compile for other boards, use the `fqbn` input.
22+
sketch-paths: |
23+
# Configure the action to search all folders under the root of the repository for sketches and compile them.
24+
# This is formatted as a YAML list, which makes it possible to have multiple sketch paths if needed.
25+
- ./
26+
libraries: |
27+
# The "blink" sketch being compiled in this demo doesn't use any libraries, so just use an empty list
28+
-

README.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1-
# arduino-cli-example
1+
# `arduino/compile-sketches` action demo
2+
3+
[![Compile Sketch status](https://github.com/arduino/arduino-cli-example/actions/workflows/compile-sketch.yml/badge.svg)](https://github.com/arduino/arduino-cli-example/actions/workflows/compile-sketch.yml)
4+
5+
This repository is the companion of an article on Arduino's blog about tools for continuous integration testing of Arduino sketches with GitHub Actions.
6+
7+
It only serves as a basic demonstration of the [`arduino/compile-sketches` GitHub Actions action](https://github.com/arduino/compile-sketches).
8+
9+
- See the workflow [here](https://github.com/arduino/arduino-cli-example/blob/compile-sketches-demo/.github/workflows/compile-sketch.yml)
10+
- See the workflow runs [here](https://github.com/arduino/arduino-cli-example/actions/workflows/compile-sketch.yml)

blink/blink.ino

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
void setup() {
2+
pinMode(LED_BUILTIN, OUTPUT);
3+
}
4+
5+
void loop() {
6+
digitalWrite(LED_BUILTIN, HIGH);
7+
delay(1000);
8+
digitalWrite(LED_BUILTIN, LOW);
9+
delay(1000);
10+
}

0 commit comments

Comments
 (0)