-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 1.94 KB
/
main_ci.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
name: Main CI
on:
push:
paths:
- 'src/**'
- 'examples/**'
- 'tools/**'
- 'tests/**'
- 'platformio.ini'
- '.github/workflows/**'
pull_request:
paths:
- 'src/**'
- 'examples/**'
- 'tools/**'
- 'tests/**'
- 'platformio.ini'
- '.github/workflows/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board: [ "heltec_wifi_lora_32_V3", "cubecell_board_v2"]
steps:
- name: Checkout RadioMesh code
uses: actions/checkout@v3
- name: Update runner
run: |
sudo add-apt-repository --yes ppa:nnstreamer/ppa
sudo apt-get update
sudo apt-get -y install cppcheck
- name: Run CPP Check
run: |
cppcheck --version
cppcheck --error-exitcode=1 --std=c++11 --force src
- name: Install PlatformIO
run: |
python3 -m pip install --upgrade pip
pip install -U platformio
platformio --version
- name: Clean PlatformIO environment
run: |
platformio run --target clean
- name: Install Arduino Cores
run: |
if [ "${{ matrix.board }}" == "heltec_wifi_lora_32_V3" ]; then
platformio pkg install -e heltec_wifi_lora_32_V3
elif [ "${{ matrix.board }}" == "cubecell_board_v2" ]; then
platformio pkg install -e cubecell_board_v2
# Apply patch for Arduino.h so CubeCell can compile for cpp projects
cp ./patches/arduino-cubecell/Arduino.h \
/home/runner/.platformio/packages/framework-arduinocubecell/cores/asr650x/Arduino.h
cp ./patches/arduino-cubecell/pins_arduino.h \
/home/runner/.platformio/packages/framework-arduinocubecell/variants/CubeCell-Board-V2/pins_arduino.h
else
echo "Unknown board: ${{ matrix.board }}"
exit 1
fi
- name: Build RadioMesh
run: |
./tools/builder.py build -t "${{ matrix.board }}"