-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
192 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- "*" | ||
|
||
jobs: | ||
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 | ||
pio lib -g install "pilotak/MovingAverage" | ||
pio lib -g install "pilotak/MovingAverageAngle" | ||
- name: Compile UNO | ||
run: | | ||
pio ci --lib="." --board=uno | ||
env: | ||
PLATFORMIO_CI_SRC: ./examples/timers/WeatherMeters_AVR | ||
|
||
- name: Compile ESP8266 | ||
run: | | ||
pio ci --lib="." --board=esp8285 | ||
env: | ||
PLATFORMIO_CI_SRC: ./examples/timers/WeatherMeters_ESP8266 | ||
|
||
- name: Compile ESP32 | ||
run: | | ||
pio ci --lib="." --board=esp32dev | ||
env: | ||
PLATFORMIO_CI_SRC: ./examples/timers/WeatherMeters_ESP32 | ||
|
||
- name: Compile adhoc | ||
run: | | ||
pio ci --lib="." --board=uno --board=esp8285 --board=esp32dev | ||
env: | ||
PLATFORMIO_CI_SRC: ./examples/WeatherMeters_adhoc | ||
|
||
- name: Compile external ADC | ||
run: | | ||
pio lib -g install "pilotak/MCP3X21" | ||
pio ci --lib="." --board=uno --board=esp8285 --board=esp32dev | ||
env: | ||
PLATFORMIO_CI_SRC: ./examples/WeatherMeters_external_ADC | ||
|
||
arduino-build: | ||
strategy: | ||
matrix: | ||
board: ["UNO", "ESP8266", "ESP32"] | ||
include: | ||
- board: "UNO" | ||
platform: "arduino:avr" | ||
fqbn: "arduino:avr:uno" | ||
url: "" | ||
|
||
- 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 | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
run: | | ||
cp ./WeatherMeters.h ./examples/WeatherMeters_external_ADC | ||
cp ./WeatherMeters.h ./examples/WeatherMeters_adhoc | ||
- 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/[email protected] | ||
|
||
- name: "Install platform for ${{ matrix.board }}" | ||
run: | | ||
arduino-cli core update-index | ||
arduino-cli core install ${{ matrix.platform }} | ||
arduino-cli lib install --git-url https://github.com/pilotak/MovingAverage | ||
arduino-cli lib install --git-url https://github.com/pilotak/MovingAverageAngle | ||
env: | ||
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: ${{ matrix.url }} | ||
ARDUINO_ENABLE_UNSAFE_LIBRARY_INSTALL: true | ||
|
||
- name: Compile timer UNO | ||
if: ${{ matrix.board == 'UNO' }} | ||
run: | | ||
cp ./WeatherMeters.h ./examples/timers/WeatherMeters_AVR | ||
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/timers/WeatherMeters_AVR | ||
- name: Compile timer ESP8266 | ||
if: ${{ matrix.board == 'ESP8266' }} | ||
run: | | ||
cp ./WeatherMeters.h ./examples/timers/WeatherMeters_ESP8266 | ||
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/timers/WeatherMeters_ESP8266 | ||
- name: Compile timer ESP32 | ||
if: ${{ matrix.board == 'ESP32' }} | ||
run: | | ||
cp ./WeatherMeters.h ./examples/timers/WeatherMeters_ESP32 | ||
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/timers/WeatherMeters_ESP32 | ||
- name: Compile adhoc | ||
run: | | ||
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/WeatherMeters_adhoc | ||
- name: Compile external ADC | ||
run: | | ||
arduino-cli lib install --git-url https://github.com/pilotak/MCP3X21 | ||
arduino-cli compile --fqbn ${{ matrix.fqbn }} ./examples/WeatherMeters_external_ADC | ||
env: | ||
ARDUINO_ENABLE_UNSAFE_LIBRARY_INSTALL: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare | ||
id: prepare | ||
run: | | ||
git fetch --prune --unshallow --tags -f | ||
VERSION=$(git tag --points-at HEAD) | ||
VERSION=${VERSION//v} | ||
echo "## :bookmark_tabs: Changes" >>"CHANGELOG.md" | ||
git log --pretty=format:"- %s %H%n" $(git describe --abbrev=0 --tags $(git describe --tags --abbrev=0)^)...$(git describe --tags --abbrev=0) >>"CHANGELOG.md" | ||
echo ::set-output name=version::${VERSION} | ||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ steps.prepare.outputs.version }} | ||
body_path: CHANGELOG.md | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 0 additions & 53 deletions
53
examples/timers/WeatherMeters_STM32/WeatherMeters_STM32.ino
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,23 +2,20 @@ | |
"name": "WeatherMeters", | ||
"keywords": "weather, meters, processing, wind, speed, direction, rain", | ||
"description": "Weather meters processing library", | ||
"repository": | ||
{ | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pilotak/WeatherMeters.git" | ||
}, | ||
"authors": | ||
{ | ||
"name": "Pavel Slama", | ||
"email": "[email protected]", | ||
"url": "https://github.com/pilotak" | ||
"authors": { | ||
"name": "Pavel Slama", | ||
"email": "[email protected]", | ||
"url": "https://github.com/pilotak" | ||
}, | ||
"dependencies": | ||
{ | ||
"name": "MovingAverageAngle", | ||
"version": "^1.0.3" | ||
"dependencies": { | ||
"name": "pilotak/MovingAverageAngle", | ||
"version": "^1.0.4" | ||
}, | ||
"version": "2.0.0", | ||
"frameworks": "arduino", | ||
"platforms": "*" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ includes=WeatherMeters.h | |
category=Signal Input/Output | ||
version=2.0.0 | ||
architectures=* | ||
depends=MovingAverageAngle |