File tree Expand file tree Collapse file tree 4 files changed +69
-0
lines changed Expand file tree Collapse file tree 4 files changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Building
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - uses : actions/checkout@v1
12
+ - name : Set up Python
13
+ uses : actions/setup-python@v1
14
+ - name : Install dependencies
15
+ run : |
16
+ python -m pip install --upgrade pip
17
+ pip install platformio
18
+ - name : Build examples
19
+ run : |
20
+ chmod +x ./scripts/build_examples.sh
21
+ ./scripts/build_examples.sh
Original file line number Diff line number Diff line change
1
+ name : Linting
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - uses : actions/checkout@v1
12
+ - name : Set up Python
13
+ uses : actions/setup-python@v1
14
+ - name : Install dependencies
15
+ run : |
16
+ python -m pip install --upgrade pip
17
+ pip install -U cpplint
18
+ - name : Linting
19
+ run : |
20
+ cpplint --repository=. --recursive --linelength=120 --verbose=4 --filter=-build/include,-build/header_guard ./src
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ RED=' \033[0;31m'
4
+ GREEN=' \033[0;32m'
5
+ NC=' \033[0m'
6
+
7
+ lines=$( find ./examples/ -maxdepth 1 -mindepth 1 -type d)
8
+ retval=0
9
+ while read line; do
10
+ echo -e " ========================== BUILDING $line =========================="
11
+ if [[ -e " $line /platformio.ini" ]]
12
+ then
13
+ output=$( platformio ci --lib=" ." --project-conf=" $line /platformio.ini" $line 2>&1 )
14
+ else
15
+ output=$( platformio ci --lib=" ." --project-conf=" scripts/platformio.ini" $line 2>&1 )
16
+ fi
17
+ if [ $? -ne 0 ]; then
18
+ echo " $output "
19
+ echo -e " Building $line ${RED} FAILED${NC} "
20
+ retval=1
21
+ else
22
+ echo -e " ${GREEN} SUCCESS${NC} "
23
+ fi
24
+ done <<< " $lines"
25
+
26
+ exit " $retval "
Original file line number Diff line number Diff line change
1
+ pip install -U cpplint
2
+ cpplint --repository=. --recursive --linelength=120 --verbose=4 --filter=-build/include,-build/header_guard ./src
You can’t perform that action at this time.
0 commit comments