mirror of
https://github.com/espressif/openthread.git
synced 2026-09-14 13:10:08 +00:00
[travis] generate size report (#4026)
This commit splits the jobs into 2 stages: lint, test. In the lint stage, generate size diff report and post into the pull request.
This commit is contained in:
+49
-16
@@ -40,74 +40,78 @@ before_script:
|
|||||||
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
|
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
|
||||||
fi
|
fi
|
||||||
|
|
||||||
script:
|
|
||||||
- .travis/script.sh
|
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- .travis/after_success.sh
|
- .travis/after_success.sh
|
||||||
|
|
||||||
matrix:
|
stages:
|
||||||
|
- lint
|
||||||
|
- test
|
||||||
|
|
||||||
|
jobs:
|
||||||
include:
|
include:
|
||||||
- env: BUILD_TARGET="posix-app-cli" VERBOSE=1 VIRTUAL_TIME=1
|
- env: BUILD_TARGET="posix-app-cli" VERBOSE=1 VIRTUAL_TIME=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-app-pty" VERBOSE=1 COVERAGE=1
|
- env: BUILD_TARGET="posix-app-pty" VERBOSE=1 COVERAGE=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-app-pty" DAEMON=1 VERBOSE=1 COVERAGE=1
|
- env: BUILD_TARGET="posix-app-pty" DAEMON=1 VERBOSE=1 COVERAGE=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="android-build" VERBOSE=1
|
- env: BUILD_TARGET="android-build" VERBOSE=1
|
||||||
os: linux
|
os: linux
|
||||||
dist: trusty
|
dist: trusty
|
||||||
python: "2.7"
|
python: "2.7"
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-distcheck" VERBOSE=1 VIRTUAL_TIME=1
|
- env: BUILD_TARGET="posix-distcheck" VERBOSE=1 VIRTUAL_TIME=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-32-bit" VERBOSE=1 VIRTUAL_TIME=1
|
- env: BUILD_TARGET="posix-32-bit" VERBOSE=1 VIRTUAL_TIME=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
python: "2.7"
|
python: "2.7"
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-32-bit" VERBOSE=1 VIRTUAL_TIME=1 TIME_SYNC=1
|
- env: BUILD_TARGET="posix-32-bit" VERBOSE=1 VIRTUAL_TIME=1 TIME_SYNC=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
python: "2.7"
|
python: "2.7"
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-ncp" VERBOSE=1 VIRTUAL_TIME=1
|
- env: BUILD_TARGET="posix-ncp" VERBOSE=1 VIRTUAL_TIME=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-mtd" VERBOSE=1 VIRTUAL_TIME=1
|
- env: BUILD_TARGET="posix-mtd" VERBOSE=1 VIRTUAL_TIME=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
- env: BUILD_TARGET="py-pretty-check"
|
script: .travis/script.sh
|
||||||
os: linux
|
|
||||||
python: "2.7"
|
|
||||||
- env: BUILD_TARGET="pretty-check"
|
|
||||||
os: linux
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- llvm-toolchain-xenial-6.0
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
- clang-format-6.0
|
|
||||||
- env: BUILD_TARGET="scan-build"
|
- env: BUILD_TARGET="scan-build"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: clang
|
compiler: clang
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="arm-gcc-4"
|
- env: BUILD_TARGET="arm-gcc-4"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="arm-gcc-5"
|
- env: BUILD_TARGET="arm-gcc-5"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="arm-gcc-6"
|
- env: BUILD_TARGET="arm-gcc-6"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="arm-gcc-7"
|
- env: BUILD_TARGET="arm-gcc-7"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="arm-gcc-8"
|
- env: BUILD_TARGET="arm-gcc-8"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix" CC="gcc-5" CXX="g++-5"
|
- env: BUILD_TARGET="posix" CC="gcc-5" CXX="g++-5"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -118,6 +122,7 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- gcc-5
|
- gcc-5
|
||||||
- g++-5
|
- g++-5
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix" CC="gcc-6" CXX="g++-6"
|
- env: BUILD_TARGET="posix" CC="gcc-6" CXX="g++-6"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -128,6 +133,7 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- gcc-6
|
- gcc-6
|
||||||
- g++-6
|
- g++-6
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix" CC="gcc-7" CXX="g++-7"
|
- env: BUILD_TARGET="posix" CC="gcc-7" CXX="g++-7"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -138,6 +144,7 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- gcc-7
|
- gcc-7
|
||||||
- g++-7
|
- g++-7
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix" CC="gcc-8" CXX="g++-8"
|
- env: BUILD_TARGET="posix" CC="gcc-8" CXX="g++-8"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -148,6 +155,7 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- gcc-8
|
- gcc-8
|
||||||
- g++-8
|
- g++-8
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix" CC="gcc-9" CXX="g++-9"
|
- env: BUILD_TARGET="posix" CC="gcc-9" CXX="g++-9"
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
@@ -158,16 +166,41 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- gcc-9
|
- gcc-9
|
||||||
- g++-9
|
- g++-9
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="posix-ncp-spi" VERBOSE=1
|
- env: BUILD_TARGET="posix-ncp-spi" VERBOSE=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="toranj-test-framework" VERBOSE=1
|
- env: BUILD_TARGET="toranj-test-framework" VERBOSE=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="toranj-test-framework" VERBOSE=1 TORANJ_POSIX_APP_RCP_MODEL=1
|
- env: BUILD_TARGET="toranj-test-framework" VERBOSE=1 TORANJ_POSIX_APP_RCP_MODEL=1
|
||||||
os: linux
|
os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
python: "2.7"
|
python: "2.7"
|
||||||
|
script: .travis/script.sh
|
||||||
- env: BUILD_TARGET="osx" VERBOSE=1
|
- env: BUILD_TARGET="osx" VERBOSE=1
|
||||||
os: osx
|
os: osx
|
||||||
language: generic
|
language: generic
|
||||||
|
script: .travis/script.sh
|
||||||
|
- stage: lint
|
||||||
|
env: BUILD_TARGET="py-pretty-check"
|
||||||
|
os: linux
|
||||||
|
python: "2.7"
|
||||||
|
script: .travis/script.sh
|
||||||
|
- env: BUILD_TARGET="pretty-check"
|
||||||
|
os: linux
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- llvm-toolchain-xenial-6.0
|
||||||
|
- ubuntu-toolchain-r-test
|
||||||
|
packages:
|
||||||
|
- clang-format-6.0
|
||||||
|
script: .travis/script.sh
|
||||||
|
- env: BUILD_TARGET="size-report"
|
||||||
|
os: linux
|
||||||
|
compiler: gcc
|
||||||
|
script: .travis/script.sh VERBOSE=1
|
||||||
|
if: type = pull_request
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ cd /tmp || die
|
|||||||
arm-none-eabi-gcc --version || die
|
arm-none-eabi-gcc --version || die
|
||||||
}
|
}
|
||||||
|
|
||||||
[ $BUILD_TARGET != arm-gcc-7 ] || {
|
[ $BUILD_TARGET != arm-gcc-7 -a $BUILD_TARGET != size-report ] || {
|
||||||
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 || die
|
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2018q2/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 || die
|
||||||
tar xjf gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 || die
|
tar xjf gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 || die
|
||||||
export PATH=/tmp/gcc-arm-none-eabi-7-2018-q2-update/bin:$PATH || die
|
export PATH=/tmp/gcc-arm-none-eabi-7-2018-q2-update/bin:$PATH || die
|
||||||
|
|||||||
@@ -450,6 +450,48 @@ build_samr21() {
|
|||||||
./tests/toranj/start.sh || die
|
./tests/toranj/start.sh || die
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ $BUILD_TARGET != size-report ] || {
|
||||||
|
[ ${TRAVIS_PULL_REQUEST} != false ] || die
|
||||||
|
|
||||||
|
export PATH=/tmp/gcc-arm-none-eabi-7-2018-q2-update/bin:$PATH || die
|
||||||
|
|
||||||
|
mkdir ../output
|
||||||
|
|
||||||
|
export MERGE_BASE_SHA=$(git merge-base HEAD ${TRAVIS_BRANCH})
|
||||||
|
|
||||||
|
# pull request
|
||||||
|
OPENTHREAD_FLAGS="BORDER_AGENT=1 BORDER_ROUTER=1 CHANNEL_MANAGER=1 CHANNEL_MONITOR=1 CHILD_SUPERVISION=1 COAP=1 COAPS=1 COMMISSIONER=1 DHCP6_CLIENT=1 DHCP6_SERVER=1 DIAGNOSTIC=1 DISABLE_DOC=1 DNS_CLIENT=1 ECDSA=1 FULL_LOGS=1 JAM_DETECTION=1 JOINER=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1 SERVICE=1 SLAAC=1 SNTP_CLIENT=1 TIME_SYNC=1 UDP_FORWARD=1"
|
||||||
|
|
||||||
|
git checkout -- . || die
|
||||||
|
git clean -xfd || die
|
||||||
|
./bootstrap || die
|
||||||
|
make -f examples/Makefile-nrf52840 ${OPENTHREAD_FLAGS} || die
|
||||||
|
mv output/nrf52840 ../output/nrf52840-b
|
||||||
|
|
||||||
|
git checkout ${MERGE_BASE_SHA}
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
# base branch
|
||||||
|
git checkout -- . || die
|
||||||
|
git clean -xfd || die
|
||||||
|
./bootstrap || die
|
||||||
|
make -f examples/Makefile-nrf52840 ${OPENTHREAD_FLAGS} || die
|
||||||
|
mv output/nrf52840 ../output/nrf52840-a
|
||||||
|
|
||||||
|
curl -s "${SIZE_REPORT_URL}/bash" > size-report
|
||||||
|
chmod a+x size-report
|
||||||
|
|
||||||
|
./size-report init OpenThread
|
||||||
|
|
||||||
|
./size-report size ../output/nrf52840-a/bin/ot-cli-ftd ../output/nrf52840-b/bin/ot-cli-ftd
|
||||||
|
./size-report size ../output/nrf52840-a/bin/ot-cli-mtd ../output/nrf52840-b/bin/ot-cli-mtd
|
||||||
|
./size-report size ../output/nrf52840-a/bin/ot-ncp-ftd ../output/nrf52840-b/bin/ot-ncp-ftd
|
||||||
|
./size-report size ../output/nrf52840-a/bin/ot-ncp-mtd ../output/nrf52840-b/bin/ot-ncp-mtd
|
||||||
|
./size-report size ../output/nrf52840-a/bin/ot-rcp ../output/nrf52840-b/bin/ot-rcp
|
||||||
|
|
||||||
|
./size-report post
|
||||||
|
}
|
||||||
|
|
||||||
[ $BUILD_TARGET != osx ] || {
|
[ $BUILD_TARGET != osx ] || {
|
||||||
git checkout -- . || die
|
git checkout -- . || die
|
||||||
git clean -xfd || die
|
git clean -xfd || die
|
||||||
|
|||||||
Reference in New Issue
Block a user