-
Notifications
You must be signed in to change notification settings - Fork 13
128 lines (115 loc) · 3.93 KB
/
dev-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Dev-Build
on:
push:
branches-ignore:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: windows-latest
pio_lib_path: D:\a\Examples
- os: macos-latest
pio_lib_path: ~/work/Examples
- os: ubuntu-latest
pio_lib_path: ~/work/Examples
steps:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
npm install -g [email protected]
- name: Check out Luos repository
uses: actions/checkout@v2
- name: Check for code format
if: ${{ runner.os != 'Windows' }}
run: python .github/workflows/run-clang-format.py -r .
- name: Create env repo
shell: bash
run: |
# Save branch name
branch_name=$(git branch --show-current)
origine_branch_name="origin/${branch_name}"
echo current branch name is ${branch_name}
# Step back and get dependancies
cd ..
# LuosHAL
git clone https://github.com/Luos-io/LuosHAL.git
cd LuosHAL
if [ `git branch -r --list $origine_branch_name` ]
then
echo A dependant branch have been found on LuosHAL
git checkout $branch_name
cd ..
else
echo Use last release of LuosHAL
cd ..
rm -rf LuosHAL
fi
# Luos
git clone https://github.com/Luos-io/Luos.git
cd Luos
if [ `git branch -r --list $origine_branch_name` ]
then
echo A dependant branch have been found on Luos
git checkout $branch_name
cd ..
else
echo Use last release of Luos
cd ..
rm -rf Luos
fi
- name: Run PlatformIO
env:
PLATFORMIO_LIB_EXTRA_DIRS: ${{ matrix.pio_lib_path }}
run: |
# L0
platformio run -d Projects/l0/Button
platformio run -d Projects/l0/Controller_motor
platformio run -d Projects/l0/Dc_motor
platformio run -d Projects/l0/Distance
platformio run -d Projects/l0/Dxl
platformio run -d Projects/l0/Gate_SerialCom
platformio run -d Projects/l0/Gpio
platformio run -d Projects/l0/Imu
platformio run -d Projects/l0/Led
platformio run -d Projects/l0/Led_strip
platformio run -d Projects/l0/Light_sensor
platformio run -d Projects/l0/Load
platformio run -d Projects/l0/Potentiometer
platformio run -d Projects/l0/Power_switch
platformio run -d Projects/l0/Servo
platformio run -d Projects/l0/Stepper
platformio run -d Projects/l0/Bike_alarm/Alarm_controller
platformio run -d Projects/l0/Bike_alarm/Start_controller
# arduino
platformio run -d Projects/Arduino/Button
platformio run -d Projects/Arduino/Gate_SerialCom
# NUCLEO-L432KC
platformio run -d Projects/NUCLEO-L432KC/Button
platformio run -d Projects/NUCLEO-L432KC/Gate_SerialCom
platformio run -d Projects/NUCLEO-L432KC/Led
# STM32F4-discovery
platformio run -d Projects/STM32F4-discovery/Button
platformio run -d Projects/STM32F4-discovery/Gate_SerialCom
# NUCLEO-F401RE
platformio run -d Projects/NUCLEO-F401RE/Button
platformio run -d Projects/NUCLEO-F401RE/Gate_SerialCom
platformio run -d Projects/NUCLEO-F401RE/Led
# NUCLEO-F401RB
platformio run -d Projects/NUCLEO-F410RB/Button
platformio run -d Projects/NUCLEO-F410RB/Gate_SerialCom
# NUCLEO-G431KB
platformio run -d Projects/NUCLEO-G431KB/Button
platformio run -d Projects/NUCLEO-G431KB/Gate_SerialCom