mirror of
https://github.com/espressif/openthread.git
synced 2026-07-09 13:50:28 +00:00
393 lines
12 KiB
YAML
393 lines
12 KiB
YAML
#
|
|
# Copyright (c) 2020, The OpenThread Authors.
|
|
# All rights reserved.
|
|
#
|
|
# Redistribution and use in source and binary forms, with or without
|
|
# modification, are permitted provided that the following conditions are met:
|
|
# 1. Redistributions of source code must retain the above copyright
|
|
# notice, this list of conditions and the following disclaimer.
|
|
# 2. Redistributions in binary form must reproduce the above copyright
|
|
# notice, this list of conditions and the following disclaimer in the
|
|
# documentation and/or other materials provided with the distribution.
|
|
# 3. Neither the name of the copyright holder nor the
|
|
# names of its contributors may be used to endorse or promote products
|
|
# derived from this software without specific prior written permission.
|
|
#
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
|
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
# POSSIBILITY OF SUCH DAMAGE.
|
|
#
|
|
|
|
name: Simulation
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
|
|
cancel-previous-runs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: rokroskar/workflow-run-cleanup-action@master
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
if: "github.ref != 'refs/heads/master'"
|
|
|
|
distcheck:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CC: clang
|
|
CXX: clang++
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y llvm-runtime python3-setuptools python3-wheel
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
- name: Run
|
|
run: |
|
|
export ASAN_SYMBOLIZER_PATH=`which llvm-symbolizer`
|
|
export ASAN_OPTIONS=symbolize=1
|
|
export DISTCHECK_CONFIGURE_FLAGS= CPPFLAGS=-DOPENTHREAD_SIMULATION_VIRTUAL_TIME=1
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation distcheck
|
|
|
|
cli-ftd-otns:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CFLAGS: -m32
|
|
CXXFLAGS: -m32
|
|
LDFLAGS: -m32
|
|
COVERAGE: 1
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v1
|
|
with:
|
|
go-version: '1.13'
|
|
- name: Set up Python 3.6
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: 3.6
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y g++-multilib
|
|
./bootstrap
|
|
- name: Run OTNS Tests
|
|
run: |
|
|
git clone https://github.com/openthread/ot-ns.git --depth 1 --branch master ~/otns
|
|
export OT_DIR=$PWD
|
|
cd ~/otns
|
|
./script/test py-unittests py-examples
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
|
|
packet-verification:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
PACKET_VERIFICATION: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel ninja-build
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
- name: Build
|
|
run: |
|
|
./script/test build
|
|
- name: Run
|
|
run: |
|
|
for i in {1..10}
|
|
do
|
|
./script/test cert_suite ./tests/scripts/thread-cert/Cert_*.py
|
|
done
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
|
|
cli-ftd:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CFLAGS: -m32
|
|
CXXFLAGS: -m32
|
|
LDFLAGS: -m32
|
|
COVERAGE: 1
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
- name: Build
|
|
run: |
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation
|
|
- name: Run
|
|
run: |
|
|
VERBOSE=1 make -f examples/Makefile-simulation check
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
cli-mtd:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CFLAGS: -m32
|
|
CXXFLAGS: -m32
|
|
LDFLAGS: -m32
|
|
COVERAGE: 1
|
|
REFERENCE_DEVICE: 1
|
|
USE_MTD: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
- name: Build
|
|
run: |
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation
|
|
- name: Run
|
|
run: |
|
|
VERBOSE=1 make -f examples/Makefile-simulation check
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
cli-time-sync:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CFLAGS: -m32
|
|
CXXFLAGS: -m32
|
|
LDFLAGS: -m32
|
|
COVERAGE: 1
|
|
REFERENCE_DEVICE: 1
|
|
TIME_SYNC: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
- name: Build
|
|
run: |
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation
|
|
- name: Run
|
|
run: |
|
|
VERBOSE=1 make -f examples/Makefile-simulation check
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
expects:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
|
CXXFLAGS: -DCLI_COAP_SECURE_USE_COAP_DEFAULT_HANDLER=1 -DOPENTHREAD_CONFIG_MLE_MAX_CHILDREN=15
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
OT_OPTIONS=-DOT_READLINE=OFF sudo apt-get --no-install-recommends install -y expect ninja-build
|
|
- name: Run
|
|
run: |
|
|
OT_OPTIONS=-DOT_TIME_SYNC=ON VIRTUAL_TIME=0 ./script/test build expect
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
- name: Run RCP Mode
|
|
run: |
|
|
OT_OPTIONS=-DOT_READLINE=OFF VIRTUAL_TIME=0 NODE_MODE=rcp ./script/test clean build expect
|
|
- name: Keep POSIX Only
|
|
run: |
|
|
./script/test tar simulation 1.1
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
- name: Keep Simulation Only
|
|
run: |
|
|
./script/test tar posix 1.1
|
|
./script/test untar simulation 1.1
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
- name: Run TUN Mode
|
|
run: |
|
|
sudo apt-get install --no-install-recommends -y dnsmasq bind9-host ntp
|
|
sudo systemctl start dnsmasq ntp
|
|
host ipv6.google.com 127.0.0.1
|
|
echo 'listen-address=::1' | sudo tee /etc/dnsmasq.conf
|
|
echo 0 | sudo tee /proc/sys/net/ipv6/conf/all/disable_ipv6
|
|
sudo systemctl restart dnsmasq
|
|
host ipv6.google.com ::1
|
|
OT_OPTIONS=-DOT_READLINE=OFF OT_NATIVE_IP=1 VIRTUAL_TIME=0 NODE_MODE=rcp ./script/test clean build expect
|
|
- name: Keep POSIX Only
|
|
run: |
|
|
./script/test tar simulation 1.1
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
- name: Keep Simulation Only
|
|
run: |
|
|
./script/test tar posix 1.1
|
|
./script/test untar simulation 1.1
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
external-commissioner:
|
|
runs-on: ubuntu-18.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/*
|
|
sudo apt-get install avahi-daemon avahi-utils -y
|
|
git clone https://github.com/openthread/ot-commissioner.git /tmp/ot-commissioner --depth 1 --branch master
|
|
- name: Build
|
|
run: |
|
|
cd /tmp/ot-commissioner
|
|
script/bootstrap.sh
|
|
cmake -GNinja \
|
|
-DCMAKE_CXX_STANDARD=11 \
|
|
-DCMAKE_CXX_STANDARD_REQUIRED=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr/local \
|
|
-DOT_COMM_COVERAGE=ON \
|
|
-DOT_COMM_CCM=OFF \
|
|
-S . -B build
|
|
cmake --build build
|
|
sudo cmake --install build
|
|
- name: Run
|
|
run: |
|
|
export OT_COMM_OPENTHREAD="$(pwd)"
|
|
cd /tmp/ot-commissioner/tests/integration
|
|
./bootstrap.sh
|
|
./run_tests.sh
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
multiple-instance:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
COVERAGE: 1
|
|
MULTIPLE_INSTANCE: 1
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
- name: Build
|
|
run: |
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation
|
|
- name: Run
|
|
run: |
|
|
VERBOSE=1 make -f examples/Makefile-simulation check
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
ncp-gcc-m32:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
CFLAGS: -m32
|
|
CXXFLAGS: -m32
|
|
LDFLAGS: -m32
|
|
COVERAGE: 1
|
|
NODE_TYPE: ncp-sim
|
|
PYTHONUNBUFFERED: 1
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y g++-multilib python3-setuptools python3-wheel
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
sudo python3 -m pip install git+https://github.com/openthread/pyspinel
|
|
- name: Build
|
|
run: |
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation
|
|
- name: Run
|
|
run: |
|
|
VERBOSE=1 make -f examples/Makefile-simulation check
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
fail_ci_if_error: true
|
|
|
|
ncp-clang:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
COVERAGE: 1
|
|
NODE_TYPE: ncp-sim
|
|
PYTHONUNBUFFERED: 1
|
|
REFERENCE_DEVICE: 1
|
|
VIRTUAL_TIME: 1
|
|
CC: clang
|
|
CXX: clang++
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Bootstrap
|
|
run: |
|
|
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
|
|
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel llvm
|
|
python3 -m pip install -r tests/scripts/thread-cert/requirements.txt
|
|
sudo python3 -m pip install git+https://github.com/openthread/pyspinel
|
|
- name: Build
|
|
run: |
|
|
./bootstrap
|
|
make -f examples/Makefile-simulation
|
|
- name: Run
|
|
run: |
|
|
VERBOSE=1 make -f examples/Makefile-simulation check
|
|
- name: Codecov
|
|
run: |
|
|
bash <(curl -s https://codecov.io/bash) -x "llvm-cov gcov" -Z
|