From 57131f9a6412f82759aca02c53edfcf0b90774dd Mon Sep 17 00:00:00 2001 From: Jan Delgado Date: Wed, 25 Dec 2024 14:31:32 +0100 Subject: [PATCH] build examples in CI (#13) --- .common/Makefile | 25 ++++++++++++++++--------- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ .github/workflows/stale.yml | 16 ++++++++++++++++ heltec_wifi_lora32/platformio.ini | 2 +- wemos_d_duino/platformio.ini | 2 +- 5 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/stale.yml diff --git a/.common/Makefile b/.common/Makefile index ee1a53e..c231bd2 100644 --- a/.common/Makefile +++ b/.common/Makefile @@ -1,21 +1,28 @@ # makefile to build examples with platformi # -.PHONY: run clean upload monitor ci envdump +.PHONY: phony -run: +run: phony pio run -envdump: +envdump: phony -pio run --target envdump -clean: +clean: phony -pio run --target clean -upload: - pio run --target upload +upload: phony + pio run --target upload -monitor: - pio device monitor +monitor: phony + pio device monitor -tags: +tags: phony ctags -R + +ci: + find .. -maxdepth 2 -not -path '\.\./\.common/*' -name Makefile \ + -exec sh -c 'make -C $$(dirname {})' \; +phony: + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c6b4512 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +on: + push: + branches: + - master + pull_request: + branches: + - master + +name: build examples +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: install python + uses: actions/setup-python@v4 + with: + python-version: '3.13' + + - name: install tools + run: | + pip install platformio==6.1.10 + + - name: build examples + run: make -C .common ci diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..e068c31 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,16 @@ +name: 'Stale issue handler' +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@main + with: + stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days' + days-before-stale: 90 + days-before-close: 5 + exempt-issue-labels: 'blocked,must,should,keep' diff --git a/heltec_wifi_lora32/platformio.ini b/heltec_wifi_lora32/platformio.ini index 8462371..eb799b3 100644 --- a/heltec_wifi_lora32/platformio.ini +++ b/heltec_wifi_lora32/platformio.ini @@ -6,5 +6,5 @@ src_dir = . platform = espressif32 board = esp32dev framework = arduino -lib_deps=olikraus/U8g2@2.36.1 +lib_deps=olikraus/U8g2@2.36.2 diff --git a/wemos_d_duino/platformio.ini b/wemos_d_duino/platformio.ini index 39c3ba8..c5d25ef 100644 --- a/wemos_d_duino/platformio.ini +++ b/wemos_d_duino/platformio.ini @@ -6,4 +6,4 @@ src_dir = . platform = espressif8266 board = nodemcuv2 framework = arduino -lib_deps=olikraus/U8g2@2.36.1 +lib_deps=olikraus/U8g2@2.36.2