Skip to content

Use GitHub Actions for continuous integration #413

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 7 commits into from
May 26, 2021
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
7 changes: 7 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# See: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
ignore-words-list = hart,pullrequest
check-filenames =
check-hidden =
skip = ./.git,./firmwares/arduinoISP,./firmwares/wifishield,./bootloaders
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#about-the-dependabotyml-file
version: 2

updates:
# Configure check for outdated GitHub Actions actions in workflows.
# See: https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot
- package-ecosystem: github-actions
directory: / # Check the repository's workflows under /.github/workflows/
schedule:
interval: daily
27 changes: 27 additions & 0 deletions .github/workflows/check-arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check Arduino

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
pull_request:
schedule:
# Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint.
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Arduino Lint
uses: arduino/arduino-lint-action@v1
with:
compliance: specification
# Always use this setting for official repositories. Remove for 3rd party projects.
official: true
project-type: platform
206 changes: 206 additions & 0 deletions .github/workflows/compile-platform-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
name: Compile Examples

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/compile-platform-examples.ya?ml"
- "cores/**"
- "libraries/**"
- "variants/**"
- "boards.txt"
- "platform.txt"
pull_request:
paths:
- ".github/workflows/compile-platform-examples.ya?ml"
- "cores/**"
- "libraries/**"
- "variants/**"
- "boards.txt"
- "platform.txt"
workflow_dispatch:
repository_dispatch:

jobs:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false

matrix:
board:
- fqbn: arduino:avr:yun
serial: true
softwareserial: true
- fqbn: arduino:avr:uno
serial: true
softwareserial: true
- fqbn: arduino:avr:diecimila:cpu=atmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:diecimila:cpu=atmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:nano:cpu=atmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:nano:cpu=atmega328old
serial: true
softwareserial: true
- fqbn: arduino:avr:nano:cpu=atmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:mega:cpu=atmega2560
serial: true
softwareserial: true
- fqbn: arduino:avr:mega:cpu=atmega1280
serial: true
softwareserial: true
- fqbn: arduino:avr:megaADK
serial: true
softwareserial: true
- fqbn: arduino:avr:leonardo
serial: true
softwareserial: true
- fqbn: arduino:avr:leonardoeth
serial: true
softwareserial: true
- fqbn: arduino:avr:micro
serial: true
softwareserial: true
- fqbn: arduino:avr:esplora
serial: true
softwareserial: true
- fqbn: arduino:avr:mini:cpu=atmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:mini:cpu=atmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:ethernet
serial: true
softwareserial: true
- fqbn: arduino:avr:fio
serial: true
softwareserial: true
- fqbn: arduino:avr:bt:cpu=atmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:bt:cpu=atmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:LilyPadUSB
serial: true
softwareserial: true
- fqbn: arduino:avr:lilypad:cpu=atmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:lilypad:cpu=atmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:pro:cpu=16MHzatmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:pro:cpu=8MHzatmega328
serial: true
softwareserial: true
- fqbn: arduino:avr:pro:cpu=16MHzatmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:pro:cpu=8MHzatmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:atmegang:cpu=atmega168
serial: true
softwareserial: true
- fqbn: arduino:avr:atmegang:cpu=atmega8
serial: true
softwareserial: false
- fqbn: arduino:avr:robotControl
serial: true
softwareserial: false
- fqbn: arduino:avr:robotMotor
serial: true
softwareserial: false
- fqbn: arduino:avr:gemma
serial: false
softwareserial: false
- fqbn: arduino:avr:circuitplay32u4cat
serial: true
softwareserial: true
- fqbn: arduino:avr:yunmini
serial: true
softwareserial: true
- fqbn: arduino:avr:chiwawa
serial: true
softwareserial: true
- fqbn: arduino:avr:one
serial: true
softwareserial: true
- fqbn: arduino:avr:unowifi
serial: true
softwareserial: true

