Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
3d84999
Compile Arduino-Helpers examples for Nano Every
tttapa Jan 18, 2020
6f1fd14
Examples board options
tttapa Jan 18, 2020
b1edd24
Install megaavr in CI
tttapa Jan 18, 2020
3c5b168
Full include path documentation
tttapa Jan 25, 2020
5f5d6b7
Merge branch 'master' of ../Arduino-Helpers
tttapa Jan 25, 2020
5d5cf37
Generate documentation
tttapa Jan 25, 2020
6fcf677
Fix merge commit docs/1.0.0
tttapa Jan 25, 2020
c6fbbe1
std::vector Teensy linker error fix
tttapa Jan 31, 2020
33e2a82
Merge branch 'master' of ../Arduino-Helpers
tttapa Jan 31, 2020
9c0fd68
Add cstddef
tttapa Jan 31, 2020
aac6605
Merge branch 'master' of ../Arduino-Helpers
tttapa Jan 31, 2020
3be724d
Add STL climits
tttapa Feb 6, 2020
23cbf41
Merge branch 'master' of ../Arduino-Helpers
tttapa Feb 6, 2020
2616ec6
Add option to exclude Arduino-Helpers examples
tttapa Feb 6, 2020
b152520
Merge branch 'master' of ../Arduino-Helpers
tttapa Feb 6, 2020
da0f443
Include FilteredAnalog example
tttapa Feb 6, 2020
181d63d
Generate documentation
tttapa Feb 6, 2020
4834172
Add simpler FilteredAnalog example
tttapa Feb 6, 2020
2482ed5
Generate documentation
tttapa Feb 6, 2020
a42c1a2
Merge branch 'master' of ../Arduino-Helpers
tttapa Feb 6, 2020
36de640
Simple FilteredAnalog example
tttapa Feb 6, 2020
52abe95
Strip comments from source doxygen
tttapa Feb 6, 2020
0192079
Change Arduino_Helpers.h → Filters.h in FilteredAnalog examples
tttapa Feb 6, 2020
737145e
New arduino-example-builder
tttapa Feb 7, 2020
3d45734
Add Python Bode plot scripts
tttapa Feb 8, 2020
a0ddc3b
Add frequency response to README
tttapa Feb 8, 2020
4c450b9
Updatable: Make updatables protected
tttapa Mar 3, 2020
73138d5
Fix .clang-format
tttapa Mar 21, 2020
546393d
Add UpdatableCRTP
tttapa Mar 21, 2020
60079bc
Perfect forwarding UpdatableCRTP::applyToAll
tttapa Mar 21, 2020
624e1cd
Make Updatable methods public
tttapa Mar 21, 2020
91492b7
Fix parentheses UpdatableCRTP
tttapa Mar 21, 2020
c38f9e0
Add Vec3f, Vec2f, Quaternion, EulerAngles
tttapa Mar 24, 2020
68fd5c3
Add Vec3f, Vec2f, Quaternion, EulerAngles documentation
tttapa Mar 24, 2020
c79d639
Add MAX7219 example
tttapa Mar 24, 2020
216e998
Add MAX7219 example documentation
tttapa Mar 24, 2020
5a3273e
Quaternion::fromDirection: handle downward vectors correctly
tttapa Mar 24, 2020
7bb388a
Fix missing std::hypot on Due
tttapa Mar 25, 2020
3e8d4ab
Use hypot in Vec2f::norm instead of sqrt(x² + y²)
tttapa Mar 25, 2020
2f1132a
Merge branch 'master' of ../Arduino-Helpers
tttapa Mar 25, 2020
a0def40
Buffered ExtIO + multiple MAX7219s per chain
tttapa Mar 31, 2020
7bf3453
Support multiple MAX7219 7seg displays
tttapa Apr 4, 2020
6bdff8a
Stricter Asan
tttapa Apr 6, 2020
9ad1e52
Use GCC 9 GitHub Actions
tttapa Apr 6, 2020
1318d4f
Add `-Wno-error=attributes` for old Travis GCC
tttapa Apr 6, 2020
b7ed193
Add MCP23017Encoders
tttapa Apr 6, 2020
bc3058e
Fix attribute warnings Updatable
tttapa Apr 6, 2020
f2e47c6
MCP23017 sometimes seems to mess up
tttapa Apr 6, 2020
c502f63
Comments MCP23017Encoders example
tttapa Apr 6, 2020
bb3fcdf
Fix copydoc MAX7219 7-seg
tttapa Apr 6, 2020
8ce6206
Update Doxyfile to Doxygen 1.8.18
tttapa Apr 6, 2020
5eeeac1
Merge branch 'master' of ../Arduino-Helpers
tttapa Apr 8, 2020
e633322
Remove Debug.md page from Doxyfile
tttapa Apr 8, 2020
95ea40e
Add global buffered ExtIO functions
tttapa Apr 8, 2020
a1cea9f
Merge branch 'master' of ../Arduino-Helpers
tttapa Apr 8, 2020
9a16a64
Disable subgrouping Doxygen
tttapa Apr 8, 2020
a24bbf1
Merge branch 'master' of ../Arduino-Helpers
tttapa Apr 8, 2020
8744849
Enable dynamic sections Doxygen
tttapa Apr 9, 2020
278ecc2
Check for NO_PIN in ExtIO
tttapa Apr 9, 2020
a3fda74
Link text debug example Debug.md
tttapa Apr 9, 2020
d990231
Add pages/Debug.md again
tttapa Apr 9, 2020
fe5421c
Generate documentation
tttapa Apr 9, 2020
41949a3
Generate documentation
tttapa Apr 9, 2020
876a2c9
Add FilteredAnalogReadSerial example
tttapa Apr 9, 2020
4d87548
Add FilteredAnalogReadSerial example documentation
tttapa Apr 9, 2020
2b60327
Fix Warnings.hpp for old GCC (Due)
tttapa Apr 9, 2020
473e4f6
Mock analogReadResolution
tttapa Apr 11, 2020
ac7fce4
Allow EMA<0>
tttapa Apr 11, 2020
49b5ad5
Generic MappingFunction for GenericFilteredAnalog
tttapa Apr 11, 2020
06fd969
Don't use rvalue reference GenericFilteredAnalog map
tttapa Apr 14, 2020
d51e491
Fix unused variable GenericFilteredAnalog test
tttapa Apr 14, 2020
c42cdd7
Fix ArduinoCore-API Print
tttapa Apr 14, 2020
6f3e7f1
Fix ambiguity AH::max and arduino::max
tttapa Apr 15, 2020
81d2d97
Move Printstream operator<< into AH namespace
tttapa Apr 15, 2020
1bd0d36
Not using ::arduino:: namespace for megaavr 1.8.5 compatibility
tttapa Apr 15, 2020
42e1dd0
Add ESP8266 and megaAVR support to library.properties
tttapa Apr 15, 2020
33cd6f6
Generate documentation
tttapa Apr 17, 2020
866a46f
Fix inline svg badges README
tttapa Apr 17, 2020
c03c48f
Add FilteredAnalog::getMaxRawValue
tttapa Apr 27, 2020
da360fe
Fix documentation FilteredAnalog
tttapa Apr 27, 2020
4210c80
Update fieldtable and mlabel Doxygen CSS
tttapa May 1, 2020
da63708
Fix vector.cpp for AVR Teensies
tttapa May 10, 2020
a7af517
Add Timer::beginNextPeriod()
tttapa Jun 19, 2020
8cfd014
Allow full-fledged linked list iterators on AVR
tttapa Jun 19, 2020
e0efb43
Thread-safe UpdatableCRTP
tttapa Jun 19, 2020
25f24e1
ArraySlice::operator<= for safe iterators
tttapa Jun 19, 2020
0ebdb52
Fix MAX7219SevenSegmentDisplay::display(long, ...)
tttapa Jun 19, 2020
61f26ce
Allow setting initial value of EMA filter
tttapa Jun 19, 2020
4360c8a
Test Updatable thread safety
tttapa Jun 19, 2020
ea926d3
Generate documentation
tttapa Jun 27, 2020
750e865
Prevent deadlock UpdatableCRTP::isEnabled()
tttapa Jul 9, 2020
64ed18a
Distinguish short, long, hold IncrementButton
tttapa Jul 30, 2020
be3e7ba
Generate documentation
tttapa Jul 30, 2020
e32ad85
Return release events IncrementButton
tttapa Jul 30, 2020
70d3176
Overload operator-> for linked list iterators
tttapa Sep 6, 2020
a0e3cb2
Merge branch 'master' of ../Arduino-Helpers
tttapa Sep 8, 2020
96c6180
Fix FilteredAnalog for ESP8266
tttapa Oct 5, 2020
72d744a
Add FilteredAnalog::resetToCurrentValue()
tttapa Oct 5, 2020
0d27e21
Better EMA implementation with static checks
tttapa Oct 5, 2020
f11f909
Generate documentation after improving EMA
tttapa Oct 5, 2020
715e1ea
Add PrintStream HexDump
tttapa Oct 6, 2020
adb08ca
Add std::ostream HexDump support
tttapa Oct 6, 2020
891283a
Add necessary operators to Array iterators
tttapa Oct 9, 2020
8d8941b
Fix cmath for Clang libc++
tttapa Oct 9, 2020
20ef25c
Include <array> in some test files
tttapa Oct 10, 2020
cdf23b8
Cleanup AH modules documentation
tttapa Oct 11, 2020
6344d71
Move details & member groups to the top Doxygen
tttapa Oct 11, 2020
833270e
PrintStream HexDump always upper case
tttapa Oct 13, 2020
7a3b99a
Include Arduino-Wrapper.h before std headers
tttapa Oct 13, 2020
f440780
Add a default constructor for FilteredAnalog
tttapa Oct 20, 2020
fe45936
Use mutex in DEBUG macros ESP32
tttapa Oct 29, 2020
f299400
Handle zero length hex dumps
tttapa Oct 29, 2020
5a71e4a
Mark UpdatableCRTP::applyToAll always_inline
tttapa Oct 29, 2020
cb71443
Prevent integer overflow EMA initialization
tttapa Oct 31, 2020
a1d065f
Use static polymorphism for ButtonMatrix
tttapa Nov 3, 2020
fc7e066
Debounce time getter/setter ButtonMatrix
tttapa Nov 3, 2020
c8025ae
Don't copy/move DoublyLinkable pointers
tttapa Nov 21, 2020
cd2d273
Add BitArray::setByte() method
tttapa Nov 21, 2020
7b8db6b
ExtIO::digitalRead() return PinStatus_t
tttapa Nov 21, 2020
1c1db7d
Add MCP23017 ExtIO support
tttapa Nov 21, 2020
bd3d501
Delete ExtendedIOElement assignment operator
tttapa Nov 21, 2020
2e1966f
Use modern MOCK_METHOD macros
tttapa Nov 21, 2020
7c041df
Add MCP23017 example
tttapa Nov 21, 2020
f41a9cd
Explicitly initialize DoublyLinkable in UpdatableCRTP copy constructor
tttapa Dec 8, 2020
2ad213a
Improve portability of pin types
tttapa Jan 18, 2021
27c8609
Arduino Nano 33 BLE support (CI, library.properties)
tttapa Jan 18, 2021
e06c638
Return LOW instead of 0 in digitalRead()
tttapa Jan 31, 2021
02dcfe7
Merge branch 'master' into fix-samd-pinstatus
tttapa Feb 7, 2021
27143c7
ExtIO pin functions overloads for unsigned int
tttapa Feb 7, 2021
a81bd19
SPI interface as template and constructor argument
tttapa Feb 7, 2021
031686c
Fix MAX7219SevenSegmentDisplay template methods
tttapa Feb 8, 2021
8469181
Remove AH::UniquePtr
tttapa Feb 9, 2021
a908061
Bump version number
tttapa Feb 9, 2021
884805e
Mention breaking SPI changes in README
tttapa Feb 9, 2021
282820d
Fix increaseBitDepth documentation
tttapa Feb 9, 2021
1090f5d
Remove UniquePtr keywords
tttapa Feb 9, 2021
02fcf5b
Update documentation
tttapa Feb 9, 2021
a43ded0
Remove gtest-wrappers
tttapa Feb 10, 2021
de30f3f
Remove thread-safe version of UpdatableCRTP
tttapa Feb 10, 2021
010aee4
Mutex for debug output mbed os
tttapa Feb 10, 2021
a3eb1f9
Use uint16_t for BitArray indices instead of uint8
tttapa Feb 11, 2021
000d880
Rename MAX7219::init() → begin()
tttapa Feb 11, 2021
8b800a7
Remove “using namespace ExtIO” from ButtonMatrix
tttapa Feb 11, 2021
5cd13ba
Merge branch 'master' of ../Arduino-Helpers into master
tttapa Feb 17, 2021
50afda0
Update examples @boards and gtest headers
tttapa Feb 17, 2021
4b4cc09
Update documentation
tttapa Feb 17, 2021
c56a7b6
Never move arguments UpdatableCRTP::applyToAll
tttapa Jun 1, 2021
ac072d8
Generate documentation
tttapa Jun 1, 2021
a32984d
Use complex i literal in example
tttapa Jun 24, 2021
70cb1ba
rtos/Mutex.h was moved for mbed
tttapa Jun 24, 2021
cea8d01
Add mbed_nano to supported boards
tttapa Jun 24, 2021
07b0628
Don't use complex_udls in example
tttapa Jun 24, 2021
930fd48
Update Nano 33 BLE and ESP8266 FQBNs
tttapa Jun 24, 2021
88eccbc
Enable -Wdouble-promotion
tttapa Jun 24, 2021
7359703
Add float overload PrintStream
tttapa Jun 24, 2021
b344335
Remove more double promotions
tttapa Jun 24, 2021
f6c9239
Use direct initialization in examples
tttapa Jun 24, 2021
514bf32
Remove unnecessary increaseBitDepthImpl prototype
tttapa Jun 26, 2021
1f73be3
Add mixed ExtIO::shiftOut test
tttapa Jun 27, 2021
61d3c25
Replace array index by pointer subtraction
tttapa Jun 29, 2021
776625e
Option to disable discarding analog mux reading
tttapa Jun 29, 2021
3c7fe94
Add setValue method to Hysteresis
tttapa Jun 30, 2021
9c7dfc2
Extract RegisterEncoders from MCP23017Encoders
tttapa Jul 1, 2021
d940f57
Fix RegisterEncoders array initialization for Due
tttapa Jul 1, 2021
49c50e6
Add CachedExtIOPin
tttapa Jul 1, 2021
f36b5bf
Introduce CachedExtIOPin in AH namespace
tttapa Jul 1, 2021
434aaf6
More tests
tttapa Jul 1, 2021
1ee94a4
Fix ESP32 analogWrite fallback
tttapa Jul 1, 2021
9027eed
Fix unresolved overload Nano 33 BLE pin functions
tttapa Jul 1, 2021
e81f837
Fix SOSFilter docstring
tttapa Jul 7, 2021
c4b2a89
Merge branch 'master' of ../Arduino-Helpers into master
tttapa Jul 7, 2021
329861c
Clean docs on upstream pull
tttapa Jul 7, 2021
e33afb7
Generate documentation
tttapa Jul 7, 2021
57b8490
Add Divide.hpp
tttapa Jul 7, 2021
bc76848
Exclude examples/test from documentation
tttapa Jul 17, 2021
f3ce6b1
Update doxygen config, style and header
tttapa Jul 17, 2021
5010de1
Update Debug example and documentation
tttapa Jul 17, 2021
b82200c
Don't redefine DEBUG_OUT
tttapa Jul 17, 2021
d376972
Add small delay in ButtonMatrix for non-AVR boards
tttapa Jul 18, 2021
cfbcb78
Check for ARDUINO macro instead of __x86_64__
tttapa Jul 18, 2021
374d798
Improve Button,
tttapa Jul 26, 2021
bdcdb24
Remove Debug.md from doxygen
tttapa Jul 26, 2021
694d2f0
Clean docs on pull arduino-helpers
tttapa Jul 26, 2021
a7fa69a
Merge branch 'master' of ../Arduino-Helpers into master
tttapa Jul 26, 2021
fb16c04
Change documentation version link
tttapa Jul 26, 2021
cde749c
Add bode plots to doxygen image path
tttapa Jul 26, 2021
8de75b8
Update ExtIO examples
tttapa Aug 5, 2021
c6422c5
Add Pin-Change-Interrupt-Encoders example
tttapa Aug 12, 2021
5ad9eaf
Add Timer-Interrupt-Encoders example
tttapa Aug 12, 2021
c097c35
Update badges README
tttapa Aug 12, 2021
87cd02c
Fix version link Doxygen
tttapa Aug 12, 2021
fd2bee9
Merge branch 'master' of ../Arduino-Helpers
tttapa Jan 31, 2022
a6a85fb
Make AnalogMultiplex members protected
tttapa May 1, 2022
f3fe878
Don't use M_PI in Quaternion.hpp
tttapa May 1, 2022
44fb2df
Upgrade googletest
tttapa May 1, 2022
2f6c742
Quaternion cast 180° to float
tttapa May 1, 2022
663e251
Add MultiPurposeButton
tttapa May 7, 2022
8ca5adc
Start cleaning up build system and CI
tttapa May 7, 2022
2dde702
[CI] Compile examples
tttapa May 8, 2022
9507540
Update clang-format, doxygen
tttapa May 8, 2022
f97ffc6
[Docs] fix reference
tttapa May 8, 2022
2165ddc
CMake export compile commands
tttapa May 8, 2022
69fdfd1
[Docs] Remove documentation
tttapa May 8, 2022
3fcd916
[CI] automated documentation & coverage
tttapa May 8, 2022
c226298
Update README.md
tttapa May 8, 2022
b54416e
[CI] Compile examples for Teensy
tttapa May 8, 2022
ffc0411
[CI] main branch gen-docs.sh
tttapa May 8, 2022
3352526
Merge branch 'master' of ../Arduino-Helpers
tttapa May 8, 2022
604833e
Update CMakePresets.json
tttapa May 8, 2022
746b5a6
Merge branch 'master' of ../Arduino-Helpers
tttapa May 8, 2022
b449271
Include Filters tests
tttapa May 8, 2022
1e1f109
Update README.md
tttapa May 8, 2022
3058dc8
Update CMakePresets.json
tttapa May 8, 2022
3ee7099
Warnings as errors
tttapa May 8, 2022
f275120
Merge branch 'master' of ../Arduino-Helpers
tttapa May 8, 2022
9663a85
[Cov] only include src/Filters in coverage report
tttapa May 8, 2022
628ba1a
Exclude docs/{Doxygen,Coverage} in .gitignore
tttapa May 8, 2022
a11a239
Merge branch 'master' of ../Arduino-Helpers
tttapa May 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
44 changes: 33 additions & 11 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@ Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
Expand All @@ -38,6 +44,7 @@ BraceWrapping:
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
Expand All @@ -50,24 +57,30 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
- Regex: '.*'
Priority: 1
SortPriority: 0
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 4
IndentWrappedFunctionNames: false
Expand All @@ -78,6 +91,7 @@ MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
Expand All @@ -86,29 +100,37 @@ PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
AlwaysBreakTemplateDeclarations: true
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
RawStringFormats:
- Delimiter: pb
Language: TextProto
BasedOnStyle: google
ReflowComments: false
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
SpaceBeforeSquareBrackets: false
Standard: 14
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseCRLF: false
UseTab: Never
...
20 changes: 10 additions & 10 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Git Submodules
run: git submodule update --init --recursive --depth 50
- name: CMake
run: cmake ..
working-directory: build
- name: Install dependencies
run: sudo ./scripts/install-gtest.sh Debug /usr/local
- name: Configure
run: cmake -S. --preset ci
env:
CC: gcc-9
CXX: g++-9
- name: Build
run: make -j4
working-directory: build
- name: Run tests
run: make check
working-directory: build
run: cmake --build --preset ci -j
- name: Test
run: ctest --preset ci
82 changes: 82 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# This action generates the documentation and then deploys it to the `gh-pages` branch.

