-
Notifications
You must be signed in to change notification settings - Fork 81
146 lines (119 loc) · 4.29 KB
/
zephyr.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
144
145
146
#
# 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, <[email protected]>
#
name: zephyr
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@v2
- 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 ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
mkdir -p $ZEPHYR_BASE
cd $ZEPHYR_BASE
pio init -b nucleo_f767zi --project-option="framework=zephyr" --project-option="build_flags=-DZ_FEATURE_LINK_SERIAL=1 -DZENOH_DEBUG=3"
cd $ZEPHYR_BASE/lib
ln -s $ZENOH_PICO_BASE
mkdir -p $ZEPHYR_BASE/zephyr
cd $ZEPHYR_BASE/zephyr
ln -s $ZENOH_PICO_BASE/docs/zephyr/nucleo_f767zi/prj.conf prj.conf
ln -s $ZENOH_PICO_BASE/docs/zephyr/nucleo_f767zi/CMakeLists.txt CMakeLists.txt
- name: Build z_pub example
run: |
cd $HOME
export ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ZEPHYR_BASE/src/*
cd $ZEPHYR_BASE/src
ln -s $ZENOH_PICO_BASE/examples/zephyr/z_pub.c
cd $ZEPHYR_BASE
platformio run
- name: Build z_sub example
run: |
cd $HOME
export ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ZEPHYR_BASE/src/*
cd $ZEPHYR_BASE/src
ln -s $ZENOH_PICO_BASE/examples/zephyr/z_sub.c
cd $ZEPHYR_BASE
platformio run
- name: Build z_pull example
run: |
cd $HOME
export ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ZEPHYR_BASE/src/*
cd $ZEPHYR_BASE/src
ln -s $ZENOH_PICO_BASE/examples/zephyr/z_pull.c
cd $ZEPHYR_BASE
platformio run
- name: Build z_get example
run: |
cd $HOME
export ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ZEPHYR_BASE/src/*
cd $ZEPHYR_BASE/src
ln -s $ZENOH_PICO_BASE/examples/zephyr/z_get.c
cd $ZEPHYR_BASE
platformio run
- name: Build z_queryable example
run: |
cd $HOME
export ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ZEPHYR_BASE/src/*
cd $ZEPHYR_BASE/src
ln -s $ZENOH_PICO_BASE/examples/zephyr/z_queryable.c
cd $ZEPHYR_BASE
platformio run
- name: Build z_scout example
run: |
cd $HOME
export ZEPHYR_BASE=$HOME/work/zephyrproject/
export ZENOH_PICO_BASE=$HOME/work/zenoh-pico/zenoh-pico/
. $HOME/.platformio/penv/bin/activate
rm -rf $ZEPHYR_BASE/src/*
cd $ZEPHYR_BASE/src
ln -s $ZENOH_PICO_BASE/examples/zephyr/z_scout.c
cd $ZEPHYR_BASE
platformio run