Skip to content

Commit

Permalink
add OpenThread 1.2 backbone CI
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlingoogle committed Sep 27, 2020
1 parent d1671cf commit 3b85e4a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,49 @@ jobs:
cmake --version | grep 3.10.3
- name: Build
run: script/test package

ot12-backbone-ci:
runs-on: ubuntu-18.04
env:
PACKET_VERIFICATION: 1
REFERENCE_DEVICE: 1
THREAD_VERSION: 1.2
INTER_OP: 1
VIRTUAL_TIME: 0
PYTHONUNBUFFERED: 1
OTBR_COVERAGE: 1
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build OTBR Docker Image
run: |
otbr_options="-DOT_THREAD_VERSION=1.2 -DOT_BACKBONE_ROUTER=ON -DOT_DUA=ON -DOT_MLR=ON -DOT_REFERENCE_DEVICE=ON -DOT_SERVICE=ON -DOTBR_COVERAGE=ON"
otbr_image_name="otbr-ot12-backbone-ci"
docker build -t "${otbr_image_name}" -f etc/docker/Dockerfile . --build-arg REFERENCE_DEVICE=1 --build-arg OT_BACKBONE_CI=1 --build-arg OTBR_OPTIONS="${otbr_options}"
- name: Bootstrap OpenThread Test
run: |
sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
sudo apt-get --no-install-recommends install -y python3-setuptools python3-wheel ninja-build socat
python3 -m pip install -r third_party/openthread/repo/tests/scripts/thread-cert/requirements.txt
- name: Build OpenThread
run: |
(cd third_party/openthread/repo && ./script/test build)
- name: Get Thread-Wireshark
run: |
(cd third_party/openthread/repo && ./script/test get_thread_wireshark)
- name: Run Test
run: |
export CI_ENV="$(bash <(curl -s https://codecov.io/env)) -e GITHUB_ACTIONS -e OTBR_COVERAGE"
echo "CI_ENV=${CI_ENV}"
(cd third_party/openthread/repo && sudo -E ./script/test cert_bbr ./tests/scripts/thread-cert/backbone/*.py || (sudo chmod a+r *.log *.json *.pcap && false))
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: thread-1-2-backbone-results
path: |
third_party/openthread/repo/*.pcap
third_party/openthread/repo/*.json
third_party/openthread/repo/*.log
- name: Codecov
uses: codecov/codecov-action@v1
5 changes: 5 additions & 0 deletions src/agent/agent_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ otbrError AgentInstance::Init(void)

SuccessOrExit(error = mNcp->Init());

if (system("ls /app/third_party/openthread/repo") == 0)
{
otbrLog(OTBR_LOG_ALERT, "I am running in Docker!!!");
}

mBorderAgent.Init();

exit:
Expand Down
2 changes: 1 addition & 1 deletion third_party/openthread/repo
Submodule repo updated 154 files

0 comments on commit 3b85e4a

Please sign in to comment.