Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak committed Dec 12, 2020
1 parent 587fcd4 commit 98b7ca2
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 9 deletions.
87 changes: 78 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,102 @@ on:
push:
paths-ignore:
- "README.md"
branches:
- master
pull_request:
branches:
- "*"
schedule:
- cron: "0 8 1 * *"

jobs:
arduino:
platformio-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Compile
run: |
pio ci --lib="." --board=uno --board=zero --board=attiny85 --board=esp8285 --board=esp32dev --board=bluepill_f103c8
env:
PLATFORMIO_CI_SRC: examples/MovingAverageFloat

arduino-build:
strategy:
matrix:
arduino-platform: ["arduino:samd", "arduino:avr"]
board: ["UNO", "Zero", "ATTiny85", "ESP8266", "ESP32", "STM32F103C8"]
include:
- arduino-platform: "arduino:samd"
fqbn: "arduino:samd:zero"
- arduino-platform: "arduino:avr"
- board: "UNO"
platform: "arduino:avr"
fqbn: "arduino:avr:uno"
url: ""

- board: "Zero"
platform: "arduino:samd"
fqbn: "arduino:samd:arduino_zero_native"
url: ""

- board: "ATTiny85"
platform: "ATTinyCore:avr"
fqbn: "ATTinyCore:avr:attinyx5"
url: http://drazzy.com/package_drazzy.com_index.json

- board: "ESP8266"
platform: "esp8266:esp8266"
fqbn: "esp8266:esp8266:esp8285"
url: https://arduino.esp8266.com/stable/package_esp8266com_index.json

- board: "ESP32"
platform: "esp32:esp32"
fqbn: "esp32:esp32:esp32"
url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

- board: "STM32F103C8"
platform: "STM32:stm32"
fqbn: "STM32:stm32:GenF1:pnum=BLUEPILL_F103C8"
url: https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prepare
run: |
cp ./MovingAverageFloat.h ./examples/MovingAverageFloat
- name: Set up Python
if: ${{ matrix.board == 'ESP32' }}
uses: actions/setup-python@v2
with:
python-version: "3.8"

- name: Install pyserial
if: ${{ matrix.board == 'ESP32' }}
run: |
python -m pip install --upgrade pip
pip install --upgrade pyserial
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1.0.0
uses: arduino/setup-arduino-cli@v1.1.1

- name: Install platform
- name: "Install platform for ${{ matrix.board }}"
run: |
arduino-cli core update-index
arduino-cli core install ${{ matrix.arduino-platform }}
arduino-cli core install ${{ matrix.platform }}
env:
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: ${{ matrix.url }}

- name: Compile
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/basic
run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/MovingAverageFloat
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Hysteresis
![build](https://github.com/pilotak/Hysteresis/workflows/build/badge.svg)

Fixed point hysteresis filter for Arduino & Mbed

**_Type_** type can be:
Expand Down
17 changes: 17 additions & 0 deletions library.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Hysteresis",
"keywords": "filter, hysteresis, processing",
"description": "Fixed point hysteresis filter for Arduino & Mbed",
"repository": {
"type": "git",
"url": "https://github.com/pilotak/Hysteresis.git"
},
"authors": {
"name": "Pavel Slama",
"email": "info@pavelslama.cz",
"url": "https://github.com/pilotak"
},
"version": "1.0.0",
"frameworks": "arduino, mbed",
"platforms": "*"
}

0 comments on commit 98b7ca2

Please sign in to comment.