@@ -3,57 +3,90 @@ name: Continuous Integration
33on : [push]
44
55jobs :
6- build :
7- name : " Build"
6+ build-library :
7+ name : " Build library "
88 runs-on : ubuntu-latest
99 steps :
10- - uses : actions/checkout@v3
11- - name : Build library ZIP
12- run : |
13- mkdir BlenderServoAnimation
14- cp -R src examples library.properties README.md LICENSE BlenderServoAnimation
15- zip -r blender_servo_animation_arduino_library BlenderServoAnimation
16- - name : Archive library ZIP
17- uses : actions/upload-artifact@v3
18- with :
19- name : blender_servo_animation_arduino_library.zip
20- path : |
21- blender_servo_animation_arduino_library.zip
10+ - uses : actions/checkout@v3
11+ - name : Create library ZIP
12+ run : |
13+ mkdir BlenderServoAnimation
14+ cp -R src examples library.properties README.md LICENSE BlenderServoAnimation
15+ zip -r blender_servo_animation_arduino_library BlenderServoAnimation
16+ - name : Archive library ZIP
17+ uses : actions/upload-artifact@v3
18+ with :
19+ name : blender_servo_animation_arduino_library.zip
20+ path : |
21+ blender_servo_animation_arduino_library.zip
22+ build-examples :
23+ name : " Build examples"
24+ runs-on : ubuntu-latest
25+ strategy :
26+ matrix :
27+ example :
28+ [
29+ AdafruitPCA9685,
30+ LiveMode,
31+ MultiplePCA9685,
32+ StandardServoLib,
33+ SwitchModeButton,
34+ ]
35+ steps :
36+ - uses : actions/checkout@v3
37+ - uses : actions/cache@v3
38+ with :
39+ path : |
40+ ~/.cache/pip
41+ ~/.platformio/.cache
42+ key : ${{ runner.os }}-pio
43+ - uses : actions/setup-python@v4
44+ with :
45+ python-version : " 3.10"
46+ - name : Install PlatformIO Core
47+ run : pip install --upgrade platformio
48+ - name : Build PlatformIO examples
49+ run : |
50+ pio ci --lib=. --project-conf=examples/${{ matrix.example }} \
51+ --board=uno \
52+ --board=esp32dev
53+ env :
54+ PLATFORMIO_CI_SRC : examples/${{ matrix.example }}
2255 lint :
2356 name : " Lint"
2457 runs-on : ubuntu-22.04
2558 steps :
26- - uses : actions/checkout@v3
27- - name : Lint with clang-format
28- 29- with :
30- exclude-regex : ' examples\/.+\/.+\.h'
31- - name : Lint with arduino-lint
32- uses : arduino/arduino-lint-action@v1
33- with :
34- library-manager : update
59+ - uses : actions/checkout@v3
60+ - name : Lint with clang-format
61+ 62+ with :
63+ exclude-regex : ' examples\/.+\/.+\.h'
64+ - name : Lint with arduino-lint
65+ uses : arduino/arduino-lint-action@v1
66+ with :
67+ library-manager : update
3568 test :
3669 name : " Test"
3770 runs-on : ubuntu-latest
3871 steps :
39- - uses : actions/checkout@v3
40- - name : Cache PlatformIO directory
41- uses : actions/cache@v3
42- with :
43- path : /home/runner/.platformio
44- key : platformio-dir
45- - name : Set up Python 3.10
46- uses : actions/setup-python@v4
47- with :
48- python-version : " 3.10"
49- cache : ' pip'
50- cache-dependency-path : requirements-dev.txt
51- - name : Install dependencies
52- run : |
53- sudo apt-get update
54- sudo apt-get install --no-install-recommends -y libelf-dev
55- python -m pip install --upgrade pip
56- pip install -r requirements-dev.txt
57- - name : Run tests with platformio
58- run : |
59- pio test -e native
72+ - uses : actions/checkout@v3
73+ - name : Cache PlatformIO directory
74+ uses : actions/cache@v3
75+ with :
76+ path : /home/runner/.platformio
77+ key : platformio-dir
78+ - name : Set up Python 3.10
79+ uses : actions/setup-python@v4
80+ with :
81+ python-version : " 3.10"
82+ cache : " pip"
83+ cache-dependency-path : requirements-dev.txt
84+ - name : Install dependencies
85+ run : |
86+ sudo apt-get update
87+ sudo apt-get install --no-install-recommends -y libelf-dev
88+ python -m pip install --upgrade pip
89+ pip install -r requirements-dev.txt
90+ - name : Run tests with platformIO
91+ run : |
92+ pio test -e native
0 commit comments