Skip to content

align examples

align examples #107

Workflow file for this run

name: Continuous Integration
on: [push]
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create library ZIP
run: |
mkdir BlenderServoAnimation
cp -R src examples library.properties README.md LICENSE BlenderServoAnimation
zip -r blender_servo_animation_arduino_library BlenderServoAnimation
- name: Archive library ZIP
uses: actions/upload-artifact@v4
with:
name: blender_servo_animation_arduino_library.zip
path: |
blender_servo_animation_arduino_library.zip
build-examples:
name: "Build examples"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
[
AdafruitPCA9685,
MultiplePCA9685,
MultipleScenes,
MultipleScenesSD,
SDAnimation,
SerialLiveMode,
StandardServoLib,
SwitchModeButton,
WebSocketLiveMode,
]
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.10"
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO examples
run: |
cd examples/${{ matrix.example }}
pio run
lint:
name: "Lint"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Lint with clang-format
uses: jidicula/clang-format-action@v4.10.2
with:
exclude-regex: 'examples\/.+\/.+\.h'
- name: Lint with arduino-lint
uses: arduino/arduino-lint-action@v1
with:
library-manager: update
test:
name: "Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache PlatformIO directory
uses: actions/cache@v4
with:
path: /home/runner/.platformio
key: platformio-dir
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: requirements-dev.txt
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends -y libelf-dev
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Run tests with platformIO
run: |
pio test -e native