mirror of
https://github.com/crankyoldgit/IRremoteESP8266.git
synced 2026-01-12 00:05:10 +08:00
Migrate from Travis to GitHub Actions (#1526)
* Move any remaining Travis processes to GitHub Actions * Remove Travis files and references. (Excluding `ReleaseNotes.md`) * Change badges as well. - Remove two defunct badges. - Add a badge per GitHub Actions workflow. Fixes #1522
This commit is contained in:
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@@ -71,7 +71,7 @@ Include details about your configuration, circuit and environment:
|
||||
* Avoid platform-dependent code.
|
||||
* Use c98 types where possible for better portablity.
|
||||
* In almost all cases, code & documentation should be peer-reviewed by at least one other contributor.
|
||||
* The code should pass all the existing testing infrastructure in Travis. e.g. Unit tests, cpplint, and basic compilation.
|
||||
* The code should pass all the existing testing infrastructure in GitHub Actions. e.g. Unit tests, cpplint, and basic compilation etc.
|
||||
* State if you have tested this under real conditions if you have, and what other tests you may have carried out.
|
||||
|
||||
### Git Commit Messages
|
||||
|
||||
37
.github/workflows/Build.yml
vendored
Normal file
37
.github/workflows/Build.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
Build_Examples:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
- name: Build all the examples
|
||||
env:
|
||||
PLATFORMIO_BUILD_CACHE_DIR: "../../.pio/buildcache"
|
||||
run: find . -name platformio.ini -type f | sed 's,/platformio.ini$,,' | xargs --verbose -n 1 pio run --jobs 2 --project-dir
|
||||
21
.github/workflows/Documentation.yml
vendored
Normal file
21
.github/workflows/Documentation.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# This is a basic workflow that is triggered on push/PRs to the master branch.
|
||||
|
||||
name: Documentation
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
||||
# or API.
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
Doxygen:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: SteffenSeckler/doxygen-action@v2.2.0beta4
|
||||
with:
|
||||
fail-on-warnings: true
|
||||
28
.github/workflows/Lint.yml
vendored
Normal file
28
.github/workflows/Lint.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Code Lint
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Linters:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pylint
|
||||
pip install cpplint
|
||||
- name: Analysing the code with pylint
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
pylint -d F0001 {src,test,tools}/*.py
|
||||
- name: Analysing the code with cpplint
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
cpplint --extensions=c,cc,cpp,ino --headers=h,hpp {src,src/locale,test,tools}/*.{h,c,cc,cpp,hpp,ino} examples/*/*.{h,c,cc,cpp,hpp,ino}
|
||||
54
.github/workflows/MetaChecks.yml
vendored
Normal file
54
.github/workflows/MetaChecks.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# This is a basic workflow that is triggered on push/PRs to the master branch.
|
||||
|
||||
name: Library Linter
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
||||
# or API.
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
arduino-library-manager-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: arduino/arduino-lint-action@v1
|
||||
with:
|
||||
library-manager: update
|
||||
compliance: strict
|
||||
# Detect case-insensitive file duplication in the same directory.
|
||||
# This can cause a problem for the Arduino IDE on Windows & Macs.
|
||||
# See:
|
||||
# - https://github.com/arduino/Arduino/issues/11441
|
||||
# - https://github.com/crankyoldgit/IRremoteESP8266/issues/1451
|
||||
detect-duplicate-files:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Look for case-insensitive filename collisions.
|
||||
run: DUPS=$(find . -path '*/.pio' -prune -o -print | sort | uniq -D -i); if [[ -n "${DUPS}" ]]; then echo -e "Duplicates found:\n${DUPS}"; false; fi
|
||||
version-number-consitent:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check all the version numbers match.
|
||||
run: |
|
||||
LIB_VERSION=$(egrep "^#define\s+_IRREMOTEESP8266_VERSION_\s+" src/IRremoteESP8266.h | cut -d\" -f2)
|
||||
test ${LIB_VERSION} == "$(jq -r .version library.json)"
|
||||
grep -q "^version=${LIB_VERSION}$" library.properties
|
||||
examples-have-platformio_ini:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check that every example directory has a platformio.ini file.
|
||||
run: (status=0; for dir in examples/*; do if [[ ! -f "${dir}/platformio.ini" ]]; then echo "${dir} has no 'platform.ini' file!"; status=1; fi; done; exit ${status})
|
||||
supported-devices-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check that all files have supported sections.
|
||||
run: (SUPPORTED_OUTPUT=$(python3 tools/scrape_supported_devices.py --noout --alert 2>&1); if [[ $? -ne 0 || -n "${SUPPORTED_OUTPUT}" ]]; then echo "${SUPPORTED_OUTPUT}"; exit 1; fi)
|
||||
10
.github/workflows/UnitTests.yml
vendored
10
.github/workflows/UnitTests.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Unit tests
|
||||
name: Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -14,8 +14,14 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install the Google test suite
|
||||
env:
|
||||
MAKEFLAGS: "-j 2"
|
||||
run: (cd test; make install-googletest)
|
||||
- name: Build and run the library unit tests.
|
||||
env:
|
||||
MAKEFLAGS: "-j 2"
|
||||
run: (cd test; make run)
|
||||
- name: Build and run the tools unit tests.
|
||||
run: (cd tools; make run_tests)
|
||||
env:
|
||||
MAKEFLAGS: "-j 2"
|
||||
run: (cd tools; make all; make run_tests)
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
# This is a basic workflow that is triggered on push/PRs to the master branch.
|
||||
|
||||
name: Arduino Library Manager Linter
|
||||
|
||||
# Controls when the action will run. Workflow runs when manually triggered using the UI
|
||||
# or API.
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
arduino-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: arduino/arduino-lint-action@v1
|
||||
with:
|
||||
library-manager: update
|
||||
compliance: strict
|
||||
detect-duplicate-files:
|
||||
# Detect case-insensitive file duplication in the same directory.
|
||||
# This can cause a problem for the Arduino IDE on Windows & Macs.
|
||||
# See:
|
||||
# - https://github.com/arduino/Arduino/issues/11441
|
||||
# - https://github.com/crankyoldgit/IRremoteESP8266/issues/1451
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Look for case-insensitive filename collisions.
|
||||
run: DUPS=$(find . -path '*/.pio' -prune -o -print | sort | uniq -D -i); if [[ -n "${DUPS}" ]]; then echo -e "Duplicates found:\n${DUPS}"; false; fi
|
||||
72
.travis.yml
72
.travis.yml
@@ -1,72 +0,0 @@
|
||||
dist: bionic
|
||||
language: c
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- jq
|
||||
- doxygen
|
||||
- graphviz
|
||||
- python3.8
|
||||
- python3-pip
|
||||
- pylint3
|
||||
- python3-setuptools
|
||||
env:
|
||||
- PLATFORMIO_BUILD_CACHE_DIR="../../.pio/buildcache"
|
||||
IRRECVDUMP_RE=".*IRrecvDumpV.*"
|
||||
IRMQTTSERVER_RE=".*IRMQTTServer.*"
|
||||
MAKEFLAGS="-j 2"
|
||||
cache:
|
||||
directories:
|
||||
- "~/.platformio"
|
||||
before_install:
|
||||
- wget https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py
|
||||
- python --version && pip --version
|
||||
- python3 --version && pip3 --version
|
||||
- sudo pip3 install -U platformio
|
||||
- pio update
|
||||
script: echo Running checks
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
on_failure: change
|
||||
jobs:
|
||||
include:
|
||||
- name: "Compile the trivial examples"
|
||||
script:
|
||||
# Check that everything compiles but some heavy tasks e.g. IRMQTTServer & IRrecvDumpV2+
|
||||
# i.e. We are splitting the work load in to parallel tasks.
|
||||
- find . -regextype egrep -name platformio.ini -type f \! -regex "${IRRECVDUMP_RE}|${IRMQTTSERVER_RE}" | sed 's,/platformio.ini$,,' | xargs --verbose -n 1 pio run --jobs 2 --project-dir
|
||||
- name: "Compile the IRrecvDumpV2+ examples"
|
||||
script:
|
||||
# Check that IRrecvDumpV2+ compiles.
|
||||
# i.e. We are splitting the work load in to parallel tasks.
|
||||
- find . -regextype egrep -name platformio.ini -type f -regex "${IRRECVDUMP_RE}" | sed 's,/platformio.ini$,,' | xargs --verbose -n 1 pio run --jobs 2 --project-dir
|
||||
- name: "Unit tests, Linter, Doc checks, & Compile IRMQTTServer"
|
||||
script:
|
||||
# Run all the Tests & check the code linters have no issues, and that
|
||||
# IRMQTTServer compiles.
|
||||
# i.e. We are splitting the work load in to parallel tasks.
|
||||
# Check the version numbers match.
|
||||
- LIB_VERSION=$(egrep "^#define\s+_IRREMOTEESP8266_VERSION_\s+" src/IRremoteESP8266.h | cut -d\" -f2)
|
||||
- test ${LIB_VERSION} == "$(jq -r .version library.json)"
|
||||
- grep -q "^version=${LIB_VERSION}$" library.properties
|
||||
# Check the tools programs compile.
|
||||
- (cd tools; make all)
|
||||
# Check for lint issues.
|
||||
- shopt -s nullglob
|
||||
- python cpplint.py --extensions=c,cc,cpp,ino --headers=h,hpp {src,src/locale,test,tools}/*.{h,c,cc,cpp,hpp,ino} examples/*/*.{h,c,cc,cpp,hpp,ino}
|
||||
- pylint3 -d F0001 {src,test,tools}/*.py
|
||||
- shopt -u nullglob
|
||||
# Install the Google test suite.
|
||||
- (cd test; make install-googletest)
|
||||
# Build and run the unit tests.
|
||||
- (cd test; make run)
|
||||
- (cd tools; make run_tests)
|
||||
# Check that every example directory has a platformio.ini file.
|
||||
- (status=0; for dir in examples/*; do if [[ ! -f "${dir}/platformio.ini" ]]; then echo "${dir} has no 'platform.ini' file!"; status=1; fi; done; exit ${status})
|
||||
# Check that doxygen completes without errors or warnings.
|
||||
- (DOXYGEN_OUTPUT=$(doxygen 2>&1); if [[ $? -ne 0 || -n "${DOXYGEN_OUTPUT}" ]]; then echo "${DOXYGEN_OUTPUT}"; exit 1; fi)
|
||||
# Check that all files has supported sections.
|
||||
- (SUPPORTED_OUTPUT=$(python3 tools/scrape_supported_devices.py --noout --alert 2>&1); if [[ $? -ne 0 || -n "${SUPPORTED_OUTPUT}" ]]; then echo "${SUPPORTED_OUTPUT}"; exit 1; fi)
|
||||
# Check that IRMQTTServer compiles.
|
||||
- find . -regextype egrep -name platformio.ini -type f -regex "${IRMQTTSERVER_RE}" | sed 's,/platformio.ini$,,' | xargs --verbose -n 1 pio run --jobs 2 --project-dir
|
||||
@@ -1,9 +1,10 @@
|
||||

|
||||
|
||||
[](https://travis-ci.com/crankyoldgit/IRremoteESP8266)
|
||||
[](../../actions/workflows/Build.yml)
|
||||
[](../../actions/workflows/Lint.yml)
|
||||
[](../../actions/workflows/UnitTests.yml)
|
||||
[](../../actions/workflows/Documentation.yml/badge.svg)
|
||||
[](https://www.ardu-badge.com/IRremoteESP8266)
|
||||
[](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Average time to resolve an issue")
|
||||
[](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Percentage of issues still open")
|
||||
[](https://gitlicense.com/license/crankyoldgit/IRremoteESP8266)
|
||||
|
||||
This library enables you to **send _and_ receive** infra-red signals on an [ESP8266](https://github.com/esp8266/Arduino) or an
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||

|
||||
|
||||
[](https://travis-ci.com/crankyoldgit/IRremoteESP8266)
|
||||
[](../../actions/workflows/Build.yml/badge.svg)
|
||||
[](../../actions/workflows/Lint.yml)
|
||||
[](../../ctions/workflows/UnitTests.yml)
|
||||
[](../../actions/workflows/Documentation.yml)
|
||||
[](https://www.ardu-badge.com/IRremoteESP8266)
|
||||
[](https://www.ardu-badge.com/IRremoteESP8266)
|
||||
[](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Resolution Time")
|
||||
[](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Open issues")
|
||||
[](https://gitlicense.com/license/crankyoldgit/IRremoteESP8266)
|
||||
|
||||
Diese Programmbibliothek ermöglicht das **Senden _und_ Empfangen** von Infrarotsignalen mit [ESP8266](https://github.com/esp8266/Arduino)- und
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||

|
||||
|
||||
[](https://travis-ci.com/crankyoldgit/IRremoteESP8266)
|
||||
[](../../actions/workflows/Build.yml)
|
||||
[](../../actions/workflows/Lint.yml)
|
||||
[](../../actions/workflows/UnitTests.yml)
|
||||
[](../../actions/workflows/Documentation.yml)
|
||||
[](https://www.ardu-badge.com/IRremoteESP8266)
|
||||
[](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Average time to resolve an issue")
|
||||
[](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Percentage of issues still open")
|
||||
[](https://gitlicense.com/license/crankyoldgit/IRremoteESP8266)
|
||||
[](https://gitlicense.com/license/crankyoldgit/IRremoteESP8266)
|
||||
|
||||
Cette librairie vous permetra de **recevoir et d'envoyer des signaux** infrarouge sur le protocole [ESP8266](https://github.com/esp8266/Arduino) ou sur le protocole
|
||||
[ESP32](https://github.com/espressif/arduino-esp32) en utilisant le [Arduino framework](https://www.arduino.cc/) qui utilise la norme 940nm IR LEDs et le module basique de reception d'onde IR. Exemple : TSOP{17,22,24,36,38,44,48}* modules etc.
|
||||
|
||||
@@ -303,9 +303,10 @@ def convert_rawdata(data_str):
|
||||
for timing in [x.strip() for x in data_str.split(',')]:
|
||||
try:
|
||||
results.append(int(timing))
|
||||
except ValueError:
|
||||
except ValueError as non_numeric:
|
||||
raise ValueError(
|
||||
"Raw Data contains a non-numeric value of '%s'." % timing)
|
||||
"Raw Data contains a non-numeric value of '%s'." %
|
||||
timing) from non_numeric
|
||||
return results
|
||||
|
||||
|
||||
|
||||
@@ -93,9 +93,9 @@ def getallacs():
|
||||
match = IRSEND_FN_RE.match(path.name)
|
||||
if match:
|
||||
rawmodels = getenums(path)
|
||||
for acprotocol in rawmodels:
|
||||
for acprotocol, acmodels in rawmodels.items():
|
||||
models = set()
|
||||
for model in rawmodels[acprotocol]:
|
||||
for model in acmodels:
|
||||
model = model.upper()
|
||||
model = model.replace("K{}".format(acprotocol.upper()), "")
|
||||
if model and model not in EXCLUDED_PROTOCOLS:
|
||||
|
||||
Reference in New Issue
Block a user