name: Documentation & Coverage

on:
push:

jobs:
deploy-docs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

# Cache the doxygen executable, lcov
- uses: actions/cache@v2
id: cache-tools
with:
path: |
/tmp/doxygen
/tmp/lcov
/tmp/gtest
key: ${{ runner.os }}-doc-${{ hashFiles('scripts/ci/install-doxygen.sh', 'scripts/ci/install-lcov.sh', 'scripts/install-gtest.sh') }}

- name: Install Graphviz/Dot and LCOV Perl dependencies, as well as TeX Live
run: |
sudo apt-get install \
graphviz libjson-perl libperlio-gzip-perl perl \
texlive-binaries

- name: Install LCOV
run: |
./scripts/ci/install-lcov.sh /tmp/lcov
echo "/tmp/lcov/bin" >> $GITHUB_PATH

# Download and build doxygen (if not cached already)
- name: Install Doxygen
run: |
./scripts/ci/install-doxygen.sh /tmp/doxygen
echo "/tmp/doxygen/bin" >> $GITHUB_PATH

- name: Install Google Test
if: steps.cache-tools.outputs.cache-hit != 'true'
shell: bash
run: ./scripts/install-gtest.sh Debug /tmp/gtest

# Install Python
- uses: actions/setup-python@v2
with:
python-version: '3.9.6'

