From 0380609b2d868582fdffc1adc8122618abfb8183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Z=C3=A1hradn=C3=ADk?= Date: Tue, 17 Sep 2024 11:53:58 +0200 Subject: [PATCH] Migrate from ArduinoCI to PlatformIO --- .arduino-ci.yaml | 8 ----- .github/workflows/arduino_ci.yml | 11 ------- .github/workflows/platformio.yml | 32 +++++++++++++++++++ README.md | 2 +- .../platformio.ini | 16 +++++----- platformio.ini | 14 ++++++++ 6 files changed, 55 insertions(+), 28 deletions(-) delete mode 100644 .arduino-ci.yaml delete mode 100644 .github/workflows/arduino_ci.yml create mode 100644 .github/workflows/platformio.yml create mode 100644 platformio.ini diff --git a/.arduino-ci.yaml b/.arduino-ci.yaml deleted file mode 100644 index bd41580..0000000 --- a/.arduino-ci.yaml +++ /dev/null @@ -1,8 +0,0 @@ -compile: - libraries: - - U8g2 - - SimpleTicker - - OneWire - - DallasTemperature - platforms: - - esp32 diff --git a/.github/workflows/arduino_ci.yml b/.github/workflows/arduino_ci.yml deleted file mode 100644 index d6dc2a7..0000000 --- a/.github/workflows/arduino_ci.yml +++ /dev/null @@ -1,11 +0,0 @@ -name: Arduino_CI - -on: [push, pull_request] - -jobs: - arduino_ci: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: Arduino-CI/action@stable-1.x \ No newline at end of file diff --git a/.github/workflows/platformio.yml b/.github/workflows/platformio.yml new file mode 100644 index 0000000..1a9ec26 --- /dev/null +++ b/.github/workflows/platformio.yml @@ -0,0 +1,32 @@ +name: Build +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + example: + - examples/AnalogDigitalInputs/AnalogDigitalInputs.ino + - examples/DCMotorCurrentMeasurement/DCMotorCurrentMeasurement.ino + - examples/DCMotorPwm/DCMotorPwm.ino + - examples/DCMotorSimple/DCMotorSimple.ino + - examples/HelloWorld/HelloWorld.ino + - examples/TemperatureSensor/TemperatureSensor.ino + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + ~/.cache/pip + ~/.platformio/.cache + key: ${{ runner.os }}-pio + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install PlatformIO Core + run: pip install --upgrade platformio + - name: Build PlatformIO examples + run: pio ci --project-conf=platformio.ini + env: + PLATFORMIO_CI_SRC: ${{ matrix.example }} \ No newline at end of file diff --git a/README.md b/README.md index d588d88..f9e8b93 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ACDU board -[![Arduino_CI](https://github.com/JSC-TechMinds/acdu-support-library/actions/workflows/arduino_ci.yml/badge.svg)](https://github.com/JSC-TechMinds/acdu-support-library/actions/workflows/arduino_ci.yml) +[![PlatformIO](https://github.com/JSC-TechMinds/acdu-support-library/actions/workflows/platformio.yml/badge.svg)](https://github.com/JSC-TechMinds/acdu-support-library/actions/workflows/platformio.yml) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache--2.0-green.svg)](https://github.com/JSC-TechMinds/acdu-support-library/blob/main/LICENSE) [![GitHub release](https://img.shields.io/github/release/JSC-TechMinds/acdu-support-library.svg?maxAge=3600)](https://github.com/JSC-TechMinds/acdu-support-library/releases) [![JSC TechMinds](https://img.shields.io/badge/JSC-TechMinds-green.svg)](https://www.jsctm.cz) diff --git a/examples/PlatformIO project template/platformio.ini b/examples/PlatformIO project template/platformio.ini index e90ddba..42d870c 100644 --- a/examples/PlatformIO project template/platformio.ini +++ b/examples/PlatformIO project template/platformio.ini @@ -25,12 +25,12 @@ lib_deps = Wire jsc/ACDU@^1.0.2 jsc/Ticker@^2.1.0 - paulstoffregen/OneWire@^2.3.7 - olikraus/U8g2@^2.34.22 + paulstoffregen/OneWire@^2.3.8 + olikraus/U8g2@^2.35.27 ; Optional: ArduinoLog; improved logging to serial. - ; https://github.com/thijse/Arduino-Log - ; thijse/ArduinoLog@^1.1.1 + ; https://github.com/JSC-TechMinds/Arduino-Log + ; jsc/ArduinoLog@^1.2.1 ; Optional: Time library ; paulstoffregen/Time@^1.6.1 @@ -43,10 +43,10 @@ lib_deps = ; much more advanced than our examples here. Perhaps you can save ; significant development time if you contact us first. We provide ; commercial TcMenu/ACDU support as well. - ; davetcc/tcMenu@^4.0.0 - ; davetcc/IoAbstraction@^4.0.0 - ; davetcc/TaskManagerIO@^1.3.5 - ; davetcc/tcUnicodeHelper@^1.0.0 + ; tcmenu/tcMenu@^4.3.1 + ; tcmenu/IoAbstraction@^4.3.0 + ; tcmenu/TaskManagerIO@^1.4.3 + ; tcmenu/tcUnicodeHelper@^1.1.1 ; Optional: Read temperature over 1-Wire ; milesburton/DallasTemperature@^3.11.0 diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..cfd94f1 --- /dev/null +++ b/platformio.ini @@ -0,0 +1,14 @@ +[env:esp32dev] +framework = arduino +platform = espressif32 +board = esp32dev + +lib_deps = + SPI + Wire + ACDU + olikraus/U8g2@^2.35.27 + jsc/Ticker@^2.1.0 + paulstoffregen/OneWire@^2.3.8 + milesburton/DallasTemperature@^3.11.0 +