-
Notifications
You must be signed in to change notification settings - Fork 82
143 lines (116 loc) · 4.23 KB
/
arduino_esp32.yaml
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#
# Copyright (c) 2022 ZettaScale Technology
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# ZettaScale Zenoh Team, <zenoh@zettascale.tech>
#
name: arduino_esp32
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Install requirements
run: |
echo "No requirements need to be installed"
- name: Install PlatformIO
run: |
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py
. $HOME/.platformio/penv/bin/activate
platformio update
- name: Set up project
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
mkdir -p $ARDUINO_BASE
cd $ARDUINO_BASE
platformio init -b esp32thing_plus -O "board_build.cmake_extra_args=-DZ_FEATURE_LINK_BLUETOOTH=1" -O "build_flags=-DZENOH_DEBUG=3 -DZENOH_COMPILER_GCC" -O "lib_ldf_mode=deep+"
cd $ARDUINO_BASE/lib
ln -s $ZENOH_PICO_BASE
cd $ARDUINO_BASE
- name: Build z_pub example
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ARDUINO_BASE/src/*
cd $ARDUINO_BASE/src
ln -s $ZENOH_PICO_BASE/examples/arduino/z_pub.ino
cd $ARDUINO_BASE
platformio run
- name: Build z_sub example
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ARDUINO_BASE/src/*
cd $ARDUINO_BASE/src
ln -s $ZENOH_PICO_BASE/examples/arduino/z_sub.ino
cd $ARDUINO_BASE
platformio run
- name: Build z_pull example
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ARDUINO_BASE/src/*
cd $ARDUINO_BASE/src
ln -s $ZENOH_PICO_BASE/examples/arduino/z_pull.ino
cd $ARDUINO_BASE
platformio run
- name: Build z_get example
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ARDUINO_BASE/src/*
cd $ARDUINO_BASE/src
ln -s $ZENOH_PICO_BASE/examples/arduino/z_get.ino
cd $ARDUINO_BASE
platformio run
- name: Build z_queryable example
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ARDUINO_BASE/src/*
cd $ARDUINO_BASE/src
ln -s $ZENOH_PICO_BASE/examples/arduino/z_queryable.ino
cd $ARDUINO_BASE
platformio run
- name: Build z_scout example
run: |
cd $HOME
export ARDUINO_BASE=$HOME/work/arduino_esp32project/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ARDUINO_BASE/src/*
cd $ARDUINO_BASE/src
ln -s $ZENOH_PICO_BASE/examples/arduino/z_scout.ino
cd $ARDUINO_BASE
platformio run