Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1 from 107-systems/initial_release
Browse files Browse the repository at this point in the history
Initial release
  • Loading branch information
generationmake committed Feb 10, 2022
2 parents e4321b1 + 61cb64c commit 1f6f7ec
Show file tree
Hide file tree
Showing 18 changed files with 946 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/check-arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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
library-manager: submit
project-type: library
36 changes: 36 additions & 0 deletions .github/workflows/check-keywords-txt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check keywords.txt

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/check-keywords-txt.yml"
- "keywords.txt"
pull_request:
paths:
- ".github/workflows/check-keywords-txt.yml"
- "keywords.txt"
workflow_dispatch:
repository_dispatch:

jobs:
extra-library-checks:
runs-on: ubuntu-latest

env:
ARDUINO_CI_SCRIPT_FOLDER: extras/ci-tools/arduino-ci-script

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

- name: Install arduino-ci-script
uses: per1234/install-arduino-ci-script-action@main
with:
installation-path: ${{ env.ARDUINO_CI_SCRIPT_FOLDER }}

# See: https://github.com/per1234/arduino-ci-script#check_keywords_txt-searchpath-maximumsearchdepth
- name: Check keywords.txt
run: |
source "${ARDUINO_CI_SCRIPT_FOLDER}/arduino-ci-script.sh"
check_keywords_txt "$GITHUB_WORKSPACE"
99 changes: 99 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Compile Examples

on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"

jobs:
build:
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports
LIBRARIES: |
# Install the library from the local path.
- source-path: ./
strategy:
fail-fast: false

matrix:
board:
- fqbn: arduino:samd:mkr1000
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrzero
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrwifi1010
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrfox1200
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrwan1300
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrwan1310
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrgsm1400
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrnb1500
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrvidor4000
platforms: |
- name: arduino:samd
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
- fqbn: arduino:mbed_portenta:envie_m4
platforms: |
- name: arduino:mbed_portenta
- fqbn: arduino:mbed_nano:nano33ble
platforms: |
- name: arduino:mbed_nano
- fqbn: arduino:mbed_nano:nanorp2040connect
platforms: |
- name: arduino:mbed_nano
- fqbn: arduino:mbed_edge:edge_control
platforms: |
- name: arduino:mbed_edge
- fqbn: esp32:esp32:esp32
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install ESP32 platform dependencies
if: startsWith(matrix.board.fqbn, 'esp32:esp32')
run: pip3 install pyserial

- name: Compile examples
uses: arduino/compile-sketches@main
with:
fqbn: ${{ matrix.board.fqbn }}
platforms: ${{ matrix.board.platforms }}
libraries: ${{ env.LIBRARIES }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save memory usage change report as artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v2
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
67 changes: 67 additions & 0 deletions .github/workflows/general-formatting-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: General Formatting Checks

on:
- pull_request
- push

jobs:
blank-first-line:
runs-on: ubuntu-latest

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

- name: Check for files starting with a blank line
run: find . -path './.git' -prune -or -type f -print0 | xargs -0 -L1 bash -c 'head -1 "$0" | grep --binary-files=without-match --regexp="^$"; if [[ "$?" == "0" ]]; then echo "Blank line found at start of $0."; false; fi'

tabs:
runs-on: ubuntu-latest

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

- name: Check for unnecessary use of true tabs
run: find . -path './.git' -prune -or \( -not -name 'keywords.txt' -and -type f \) -exec grep --with-filename --line-number --binary-files=without-match --regexp=$'\t' '{}' \; -exec echo 'Tab found.' \; -exec false '{}' +

trailing:
runs-on: ubuntu-latest

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

- name: Check for trailing whitespace
run: find . -path './.git' -prune -or -type f -exec grep --with-filename --line-number --binary-files=without-match --regexp='[[:blank:]]$' '{}' \; -exec echo 'Trailing whitespace found.' \; -exec false '{}' +

line-endings:
runs-on: ubuntu-latest

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

- name: Check for non-Unix line endings
run: find . -path './.git' -prune -or -type f -exec grep --files-with-matches --binary-files=without-match --regexp=$'\r$' '{}' \; -exec echo 'Non-Unix EOL detected.' \; -exec false '{}' +

blank-last-line:
runs-on: ubuntu-latest

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

- name: Check for blank lines at end of files
run: find . -path './.git' -prune -or -type f -print0 | xargs -0 -L1 bash -c 'tail -1 "$0" | grep --binary-files=without-match --regexp="^$"; if [[ "$?" == "0" ]]; then echo "Blank line found at end of $0."; false; fi'

no-last-newline:
runs-on: ubuntu-latest

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

- name: Check for files that don't end in a newline
# https://stackoverflow.com/a/25686825
run: find . -path './.git' -prune -or -type f -print0 | xargs -0 -L1 bash -c 'if test "$(grep --files-with-matches --binary-files=without-match --max-count=1 --regexp='.*' "$0")" && test "$(tail --bytes=1 "$0")"; then echo "No new line at end of $0."; false; fi'
17 changes: 17 additions & 0 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Report Size Deltas

on:
schedule:
- cron: '*/5 * * * *'

jobs:
report:
runs-on: ubuntu-latest

steps:
# See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@main
with:
# The name of the workflow artifact created by the "Compile Examples" 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

on:
- pull_request
- push

jobs:
spellcheck:
runs-on: ubuntu-latest

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

# See: https://github.com/codespell-project/actions-codespell/blob/master/README.md
- name: Spell check
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: ./.git,./extras/test/external,./src/lib
ignore_words_file: extras/codespell-ignore-words-list.txt
Loading

0 comments on commit 1f6f7ec

Please sign in to comment.