Skip to content

Commit

Permalink
update workflows and LTR5XX lib
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitshaoxiang committed Dec 26, 2023
1 parent cd31336 commit 4b059de
Show file tree
Hide file tree
Showing 9 changed files with 853 additions and 24 deletions.
82 changes: 82 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Source:
# https://github.com/Tinyu-Zhao/M5-Depends/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml
# See:
# https://docs.github.com/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms

name: Bug report
description: Report a problem with the code in this repository.
labels:
- "type: bug"
body:
- type: markdown
attributes:
value: "Thank you for opening an issue on an M5Stack Arduino library repository.\n\
To improve the speed of resolution please review the following guidelines and common troubleshooting steps below before creating the issue:\n\
If you have any UIFLOW questions you can ask in the [special board](https://community.m5stack.com/category/5/uiflow), there will be many enthusiastic friends to help you.\n\
Do not use GitHub issues for troubleshooting projects and issues. Instead use the forums at https://community.m5stack.com to ask questions and troubleshoot why something isn't working as expected. In many cases the problem is a common issue that you will more quickly receive help from the forum community. GitHub issues are meant for known defects in the code. If you don't know if there is a defect in the code then start with troubleshooting on the forum first."
- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: To reproduce
description: Provide the specific set of steps we can follow to reproduce the problem.
placeholder: |
1. In this environment...
2. With this config...
3. Run '...'
4. See error...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected behavior
description: What would you expect to happen after following those instructions?
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
- type: textarea
id: information
attributes:
label: Environment
description: |
If applicable, add screenshots to help explain your problem.
examples:
- **OS**: Ubuntu 20.04
- **IDE & IDE Version**: Arduino 1.8.19 Or Platform IO v2.5.0
- **Repository Version**: 0.4.0
value: |
- OS:
- IDE &IDE Version:
- Repository Version:
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional context
description: Add any additional information here.
validations:
required: false
- type: checkboxes
id: checklist
attributes:
label: Issue checklist
description: Please double-check that you have done each of the following things before submitting the issue.
options:
- label: I searched for previous reports in [the issue tracker](https://github.com/m5stack/M5Stack/issues?q=)
required: true
- label: My report contains all necessary details
required: true
115 changes: 115 additions & 0 deletions .github/actions/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: 'Test compile for Arduino'
description: 'Compile sketches or Arduino library examples for one board type using arduino-cli and check for errors'
author: 'Armin Joachimsmeyer'
inputs:
cli-version:
description: 'Version of arduino-cli to use when building. Current (8/2022) one is 0.26.0.'
default: 'latest'
required: false

sketch-names:
description: 'Comma sepatated list of patterns or filenames (without path) of the sketch(es) to test compile. Useful if the sketch is a *.cpp or *.c file or only one sketch in the repository should be compiled.'
default: '*.ino'
required: false

sketch-names-find-start:
description: 'The start directory to look for the sketch-names to test compile. Can be a path like "digistump-avr/libraries/*/examples/C*/" .'
default: '.'
required: false

arduino-board-fqbn:
#In the Arduino IDE, the fqbn is printed in the first line of the verbose output for compilation as parameter -fqbn=... for the "arduino-builder -dump-prefs" command
description: 'Fully Qualified Board Name of the Arduino board. You may add a suffix behind the fqbn with "|" to specify one board for e.g. different compile options like arduino:avr:uno|trace.'
default: 'arduino:avr:uno'
required: false

arduino-platform:
description: 'Comma separated list of platform specifiers, if you require a fixed version like "arduino:[email protected]" or do not want the specifier derived from the 2 first elements of the arduino-board-fqbn or need more than one core. The suffix "@latest" is always removed.'
default: ''
required: false

platform-default-url:
description: 'The platform URL for the required board description if arduino-board-fqbn does not start with "arduino:" and not explicitly specified by platform-url.'
default: ''
required: false

platform-url:
description: 'The platform URL for the required board description if arduino-board-fqbn does not start with "arduino:".'
default: ''
required: false

required-libraries:
description: 'Comma separated list of arduino library names required for compiling the sketches / examples for this board.'
default: ''
required: false

sketches-exclude:
description: 'Comma or space separated list of complete names of all sketches / examples to be excluded in the build for this board.'
default: ''
required: false

build-properties:
description: |
Build parameter like -DDEBUG for each example specified or for all examples, if example name is "All". In json format.
For example: build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" }'
default: ''
required: false

extra-arduino-cli-args:
description: |
This string is passed verbatim without double quotes to the arduino-cli compile commandline as last argument before the filename.
See https://arduino.github.io/arduino-cli/commands/arduino-cli_compile/ for compile parameters.
default: ''
required: false

extra-arduino-lib-install-args:
description: |
This string is passed verbatim without double quotes to the arduino-cli lib install commandline as last argument before the library names.
It can be used e.g. to suppress dependency resolving for libraries by using --no-deps as argument string.
default: ''
required: false

set-build-path:
description: 'Flag to set the build directory (arduino-cli paramer --build-path) to /build subdirectory of compiled sketches.'
default: 'false'
required: false

debug-compile:
description: 'If set to "true" the action logs verbose compile output even during successful builds'
default: ''
required: false

debug-install:
description: 'If set to "true" the action logs verbose arduino-cli output during installation'
default: ''
required: false

runs:
using: 'composite'
steps:
- name: Compile all sketches / examples using the bash script arduino-test-compile.sh
env:
# Passing parameters to the script by setting the appropriate ENV_* variables.
# Direct passing as arguments is not possible because of blanks in the arguments.
ENV_CLI_VERSION: ${{ inputs.cli-version }}
ENV_SKETCH_NAMES: ${{ inputs.sketch-names }}
ENV_SKETCH_NAMES_FIND_START: ${{ inputs.sketch-names-find-start }}
ENV_ARDUINO_BOARD_FQBN: ${{ inputs.arduino-board-fqbn }}
ENV_ARDUINO_PLATFORM: ${{ inputs.arduino-platform }}
ENV_PLATFORM_DEFAULT_URL: ${{ inputs.platform-default-url }}
ENV_PLATFORM_URL: ${{ inputs.platform-url }}
ENV_REQUIRED_LIBRARIES: ${{ inputs.required-libraries }}
ENV_SKETCHES_EXCLUDE: ${{ inputs.sketches-exclude }}
ENV_BUILD_PROPERTIES: ${{ inputs.build-properties }}
ENV_EXTRA_ARDUINO_CLI_ARGS: ${{ inputs.extra-arduino-cli-args }}
ENV_EXTRA_ARDUINO_LIB_INSTALL_ARGS: ${{ inputs.extra-arduino-lib-install-args }}
ENV_SET_BUILD_PATH: ${{ inputs.set-build-path }}
ENV_DEBUG_COMPILE: ${{ inputs.debug-compile }}
ENV_DEBUG_INSTALL: ${{ inputs.debug-install }}

run: ${{ github.action_path }}/arduino-test-compile.sh
shell: bash

branding:
icon: 'eye'
color: 'red'
Loading

0 comments on commit 4b059de

Please sign in to comment.