|
6 | 6 | - master
|
7 | 7 |
|
8 | 8 | jobs:
|
9 |
| - |
10 | 9 | build:
|
11 |
| - |
12 | 10 | runs-on: ${{ matrix.os }}
|
13 | 11 | strategy:
|
14 | 12 | matrix:
|
15 | 13 | os: [macos-latest, windows-latest, ubuntu-latest]
|
16 | 14 | include:
|
17 |
| - - os: windows-latest |
18 |
| - pio_lib_path: D:\a\Luos |
19 |
| - - os: macos-latest |
20 |
| - pio_lib_path: ~/work/Luos |
21 |
| - - os: ubuntu-latest |
22 |
| - pio_lib_path: ~/work/Luos |
23 |
| - |
| 15 | + - os: windows-latest |
| 16 | + pio_lib_path: D:\a\Luos |
| 17 | + - os: macos-latest |
| 18 | + pio_lib_path: ~/work/Luos |
| 19 | + - os: ubuntu-latest |
| 20 | + pio_lib_path: ~/work/Luos |
24 | 21 |
|
25 | 22 | steps:
|
26 |
| - |
27 |
| - - name: Set up Python |
28 |
| - uses: actions/setup-python@v1 |
29 |
| - with: |
30 |
| - python-version: '3.x' |
| 23 | + - name: Set up Python |
| 24 | + uses: actions/setup-python@v1 |
| 25 | + with: |
| 26 | + python-version: "3.x" |
| 27 | + |
| 28 | + - name: Set up Node |
| 29 | + uses: actions/setup-node@v2 |
| 30 | + with: |
| 31 | + node-version: "14" |
| 32 | + |
| 33 | + - name: Install dependencies |
| 34 | + run: | |
| 35 | + python -m pip install --upgrade pip |
| 36 | + pip install platformio |
| 37 | + npm install -g clang-format@1.5.0 |
31 | 38 |
|
32 |
| - - name: Set up Node |
33 |
| - uses: actions/setup-node@v2 |
34 |
| - with: |
35 |
| - node-version: '14' |
| 39 | + - name: Check out Luos repository |
| 40 | + uses: actions/checkout@v2 |
36 | 41 |
|
37 |
| - - name: Install dependencies |
38 |
| - run: | |
39 |
| - python -m pip install --upgrade pip |
40 |
| - pip install platformio |
41 |
| - npm install -g clang-format@1.5.0 |
| 42 | + - name: Check for code format |
| 43 | + if: ${{ runner.os != 'Windows' }} |
| 44 | + run: python .github/workflows/run-clang-format.py -r . |
42 | 45 |
|
43 |
| - - name: Check out Luos repository |
44 |
| - uses: actions/checkout@v2 |
| 46 | + - name: Create env repo |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + # Step back and get dependancies |
| 50 | + cd .. |
45 | 51 |
|
46 |
| - - name: Check for code format |
47 |
| - if: ${{ runner.os != 'Windows' }} |
48 |
| - run: python .github/workflows/run-clang-format.py -r . |
| 52 | + # Examples |
| 53 | + git clone https://github.com/Luos-io/Examples.git |
49 | 54 |
|
50 |
| - - name: Create env repo |
51 |
| - shell: bash |
52 |
| - run: | |
53 |
| - # Step back and get dependancies |
54 |
| - cd .. |
| 55 | + - name: Run PlatformIO |
| 56 | + env: |
| 57 | + PLATFORMIO_LIB_EXTRA_DIRS: ${{ matrix.pio_lib_path }} |
| 58 | + run: | |
| 59 | + cd ../Examples/ |
| 60 | + # L0 |
| 61 | + platformio run -d Projects/l0/Button |
| 62 | + platformio run -d Projects/l0/Controller_motor |
| 63 | + platformio run -d Projects/l0/Dc_motor |
| 64 | + platformio run -d Projects/l0/Distance |
| 65 | + platformio run -d Projects/l0/Dxl |
| 66 | + platformio run -d Projects/l0/Gate_SerialCom |
| 67 | + platformio run -d Projects/l0/Gpio |
| 68 | + platformio run -d Projects/l0/Imu |
| 69 | + platformio run -d Projects/l0/Led |
| 70 | + platformio run -d Projects/l0/Led_strip |
| 71 | + platformio run -d Projects/l0/Light_sensor |
| 72 | + platformio run -d Projects/l0/Load |
| 73 | + platformio run -d Projects/l0/Potentiometer |
| 74 | + platformio run -d Projects/l0/Power_switch |
| 75 | + platformio run -d Projects/l0/Servo |
| 76 | + platformio run -d Projects/l0/Stepper |
| 77 | + platformio run -d Projects/l0/Bike_alarm/Alarm_controller |
| 78 | + platformio run -d Projects/l0/Bike_alarm/Start_controller |
| 79 | + # arduino |
| 80 | + platformio run -d Projects/Arduino/Button |
| 81 | + platformio run -d Projects/Arduino/Gate_SerialCom |
| 82 | + # NUCLEO-L432KC |
| 83 | + platformio run -d Projects/NUCLEO-L432KC/Button |
| 84 | + platformio run -d Projects/NUCLEO-L432KC/Gate_SerialCom |
| 85 | + platformio run -d Projects/NUCLEO-L432KC/Led |
| 86 | + # STM32F4-discovery |
| 87 | + platformio run -d Projects/STM32F4-discovery/Button |
| 88 | + platformio run -d Projects/STM32F4-discovery/Gate_SerialCom |
| 89 | + # NUCLEO-F401RE |
| 90 | + platformio run -d Projects/NUCLEO-F401RE/Button |
| 91 | + platformio run -d Projects/NUCLEO-F401RE/Gate_SerialCom |
| 92 | + platformio run -d Projects/NUCLEO-F401RE/Led |
| 93 | + # NUCLEO-F401RB |
| 94 | + platformio run -d Projects/NUCLEO-F410RB/Button |
| 95 | + platformio run -d Projects/NUCLEO-F410RB/Gate_SerialCom |
| 96 | + # NUCLEO-G431KB |
| 97 | + platformio run -d Projects/NUCLEO-G431KB/Button |
| 98 | + platformio run -d Projects/NUCLEO-G431KB/Gate_SerialCom |
55 | 99 |
|
56 |
| - # Examples |
57 |
| - git clone https://github.com/Luos-io/Examples.git |
| 100 | + - name: Run PlatformIO Unit Tests |
| 101 | + env: |
| 102 | + PLATFORMIO_LIB_EXTRA_DIRS: ${{ matrix.pio_lib_path }} |
| 103 | + if: ${{ runner.os == 'Windows' }} |
| 104 | + run: | |
| 105 | + cd ../Luos/ |
58 | 106 |
|
59 |
| - - name: Run PlatformIO |
60 |
| - env: |
61 |
| - PLATFORMIO_LIB_EXTRA_DIRS: ${{ matrix.pio_lib_path }} |
62 |
| - run: | |
63 |
| - cd ../Examples/ |
64 |
| - # L0 |
65 |
| - platformio run -d Projects/l0/Button |
66 |
| - platformio run -d Projects/l0/Controller_motor |
67 |
| - platformio run -d Projects/l0/Dc_motor |
68 |
| - platformio run -d Projects/l0/Distance |
69 |
| - platformio run -d Projects/l0/Dxl |
70 |
| - platformio run -d Projects/l0/Gate_SerialCom |
71 |
| - platformio run -d Projects/l0/Gpio |
72 |
| - platformio run -d Projects/l0/Imu |
73 |
| - platformio run -d Projects/l0/Led |
74 |
| - platformio run -d Projects/l0/Led_strip |
75 |
| - platformio run -d Projects/l0/Light_sensor |
76 |
| - platformio run -d Projects/l0/Load |
77 |
| - platformio run -d Projects/l0/Potentiometer |
78 |
| - platformio run -d Projects/l0/Power_switch |
79 |
| - platformio run -d Projects/l0/Servo |
80 |
| - platformio run -d Projects/l0/Stepper |
81 |
| - platformio run -d Projects/l0/Bike_alarm/Alarm_controller |
82 |
| - platformio run -d Projects/l0/Bike_alarm/Start_controller |
83 |
| - # arduino |
84 |
| - platformio run -d Projects/Arduino/Button |
85 |
| - platformio run -d Projects/Arduino/Gate_SerialCom |
86 |
| - # NUCLEO-L432KC |
87 |
| - platformio run -d Projects/NUCLEO-L432KC/Button |
88 |
| - platformio run -d Projects/NUCLEO-L432KC/Gate_SerialCom |
89 |
| - platformio run -d Projects/NUCLEO-L432KC/Led |
90 |
| - # STM32F4-discovery |
91 |
| - platformio run -d Projects/STM32F4-discovery/Button |
92 |
| - platformio run -d Projects/STM32F4-discovery/Gate_SerialCom |
93 |
| - # NUCLEO-F401RE |
94 |
| - platformio run -d Projects/NUCLEO-F401RE/Button |
95 |
| - platformio run -d Projects/NUCLEO-F401RE/Gate_SerialCom |
96 |
| - platformio run -d Projects/NUCLEO-F401RE/Led |
97 |
| - # NUCLEO-F401RB |
98 |
| - platformio run -d Projects/NUCLEO-F410RB/Button |
99 |
| - platformio run -d Projects/NUCLEO-F410RB/Gate_SerialCom |
100 |
| - # NUCLEO-G431KB |
101 |
| - platformio run -d Projects/NUCLEO-G431KB/Button |
102 |
| - platformio run -d Projects/NUCLEO-G431KB/Gate_SerialCom |
| 107 | + # Clean all projects |
| 108 | + platformio run -t clean -c .\test\msg_alloc\config\platformio.ini |
| 109 | + platformio run -t clean -c .\test\luos\config\platformio.ini |
| 110 | + platformio run -t clean -c .\test\routing_table\config\platformio.ini |
103 | 111 |
|
104 |
| - - name: Run PlatformIO Unit Tests |
105 |
| - env: |
106 |
| - PLATFORMIO_LIB_EXTRA_DIRS: ${{ matrix.pio_lib_path }} |
107 |
| - if: ${{ runner.os == 'Windows' }} |
108 |
| - run: | |
109 |
| - cd ../Luos/ |
110 |
| - platformio run -t clean |
111 |
| - platformio test -e native -i CodeCoverage --verbose |
| 112 | + # Run Unit tests |
| 113 | + platformio test -e native -c .\test\msg_alloc\config\platformio.ini -f msg_alloc --verbose |
| 114 | + platformio test -e native -c .\test\luos\config\platformio.ini -f luos --verbose |
| 115 | + platformio test -e native -c .\test\routing_table\config\platformio.ini -f routing_table --verbose |
0 commit comments