# Create the `gh-pages` branch if it doesn't exist already, check it out,
# and copy it to /tmp/staging.
- name: Create staging area
run: |
rm -rf /tmp/staging
git fetch origin gh-pages:gh-pages ||:
git checkout gh-pages || \
{ git checkout --orphan gh-pages && git rm -rf . && git clean -fxd ; }
cp -ar $GITHUB_WORKSPACE/ /tmp/staging
git checkout ${GITHUB_REF##*/}
git submodule update --init --recursive

# Generate the documentation and save it in /tmp/staging
- name: Generate documentation
run: ./scripts/ci/gen-docs.sh /tmp/staging
env:
CC: gcc-10
CXX: g++-10
CMAKE_PREFIX_PATH: /tmp/gtest

# Commit the new documentation, squash the commits, and push it to GitHub
- name: Commit and push documention
run: |
git config --global user.name "github-actions"
git config --global user.email "actions@github.com"
commithash=$(git rev-parse HEAD)
cd /tmp/staging
git add .
git commit -m "Documentation for ${commithash}" && \
git reset $(git commit-tree HEAD^{tree} -m "Documentation for ${commithash}") && \
git push -f origin gh-pages ||:
94 changes: 94 additions & 0 deletions .github/workflows/examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Examples

on: push

jobs:
compile-examples:
name: Examples
runs-on: ubuntu-20.04
strategy:
matrix:
board: [AVR, Nano 33 BLE, Nano 33 IoT, ESP32, ESP8266, AVR USB, Mega, Leonardo, Due, Nano Every, Teensy 3.x, Teensy 4.1]

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

- uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: Cache Arduino CLI
uses: actions/cache@v2.1.4
with:
path: |
~/.local/bin
key: ${{ runner.os }}-local-bin-v2

- name: Cache Arduino Cores and Libraries
uses: actions/cache@v2.1.4
with:
path: |
~/.arduino15
~/Arduino/libraries
key: ${{ runner.os }}-arduino-v3-${{ github.sha }}
restore-keys: ${{ runner.os }}-arduino-v3-

- name: Cache Compiled Arduino Cores and Sketches
uses: actions/cache@v2.1.4
with:
path: |
/tmp/arduino-sketch-*
/tmp/core-*
key: ${{ runner.os }}-arduino-compiled-v3-${{ matrix.board }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-arduino-compiled-v3-${{ matrix.board }}-

- name: Update $PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Install Arduino CLI
run: |
mkdir -p "$HOME/.local/bin"
which arduino-cli || { curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR="$HOME/.local/bin" sh; }
mkdir -p "$HOME/.arduino15"
cp "$GITHUB_WORKSPACE/tools/arduino-cli.yaml" "$HOME/.arduino15"
arduino-cli core update-index

- name: Install Arduino Boards
run: |
arduino-cli core install arduino:avr arduino:mbed_nano arduino:samd esp32:esp32 esp8266:esp8266 arduino:sam arduino:megaavr teensy:avr
arduino-cli core upgrade
arduino-cli cache clean
version=$(arduino-cli core list | grep 'teensy:avr' | awk '{print $2}') && { sed -i 's/^recipe.hooks.postbuild/# recipe.hooks.postbuild/g' $HOME/.arduino15/packages/teensy/hardware/avr/$version/platform.txt ||:; }
version=$(arduino-cli core list | grep 'arduino:mbed_nano' | awk '{print $2}') && { patch "$HOME/.arduino15/packages/arduino/hardware/mbed_nano/$version/cores/arduino/Arduino.h" -i "$GITHUB_WORKSPACE/scripts/patches/ARDUINO_LIB_DISCOVERY_PHASE.patch" ||:; }

- name: Install Arduino Libraries
run: |
mkdir -p "$HOME/Arduino/libraries" && cd "$_"
[ -d Adafruit-GFX-Library ] || git clone https://github.com/adafruit/Adafruit-GFX-Library.git --depth=1 &
[ -d Adafruit_SSD1306 ] || git clone https://github.com/adafruit/Adafruit_SSD1306.git --depth=1 &
[ -d Adafruit_BusIO ] || git clone https://github.com/adafruit/Adafruit_BusIO.git --depth=1 &
[ -d FastLED ] || git clone https://github.com/FastLED/FastLED.git --depth=1 &
[ -d MIDIUSB ] || git clone https://github.com/arduino-libraries/MIDIUSB.git --depth=1 &
[ -d Arduino-AppleMIDI-Library ] || git clone https://github.com/lathoub/Arduino-AppleMIDI-Library.git --depth=1 --branch v3.1.2 &
[ -d arduino_midi_library ] || git clone https://github.com/FortySevenEffects/arduino_midi_library.git --depth=1 &
ln -snf "$GITHUB_WORKSPACE" "$HOME/Arduino/libraries/"
# cp "$GITHUB_WORKSPACE/examples/3. MIDI Interfaces/AppleMIDI/WiFi-Credentials.example.h" "$GITHUB_WORKSPACE/examples/3. MIDI Interfaces/AppleMIDI/WiFi-Credentials.h"

- name: Cache Python Packages
uses: actions/cache@v2.1.4
with:
path: ~/.venv
key: ${{ runner.os }}-python-venv-v2-${{ github.sha }}
restore-keys: ${{ runner.os }}-python-venv-v2-

- name: Install Python Packages
run: |
[ -d "$HOME/.venv" ] || python3 -m venv "$HOME/.venv"
source "$HOME/.venv/bin/activate"
python3 -m pip install -U pyyaml pyserial

- name: Compile Examples
run: |
source "$HOME/.venv/bin/activate"
python3 "$GITHUB_WORKSPACE/tools/arduino-example-builder.py" "${{ matrix.board }}" --examples_dir "$GITHUB_WORKSPACE/examples"
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
.vscode/tags
*.pc
.vscode/ipch
.cache

.~lock*
__pycache__/

*.tmp
*.hex

build
docs/Coverage
docs/Doxygen
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

Loading