Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI Builder pipeline #152

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/platformio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: PlatformIO

on:
push:
branches: [ master, cibuilder ]
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**.ini'
- '**.yml'

pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 2

steps:
- uses: actions/checkout@v3
- name: PIO Cache
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
#restore-keys: |
# ${{ runner.os }}-pio
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Platformio
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
#platformio pkg update
- name: PIO Build
run: |
pwd
find examples -type f -name '*.ino' -exec sh -c 'mv "$1" "${1%.ino}.cpp"' _ {} \;
mkdir lib && mv src ./lib/
platformio run -c platformio_ci.ini
#platformio ci --lib ./src -c platformio_ci.ini examples
#platformio ci --lib ./src -c platformio_ci.ini -e avr_ci ${{ matrix.avr }}
#platformio ci --lib ./src -c platformio_ci.ini -e esp32_ci ${{ matrix.esp32 }}
#env:
# PLATFORMIO_CI_SRC: ${{ matrix.avr }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### Cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers
#### Version 3.7.0: 2022-10-10 [Latest updates](https://github.com/arkhipenko/TaskScheduler/wiki/Latest-Updates)

[![arduino-library-badge](https://www.ardu-badge.com/badge/TaskScheduler.svg?)](https://www.ardu-badge.com/TaskScheduler)[![xscode](https://img.shields.io/badge/Available%20on-xs%3Acode-blue?style=?style=plastic&logo=appveyor&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF////////VXz1bAAAAAJ0Uk5T/wDltzBKAAAAlUlEQVR42uzXSwqAMAwE0Mn9L+3Ggtgkk35QwcnSJo9S+yGwM9DCooCbgn4YrJ4CIPUcQF7/XSBbx2TEz4sAZ2q1RAECBAiYBlCtvwN+KiYAlG7UDGj59MViT9hOwEqAhYCtAsUZvL6I6W8c2wcbd+LIWSCHSTeSAAECngN4xxIDSK9f4B9t377Wd7H5Nt7/Xz8eAgwAvesLRjYYPuUAAAAASUVORK5CYII=)](https://xscode.com/arkhipenko/TaskScheduler)
[![arduino-library-badge](https://www.ardu-badge.com/badge/TaskScheduler.svg?)](https://www.ardu-badge.com/TaskScheduler)[![xscode](https://img.shields.io/badge/Available%20on-xs%3Acode-blue?style=?style=plastic&logo=appveyor&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF////////VXz1bAAAAAJ0Uk5T/wDltzBKAAAAlUlEQVR42uzXSwqAMAwE0Mn9L+3Ggtgkk35QwcnSJo9S+yGwM9DCooCbgn4YrJ4CIPUcQF7/XSBbx2TEz4sAZ2q1RAECBAiYBlCtvwN+KiYAlG7UDGj59MViT9hOwEqAhYCtAsUZvL6I6W8c2wcbd+LIWSCHSTeSAAECngN4xxIDSK9f4B9t377Wd7H5Nt7/Xz8eAgwAvesLRjYYPuUAAAAASUVORK5CYII=)](https://xscode.com/arkhipenko/TaskScheduler) | [![CI Builder](https://github.com/arkhipenko/TaskScheduler/actions/workflows/platformio.yml/badge.svg)](https://github.com/arkhipenko/TaskScheduler/actions/workflows/platformio.yml)

#### Get expedited support or integration consultation for TaskScheduler [from xs:code](https://xscode.com/arkhipenko/TaskScheduler)

Expand Down
172 changes: 172 additions & 0 deletions platformio_ci.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
; a set of envs for CI builder

[platformio]
src_dir = ./examples/
;lib_dir = ./src/

[env]
framework = arduino
build_flags =
; -D CORE_DEBUG_LEVEL=0
lib_deps =
; https://github.com/vortigont/TaskScheduler

[esp32_common]
platform = espressif32
board = esp32dev
framework = ${env.framework}
lib_deps = ${env.lib_deps}
build_flags =
${env.build_flags}

[esp8266_common]
platform = espressif8266
board = d1_mini
framework = ${env.framework}
lib_deps = ${env.lib_deps}
build_flags =
${env.build_flags}

[avr_common]
platform = atmelavr
board = ATmega32
framework = ${env.framework}
lib_deps =
${env.lib_deps}
https://github.com/McNeight/MemoryFree
https://github.com/interactive-matter/QueueArray
build_flags =
${env.build_flags}

[nrf52_common]
platform = nordicnrf52
board = adafruit_feather_nrf52840
framework = ${env.framework}
lib_deps = ${env.lib_deps}
build_flags =
${env.build_flags}

[teensy]
platform = teensy
board = teensy35
framework = ${env.framework}
lib_deps = ${env.lib_deps}
build_flags =
${env.build_flags}

[stm32]
platform = ststm32
board = genericSTM32F401CC
framework = ${env.framework}
lib_deps = ${env.lib_deps}
build_flags =
${env.build_flags}

; ======= AVR =======
[env:avr_example00_Blink]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example00_Blink>

; status request
[env:avr_example05_StatusRequest]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example05_StatusRequest>

; AVR WDT
[env:avr_example07]
extends = avr_common
board = nanoatmega328
build_src_filter = -<*> +<Scheduler_example07_WDT>

; AVR LTS
[env:avr_example08_LTS]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example08_LTS>

; AVR TimeCritical
[env:avr_example09_TC]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example09_TimeCritical>

; AVR Priority
[env:avr_example11_priority]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example11_Priority>

; AVR micro
[env:avr_example13_micro]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example13_Micros>

; AVR timeout
[env:avr_example17_timeout]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example17_Timeout>

; build error
;[env:avr_example19_dyn]
;extends = avr_common
;build_src_filter = -<*> +<Scheduler_example19_Dynamic_Tasks>

; build error
;[env:avr_example19_selfdestruct]
;extends = avr_common
;build_src_filter = -<*> +<Scheduler_example19_Dynamic_Tasks_SelfDestruct>

[env:avr_example20_statusreq]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example20_StatusRequest_LTS_WDT_Timeout_Object>

[env:avr_example21_oocb]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example21_OO_Callbacks>

; build error
;[env:avr_example25_schain]
;extends = avr_common
;build_src_filter = -<*> +<Scheduler_example25_SCHEDULER_CHAIN>

[env:avr_example26_schopts]
extends = avr_common
build_src_filter = -<*> +<Scheduler_example26_SCHEDULING_OPTIONS>



; ======= ESP8266 =======
[env:esp8266_example00_Blink]
extends = esp8266_common
build_src_filter = -<*> +<Scheduler_example00_Blink>

; ex14 build fails on 8266
;[env:esp8266_example14_yield]
;extends = esp8266_common
;build_src_filter = -<*> +<Scheduler_example14_Yield>
;lib_deps =
; ${esp8266_common.lib_deps}
; https://github.com/interactive-matter/QueueArray

[env:esp8266_example15_stdfunc]
extends = esp8266_common
build_src_filter = -<*> +<Scheduler_example15_STDFunction>


; ======= ESP32 =======
[env:esp32_example00_Blink]
extends = esp32_common
build_src_filter = -<*> +<Scheduler_example00_Blink>

; ======= nRF52 =======
[env:nrf52_example00_BlinkNS]
extends = nrf52_common
build_src_filter = -<*> +<Scheduler_example00_Blink_Namespace>

; ======= TEENSY =======
[env:teensy_example00_Blink]
extends = teensy
build_src_filter = -<*> +<Scheduler_example00_Blink>

; ======= STM32 =======
[env:stm32_example00_Blink]
extends = stm32
build_src_filter = -<*> +<Scheduler_example00_Blink>