# Make board type-specific customizations to the matrix jobs
include:
- board:
# Boards with Serial interface
serial: true
# Compile these sketches in addition to the ones compiled for all boards
serial-sketch-paths: |
- libraries/EEPROM/examples/eeprom_crc
- libraries/EEPROM/examples/eeprom_get
- libraries/EEPROM/examples/eeprom_put
- libraries/EEPROM/examples/eeprom_read
- libraries/SPI
- libraries/Wire
- board:
serial: false
serial-sketch-paths: ""
- board:
# Boards compatible with the SoftwareSerial library
softwareserial: true
softwareserial-sketch-paths: |
- libraries/SoftwareSerial
- board:
softwareserial: false
softwareserial-sketch-paths: ""

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
platforms: |
# Use Boards Manager to install the latest release of the platform to get the toolchain.
- name: arduino:avr
# Overwrite the Boards Manager installation with the platform from the repository.
- source-path: ./
name: arduino:avr
sketch-paths: |
# Compile these sketches for all boards
- libraries/EEPROM/examples/eeprom_clear
- libraries/EEPROM/examples/eeprom_iteration
- libraries/EEPROM/examples/eeprom_update
- libraries/EEPROM/examples/eeprom_write
# Board-specific sketches
${{ matrix.serial-sketch-paths }}
${{ matrix.softwareserial-sketch-paths }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save sketches report as workflow artifact
uses: actions/upload-artifact@v2
with:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: ${{ env.SKETCHES_REPORTS_PATH }}
24 changes: 24 additions & 0 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Report Size Deltas

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/report-size-deltas.yml"
schedule:
# Run at the minimum interval allowed by GitHub Actions.
# Note: GitHub Actions periodically has outages which result in workflow failures.
# In this event, the workflows will start passing again once the service recovers.
- cron: "*/5 * * * *"
workflow_dispatch:
repository_dispatch:

jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@v1
with:
# The name of the workflow artifact created by the sketch compilation workflow
sketches-reports-source: sketches-reports
22 changes: 22 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Spell Check

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
pull_request:
schedule:
# Run every Tuesday at 8 AM UTC to catch new misspelling detections resulting from dictionary updates.
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Spell check
uses: codespell-project/actions-codespell@master
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Arduino AVR Boards

[![Check Arduino status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/check-arduino.yml)
[![Compile Examples status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/compile-platform-examples.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/compile-platform-examples.yml)
[![Spell Check status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/spell-check.yml)

This repository contains the source code and configuration files of the Arduino AVR Boards
[platform](https://arduino.github.io/arduino-cli/latest/platform-specification/).
2 changes: 1 addition & 1 deletion cores/arduino/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void HardwareSerial::flush()
_tx_udr_empty_irq();
}
// If we get here, nothing is queued anymore (DRIE is disabled) and
// the hardware finished tranmission (TXC is set).
// the hardware finished transmission (TXC is set).
}

size_t HardwareSerial::write(uint8_t c)
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/HardwareSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
// using a ring buffer (I think), in which head is the index of the location
// to which to write the next incoming character and tail is the index of the
// location from which to read.
// NOTE: a "power of 2" buffer size is reccomended to dramatically
// NOTE: a "power of 2" buffer size is recommended to dramatically
// optimize all the modulo operations for ring buffers.
// WARNING: When buffer sizes are increased to > 256, the buffer index
// variables are automatically increased in size, but the extra
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/HardwareSerial_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#endif
#endif // !defined TXC0

// Check at compiletime that it is really ok to use the bit positions of
// Check at compile time that it is really ok to use the bit positions of
// UART0 for the other UARTs as well, in case these values ever get
// changed for future hardware.
#if defined(TXC1) && (TXC1 != TXC0 || RXEN1 != RXEN0 || RXCIE1 != RXCIE0 || \
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/Print.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Print
}

// default to zero, meaning "a single write may block"
// should be overriden by subclasses with buffering
// should be overridden by subclasses with buffering
virtual int availableForWrite() { return 0; }

size_t print(const __FlashStringHelper *);
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/Stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <inttypes.h>
#include "Print.h"

// compatability macros for testing
// compatibility macros for testing
/*
#define getInt() parseInt()
#define getInt(ignore) parseInt(ignore)
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/USBAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ typedef unsigned long u32;

#include "Arduino.h"

// This definitions is usefull if you want to reduce the EP_SIZE to 16
// This definitions is useful if you want to reduce the EP_SIZE to 16
// at the moment only 64 and 16 as EP_SIZE for all EPs are supported except the control endpoint
#ifndef USB_EP_SIZE
#define USB_EP_SIZE 64
Expand Down
4 changes: 2 additions & 2 deletions cores/arduino/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class String

// returns true on success, false on failure (in which case, the string
// is left unchanged). if the argument is null or invalid, the
// concatenation is considered unsucessful.
// concatenation is considered unsuccessful.
unsigned char concat(const String &str);
unsigned char concat(const char *cstr);
unsigned char concat(char c);
Expand Down Expand Up @@ -152,7 +152,7 @@ class String
unsigned char startsWith(const String &prefix, unsigned int offset) const;
unsigned char endsWith(const String &suffix) const;

// character acccess
// character access
char charAt(unsigned int index) const;
void setCharAt(unsigned int index, char c);
char operator [] (unsigned int index) const;
Expand Down
2 changes: 1 addition & 1 deletion cores/arduino/new.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "new.h"

// The C++ spec dicates that allocation failure should cause the
// The C++ spec dictates that allocation failure should cause the
// (non-nothrow version of the) operator new to throw an exception.
// Since we expect to have exceptions disabled, it would be more
// appropriate (and probably standards-compliant) to terminate instead.
Expand Down
Loading