Skip to content

Commit

Permalink
Migrate from Travis to GitHub Actions (#1526)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
crankyoldgit authored Jul 10, 2021
1 parent 2f0583e commit c71a150
Show file tree
Hide file tree
Showing 13 changed files with 168 additions and 123 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 21 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 28 additions & 0 deletions .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 54 additions & 0 deletions .github/workflows/MetaChecks.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 8 additions & 2 deletions .github/workflows/UnitTests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests
name: Tests

on:
push:
Expand All @@ -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)
34 changes: 0 additions & 34 deletions .github/workflows/arduino_library_manager_linter.yml

This file was deleted.

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

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
![IRremoteESP8266 Library](./assets/images/banner.svg)

[![Build Status](https://travis-ci.com/crankyoldgit/IRremoteESP8266.svg?branch=master)](https://travis-ci.com/crankyoldgit/IRremoteESP8266)
[![Build Status](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Build.yml/badge.svg)](../../actions/workflows/Build.yml)
[![Code Lint](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Lint.yml/badge.svg)](../../actions/workflows/Lint.yml)
[![Tests](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/UnitTests.yml/badge.svg)](../../actions/workflows/UnitTests.yml)
[![Documentation](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Documentation.yml/badge.svg)](../../actions/workflows/Documentation.yml/badge.svg)
[![arduino-library-badge](https://www.ardu-badge.com/badge/IRremoteESP8266.svg?)](https://www.ardu-badge.com/IRremoteESP8266)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/crankyoldgit/IRremoteESP8266.svg)](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/crankyoldgit/IRremoteESP8266.svg)](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Percentage of issues still open")
[![GitLicense](https://gitlicense.com/badge/crankyoldgit/IRremoteESP8266)](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
Expand Down
8 changes: 5 additions & 3 deletions README_de.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
![IRremoteESP8266 Library](./assets/images/banner.svg)

[![Build-Status](https://travis-ci.com/crankyoldgit/IRremoteESP8266.svg?branch=master)](https://travis-ci.com/crankyoldgit/IRremoteESP8266)
[![Build-Status](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Build.yml/badge.svg)](../../actions/workflows/Build.yml/badge.svg)
[![Code-Lint](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Lint.yml/badge.svg)](../../actions/workflows/Lint.yml)
[![Tests](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/UnitTests.yml/badge.svg)](../../ctions/workflows/UnitTests.yml)
[![Dokumentation](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Documentation.yml/badge.svg)](../../actions/workflows/Documentation.yml)
[![arduino-library-badge](https://www.ardu-badge.com/badge/IRremoteESP8266.svg?)](https://www.ardu-badge.com/IRremoteESP8266)
[![Arduino-Bibliothek-Abzeichen](https://www.ardu-badge.com/badge/IRremoteESP8266.svg?)](https://www.ardu-badge.com/IRremoteESP8266)
[![Durchschnittliche Zeit bis zur Problemlösung](http://isitmaintained.com/badge/resolution/crankyoldgit/IRremoteESP8266.svg)](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Resolution Time")
[![Prozentsatz der offenen Probleme](http://isitmaintained.com/badge/open/crankyoldgit/IRremoteESP8266.svg)](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Open issues")
[![Git-Lizenz](https://gitlicense.com/badge/crankyoldgit/IRremoteESP8266)](https://gitlicense.com/license/crankyoldgit/IRremoteESP8266)

Diese Programmbibliothek ermöglicht das **Senden _und_ Empfangen** von Infrarotsignalen mit [ESP8266](https://github.com/esp8266/Arduino)- und
Expand Down
9 changes: 5 additions & 4 deletions README_fr.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
![IRremoteESP8266 Library](./assets/images/banner.svg)

[![Build Status](https://travis-ci.com/crankyoldgit/IRremoteESP8266.svg?branch=master)](https://travis-ci.com/crankyoldgit/IRremoteESP8266)
[![Construire](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Build.yml/badge.svg)](../../actions/workflows/Build.yml)
[![Charbon de code](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Lint.yml/badge.svg)](../../actions/workflows/Lint.yml)
[![Essais](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/UnitTests.yml/badge.svg)](../../actions/workflows/UnitTests.yml)
[![Documentation](https://github.com/crankyoldgit/IRremoteESP8266/actions/workflows/Documentation.yml/badge.svg)](../../actions/workflows/Documentation.yml)
[![arduino-library-badge](https://www.ardu-badge.com/badge/IRremoteESP8266.svg?)](https://www.ardu-badge.com/IRremoteESP8266)
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/crankyoldgit/IRremoteESP8266.svg)](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Average time to resolve an issue")
[![Percentage of issues still open](http://isitmaintained.com/badge/open/crankyoldgit/IRremoteESP8266.svg)](http://isitmaintained.com/project/crankyoldgit/IRremoteESP8266 "Percentage of issues still open")
[![GitLicense](https://gitlicense.com/badge/crankyoldgit/IRremoteESP8266)](https://gitlicense.com/license/crankyoldgit/IRremoteESP8266)
[![LicenseGit](https://gitlicense.com/badge/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.
Expand Down
5 changes: 3 additions & 2 deletions tools/auto_analyse_raw_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions tools/scrape_supported_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c71a150

Please sign in to comment.