Skip to content

Adding example CI configs and badges #1

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

Merged
merged 13 commits into from
Nov 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
install:
- set PATH=C:\Ruby26\bin;C:\cygwin\bin;C:\cygwin64\bin;%PATH%
- bundle install
- '%CYG_ROOT%\setup-%CYG_ARCH%.exe -qnNdO -R %CYG_ROOT% -s http://cygwin.mirror.constant.com -l %CYG_ROOT%/var/cache/setup -P autoconf -P automake -P bison -P libgmp-devel -P gcc-core -P gcc-g++ -P mingw-runtime -P mingw-binutils -P mingw-gcc-core -P mingw-gcc-g++ -P mingw-pthreads -P mingw-w32api -P libtool -P make -P gettext-devel -P gettext -P intltool -P libiconv -P pkg-config -P git -P wget -P curl'

environment:
matrix:
- CYG_ARCH: x86_64
CYG_ROOT: C:/cygwin64

build: off

before_test:
- ruby -v
- gem -v
- bundle -v
- g++ -v

test_script:
- bundle install
- bundle exec arduino_ci_remote.rb
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2.1

jobs:
arduino-ci-test:
docker:
- image: circleci/ruby:2.6
steps:
- checkout
- run:
name: Install and test
command: |
bundle install
bundle exec arduino_ci_remote.rb

workflows:
arduino-ci-workflow:
jobs:
- arduino-ci-test
15 changes: 15 additions & 0 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: macos

on: [push, pull_request]

jobs:
runTest:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: |
bundle install
bundle exec arduino_ci_remote.rb
15 changes: 15 additions & 0 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: ubuntu

on: [push, pull_request]

jobs:
runTest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: |
bundle install
bundle exec arduino_ci_remote.rb
15 changes: 15 additions & 0 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: windows

on: [push, pull_request]

jobs:
runTest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: |
bundle install
bundle exec arduino_ci_remote.rb
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ You can watch a [video](https://youtu.be/vaS4AU_PXQo) showing how this project c

Any serious software project should have good tests and much work has been done to automate that process. One challenging area for testing is low-level devices, such as an [Arduino](https://www.arduino.cc/), whose primary action is setting lines to high or low voltage. One project that seems to be doing a good job of filling this gap is [arduino_ci](https://github.com/ianfixes/arduino_ci). In this project we provide a sample Arduino program with automated tests.

  | Linux | macOS | Windows
-------------------|:------|:------|:--------
**AppVeyor** | | | [![Windows Build Status](https://ci.appveyor.com/api/projects/status/2m0y9wsawprq3i3p?svg=true)](https://ci.appveyor.com/project/prestoncarman/blink)
**CircleCI** | [![Linux Build Status](https://circleci.com/gh/prestoncarman/Blink/tree/2020-11-10_ci.svg?style=svg)](https://app.circleci.com/pipelines/github/prestoncarman/Blink) | |
**GitHub Actions** | ![Linux Build Status](https://github.com/prestoncarman/Blink/workflows/ubuntu/badge.svg) | ![macOS Build Status](https://github.com/prestoncarman/Blink/workflows/macos/badge.svg) | ![Windows Build Status](https://github.com/prestoncarman/Blink/workflows/windows/badge.svg)
**Travis CI** | [![Linux Build Status](https://ci.appveyor.com/api/projects/status/2m0y9wsawprq3i3p?svg=true)](https://ci.appveyor.com/project/prestoncarman/blink) | |


## Blink

One of the initial Arduino tutorials is [Blink](https://www.arduino.cc/en/Tutorial/Blink), a program that simply turns an LED on and off for one second each. It is a nice demo that doesn't require any external devices and can be written in a few lines of code.
Expand Down Expand Up @@ -70,6 +78,16 @@ To actually see this work, do the following:

With that you should have an application that works and has automated tests.

### Example CI Configs

In this repo, the Arduino-CI is used to run the test suite through several CI vendors.
The example code for each vendor is found in the following files:

* AppVeyor - `.appveyor.yml`
* Circle CI - `.circleci/config.yml`
* GitHub Actions - `.github/workflows/Arduino-CI.yaml`
* Travis CI - `.travis.yml`

## Credits

This Arduino example was created in September 2020 by James Foster <[email protected]>.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ maintainer=James Foster <[email protected]>
sentence=Sample Arduino library for use with arduino_ci
paragraph=Sample Arduino library for use with arduino_ci
category=Other
url=https://github.com/jgfoster/Blink
url=https://github.com/Arduino-CI/Blink
architectures=avr
includes=Blink.h