Skip to content

Commit

Permalink
restructured the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric committed Apr 21, 2024
1 parent e4b9f71 commit c54623d
Show file tree
Hide file tree
Showing 7 changed files with 195 additions and 50 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/arduino.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: AVR build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
project-type: library
build:
name: Test compiling
runs-on: ubuntu-latest

strategy:
matrix:
arduino-boards-fqbn:
- arduino:avr:uno # arudino uno
- arduino:sam:arduino_due_x # arduino due
- arduino:avr:mega # arduino mega2650
- arduino:avr:leonardo # arduino leonardo

include:
- arduino-boards-fqbn: arduino:avr:uno # arudino uno - compiling almost all examples
sketch-names: '**.ino'
required-libraries: PciManager
sketches-exclude: teensy4_current_control_low_side, full_control_serial, angle_control, bluepill_position_control, esp32_position_control, esp32_i2c_dual_bus_example, stm32_i2c_dual_bus_example, magnetic_sensor_spi_alt_example, osc_esp32_3pwm, osc_esp32_fullcontrol, nano33IoT_velocity_control, smartstepper_control,esp32_current_control_low_side, stm32_spi_alt_example, esp32_spi_alt_example, B_G431B_ESC1, odrive_example_spi, odrive_example_encoder, single_full_control_example, double_full_control_example, stm32_current_control_low_side, open_loop_velocity_6pwm

- arduino-boards-fqbn: arduino:sam:arduino_due_x # arduino due - one full example
sketch-names: single_full_control_example.ino

- arduino-boards-fqbn: arduino:avr:leonardo # arduino leonardo - one full example
sketch-names: open_loop_position_example.ino

- arduino-boards-fqbn: arduino:avr:mega # arduino mega2660 - one full example
sketch-names: single_full_control_example.ino


# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master
- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
required-libraries: ${{ matrix.required-libraries }}
platform-url: ${{ matrix.platform-url }}
sketch-names: ${{ matrix.sketch-names }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
50 changes: 50 additions & 0 deletions .github/workflows/esp32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: ESP32 build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
project-type: library
build:
name: Test compiling
runs-on: ubuntu-latest

strategy:
matrix:
arduino-boards-fqbn:
- esp32:esp32:esp32doit-devkit-v1 # esp32
- esp32:esp32:esp32s2 # esp32s2
- esp32:esp32:esp32s3 # esp32s3

include:

- arduino-boards-fqbn: esp32:esp32:esp32s2 # esp32s2
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch-names: bldc_driver_3pwm_standalone.ino,stepper_driver_2pwm_standalone.ino,stepper_driver_4pwm_standalone.ino

- arduino-boards-fqbn: esp32:esp32:esp32s3 # esp32s3
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch-names: esp32_position_control.ino, esp32_i2c_dual_bus_example.ino

- arduino-boards-fqbn: esp32:esp32:esp32doit-devkit-v1 # esp32
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch-names: esp32_position_control.ino, esp32_i2c_dual_bus_example.ino, esp32_current_control_low_side.ino, esp32_spi_alt_example.ino

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master
- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
required-libraries: ${{ matrix.required-libraries }}
platform-url: ${{ matrix.platform-url }}
sketch-names: ${{ matrix.sketch-names }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
39 changes: 39 additions & 0 deletions .github/workflows/rpi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: RP2040 build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
project-type: library
build:
name: Test compiling
runs-on: ubuntu-latest

strategy:
matrix:
arduino-boards-fqbn:
- arduino:mbed_rp2040:pico # rpi pico

include:

- arduino-boards-fqbn: arduino:mbed_rp2040:pico # raspberry pi pico - one example
sketch-names: open_loop_position_example.ino

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master
- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
required-libraries: ${{ matrix.required-libraries }}
platform-url: ${{ matrix.platform-url }}
sketch-names: ${{ matrix.sketch-names }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
44 changes: 44 additions & 0 deletions .github/workflows/samd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: SAMD build
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: arduino/arduino-lint-action@v1
with:
library-manager: update
project-type: library
build:
name: Test compiling
runs-on: ubuntu-latest

strategy:
matrix:
arduino-boards-fqbn:
- arduino:samd:nano_33_iot # samd21
- adafruit:samd:adafruit_metro_m4 # samd51

include:

- arduino-boards-fqbn: arduino:samd:nano_33_iot # samd21
sketch-names: nano33IoT_velocity_control.ino, smartstepper_control.ino

- arduino-boards-fqbn: adafruit:samd:adafruit_metro_m4 # samd51 - one full example
platform-url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
sketch-names: single_full_control_example.ino

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@master
- name: Compile all examples
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
required-libraries: ${{ matrix.required-libraries }}
platform-url: ${{ matrix.platform-url }}
sketch-names: ${{ matrix.sketch-names }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
50 changes: 2 additions & 48 deletions .github/workflows/ccpp.yml → .github/workflows/stm32.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Library Compile
name: STM32 build
on: [push, pull_request]
jobs:
lint:
Expand All @@ -16,60 +16,14 @@ jobs:
strategy:
matrix:
arduino-boards-fqbn:
- arduino:avr:uno # arudino uno
- arduino:sam:arduino_due_x # arduino due
- arduino:avr:mega # arduino mega2650
- arduino:avr:leonardo # arduino leonardo
- arduino:samd:nano_33_iot # samd21
- adafruit:samd:adafruit_metro_m4 # samd51
- esp32:esp32:esp32doit-devkit-v1 # esp32
- esp32:esp32:esp32s2 # esp32s2
- esp32:esp32:esp32s3 # esp32s3
- STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 # stm32 bluepill
- STMicroelectronics:stm32:Nucleo_64:pnum=NUCLEO_F411RE # stm32 nucleo
- STMicroelectronics:stm32:Nucleo_144:pnum=NUCLEO_F746ZG # stm32 nucleo f746zg
- STMicroelectronics:stm32:GenF4:pnum=GENERIC_F405RGTX # stm32f405 - odrive
- STMicroelectronics:stm32:GenL4:pnum=GENERIC_L475RGTX # stm32l475
- STMicroelectronics:stm32:Disco:pnum=B_G431B_ESC1 # B-G431-ESC1
- arduino:mbed_rp2040:pico # rpi pico

include:
- arduino-boards-fqbn: arduino:avr:uno # arudino uno - compiling almost all examples
sketch-names: '**.ino'
required-libraries: PciManager
sketches-exclude: teensy4_current_control_low_side, full_control_serial, angle_control, bluepill_position_control, esp32_position_control, esp32_i2c_dual_bus_example, stm32_i2c_dual_bus_example, magnetic_sensor_spi_alt_example, osc_esp32_3pwm, osc_esp32_fullcontrol, nano33IoT_velocity_control, smartstepper_control,esp32_current_control_low_side, stm32_spi_alt_example, esp32_spi_alt_example, B_G431B_ESC1, odrive_example_spi, odrive_example_encoder, single_full_control_example, double_full_control_example, stm32_current_control_low_side, open_loop_velocity_6pwm

- arduino-boards-fqbn: arduino:sam:arduino_due_x # arduino due - one full example
sketch-names: single_full_control_example.ino

- arduino-boards-fqbn: arduino:avr:leonardo # arduino leonardo - one full example
sketch-names: open_loop_position_example.ino

- arduino-boards-fqbn: arduino:avr:mega # arduino mega2660 - one full example
sketch-names: single_full_control_example.ino

- arduino-boards-fqbn: arduino:samd:nano_33_iot # samd21
sketch-names: nano33IoT_velocity_control.ino, smartstepper_control.ino

- arduino-boards-fqbn: arduino:mbed_rp2040:pico # raspberry pi pico - one example
sketch-names: open_loop_position_example.ino

- arduino-boards-fqbn: adafruit:samd:adafruit_metro_m4 # samd51 - one full example
platform-url: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
sketch-names: single_full_control_example.ino

- arduino-boards-fqbn: esp32:esp32:esp32s2 # esp32s2
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch-names: bldc_driver_3pwm_standalone.ino,stepper_driver_2pwm_standalone.ino,stepper_driver_4pwm_standalone.ino

- arduino-boards-fqbn: esp32:esp32:esp32s3 # esp32s3
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch-names: esp32_position_control.ino, esp32_i2c_dual_bus_example.ino

- arduino-boards-fqbn: esp32:esp32:esp32doit-devkit-v1 # esp32
platform-url: https://espressif.github.io/arduino-esp32/package_esp32_index.json
sketch-names: esp32_position_control.ino, esp32_i2c_dual_bus_example.ino, esp32_current_control_low_side.ino, esp32_spi_alt_example.ino

include:
- arduino-boards-fqbn: STMicroelectronics:stm32:GenF1:pnum=BLUEPILL_F103C8 # bluepill - hs examples
platform-url: https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json
sketch-names: bluepill_position_control.ino, stm32_i2c_dual_bus_example.ino, stm32_spi_alt_example.ino
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/teensy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PlatformIO - Teensy build
name: Teensy build

on: [push]

Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# SimpleFOClibrary - **Simple** Field Oriented Control (FOC) **library** <br>
### A Cross-Platform FOC implementation for BLDC and Stepper motors<br> based on the Arduino IDE and PlatformIO

![Library Compile](https://github.com/simplefoc/Arduino-FOC/workflows/Library%20Compile/badge.svg) [![PlatformIO - Teensy build](https://github.com/simplefoc/Arduino-FOC/actions/workflows/teensy.yml/badge.svg)](https://github.com/simplefoc/Arduino-FOC/actions/workflows/teensy.yml)
![AVR](https://github.com/simplefoc/Arduino-FOC/workflows/AVR%20build/badge.svg)
![ESP32](https://github.com/simplefoc/Arduino-FOC/workflows/ESP32%20build/badge.svg)
![STM32](https://github.com/simplefoc/Arduino-FOC/workflows/STM32%20build/badge.svg)
![RP2040](https://github.com/simplefoc/Arduino-FOC/workflows/RP2040%20build/badge.svg)
![SAMD](https://github.com/simplefoc/Arduino-FOC/workflows/SAMD%20build/badge.svg)
[![Teensy build](https://github.com/simplefoc/Arduino-FOC/actions/workflows/teensy.yml/badge.svg)](https://github.com/simplefoc/Arduino-FOC/actions/workflows/teensy.yml)

![GitHub release (latest by date)](https://img.shields.io/github/v/release/simplefoc/arduino-foc)
![GitHub Release Date](https://img.shields.io/github/release-date/simplefoc/arduino-foc?color=blue)
Expand Down

0 comments on commit c54623d

Please sign in to comment.