Skip to content

Commit

Permalink
Merge branch 'master' into mayfly
Browse files Browse the repository at this point in the history
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
  • Loading branch information
SRGDamia1 committed Aug 14, 2024
2 parents 0e02f50 + 71228e4 commit e28d9e0
Show file tree
Hide file tree
Showing 89 changed files with 6,661 additions and 3,102 deletions.
42 changes: 30 additions & 12 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,39 @@ AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 88
CommentPragmas: "^ IWYU pragma:"
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Leave
EmptyLineBeforeAccessModifier: Leave
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
Expand All @@ -50,32 +53,38 @@ ForEachMacros:
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: "TinyGsmClient.h"
- Regex: 'TinyGsmClient.h'
Priority: -1
- Regex: "VariableBase.h"
- Regex: 'VariableBase.h'
Priority: -1
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: ".*"
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: "([-_](test|unittest))?$"
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentAccessModifiers: false
IndentCaseBlocks: true
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ""
MacroBlockEnd: ""
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
# ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: CurrentLine
PenaltyBreakAssignment: 25
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
Expand All @@ -86,21 +95,30 @@ PenaltyExcessCharacter: 600
PenaltyReturnTypeOnItsOwnLine: 50
PointerAlignment: Left
PointerBindsToType: true
QualifierAlignment: Left
ReferenceAlignment: Left
ReflowComments: true
SeparateDefinitionBlocks: Always
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInLineCommentPrefix:
Minimum: 1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
Expand Down
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

*.pdf binary
*.pdf export-ignore

# used to exclude files from archiving/compression

Expand Down
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
labels:
- 'CI/CD'
commit-message:
prefix: ci
39 changes: 39 additions & 0 deletions .github/workflows/build_documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Check, Build, and Publish Documentation

on:
# Triggers the workflow on push or pull request events
push:
pull_request:
# Trigger when a release is created
# NOTE: This will only trigger if the release is created from the UI or with a personal access token
release:
types:
- published
# Trigger with the release workflow finishes
workflow_run:
workflows: ['Create a New Release']
types: [completed]
branches: [master]
# Also give a manual trigger
workflow_dispatch:
inputs:
publish:
description: 'Publish Documentation to GitHub Pages'
required: false
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
doc_build:
if: ${{ (! contains(github.event.head_commit.message, 'ci skip')) && (github.event_name != 'workflow_run' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')) }}
name: Build documentation
uses: EnviroDIY/workflows/.github/workflows/build_documentation.yaml@main
with:
use_graphviz: false
publish: ${{ (github.event_name == 'release' && github.event.action == 'published') || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')}}
rebuild_cache_number: 1
secrets: inherit
39 changes: 39 additions & 0 deletions .github/workflows/build_examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Examples

# Triggers the workflow on push or pull request events
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build_examples:
name: Build standard examples with PlatformIO and the Arduino CLI
if: ${{ ! contains(github.event.head_commit.message, 'ci skip') }}
uses: EnviroDIY/workflows/.github/workflows/build_examples.yaml@main
with:
boards_to_build: 'mayfly,uno,megaatmega2560,leonardo,zeroUSB,arduino_nano_esp32,feather328p,feather32u4,adafruit_feather_m0,adafruit_feather_m4,huzzah,featheresp32,esp32-c3-devkitm-1,esp32-s3-devkitm-1'
examples_to_build: 'examples/a_wild_card,examples/b_address_change,examples/c_check_all_addresses,examples/d_simple_logger,examples/e_continuous_measurement,examples/f_basic_data_request,examples/g_terminal_window,examples/h_SDI-12_slave_implementation,examples/i_SDI-12_interface,examples/k_concurrent_logger,examples/l_verify_crc'
secrets: inherit


build_ext_ints:
name: Build the External Interrupt Example
runs-on: ubuntu-latest
if: ${{ ! contains(github.event.head_commit.message, 'ci skip') }}
env:
PLATFORMIO_BUILD_CACHE_DIR: ~/.platformio/caches

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PlatformIO
uses: EnviroDIY/setup-platformio-action@v1.0.2

- name: Build PlatformIO examples
env:
PLATFORMIO_BUILD_FLAGS: -D SDI12_EXTERNAL_PCINT
PLATFORMIO_CI_SRC: examples/j_external_pcint_library
run: pio ci --board=mayfly --board=uno --board=megaatmega2560 --board=leonardo --board=zeroUSB --board=feather328p --board=feather32u4 --board=adafruit_feather_m0 --lib="." --project-option="lib_deps=greygnome/EnableInterrupt@^1.1.0"
18 changes: 18 additions & 0 deletions .github/workflows/changelog_reminder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on: pull_request
name: Changelog Reminder
jobs:
remind:
name: Changelog Reminder
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token

- name: Changelog Reminder
uses: peterjgrainger/action-changelog-reminder@v1.3.0
with:
changelog_regex: '/CHANGELOG\/.*\/*.md/i'
customPrMessage: 'Please add your changes to the change log!'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/prepare_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
push:
branches:
- master
# Sequence of patterns matched against refs/tags
paths:
- 'VERSION' # Push events when the VERSION file changes
workflow_dispatch:

name: Create a New Release

env:
PLATFORMIO_AUTH_TOKEN: ${{ secrets.PLATFORMIO_AUTH_TOKEN }}

jobs:
wait_for_checks:
if: ${{ github.event_name != 'workflow_dispatch' }}
strategy:
matrix:
req_workflow:
[
verify_library_structure.yaml,
build_examples.yaml,
build_documentation.yaml,
]
name: Wait for Checks to complete
runs-on: ubuntu-latest
steps:
- name: Wait on Workflow
uses: ArcticLampyrid/action-wait-for-workflow@v1.2.0
with:
workflow: ${{ matrix.req_workflow }}
sha: ${{ github.sha || github.event.pull_request.head.sha || github.event.pull_request.head.ref }} # optional
allowed-conclusions: |
success
cancelled
skipped
release:
name: Prepare a new release
needs: [wait_for_checks]
if: |
always() &&
(needs.wait_for_checks.result == 'success' || needs.wait_for_checks.result == 'skipped')
uses: EnviroDIY/workflows/.github/workflows/prepare_release.yaml@main
secrets: inherit
with:
library-manager: 'update'
library-compliance: 'strict'
17 changes: 17 additions & 0 deletions .github/workflows/verify_library_structure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Verify library manifest and structure

# Triggers the workflow on push or pull request events
on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify_library_structure:
name: Validate library structure
if: ${{ ! contains(github.event.head_commit.message, 'ci skip') }}
uses: EnviroDIY/workflows/.github/workflows/verify_library_structure.yaml@main
with:
library-manager: 'update'
library-compliance: 'strict'
Loading

1 comment on commit e28d9e0

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lint_errors

Please sign in to comment.