Grouped jobs into build stages

pull/9844/head
Cruz Monrreal II 2019-03-07 13:00:53 -06:00
parent c703ad7cfb
commit f9f9b60d7e
1 changed files with 107 additions and 91 deletions

View File

@ -39,10 +39,77 @@ before_install:
# Loop until update succeeds (timeouts can occur) # Loop until update succeeds (timeouts can occur)
- travis_retry $(! sudo apt-get update 2>&1 |grep Failed) - travis_retry $(! sudo apt-get update 2>&1 |grep Failed)
matrix: matrix:
include: include:
- env:
- NAME=docs ### Basic Tests ###
- &basic-vm
stage: "Basic"
name: "file attributes"
env: NAME=gitattributestest
script:
- git diff --exit-code
- <<: *basic-vm
name: "license check"
env: NAME=license_check
script:
- |
! grep --recursive --max-count=100 --ignore-case --exclude .travis.yml \
"gnu general\|gnu lesser\|lesser general\|public license"
- <<: *basic-vm
name: "include check"
env: NAME=include_check
script:
- |
! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \
':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*'
### Docs Tests ###
- &docs-vm
stage: "Docs"
name: "spellcheck"
env: NAME=doxy-spellcheck
install:
- sudo apt-get install aspell
script:
# Run local testing on header file doxy
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket
- <<: *docs-vm
name: "astyle"
env: NAME=astyle
install:
- >-
curl -L0 https://mbed-os.s3-eu-west-1.amazonaws.com/builds/deps/astyle_3.1_linux.tar.gz --output astyle.tar.gz;
mkdir -p BUILD && tar xf astyle.tar.gz -C BUILD;
cd BUILD/astyle/build/gcc;
make;
export PATH=$PWD/bin:$PATH;
cd -
- astyle --version
# Fetch remaining information needed for branch comparison
- git fetch --all --unshallow --tags
- git fetch origin "${TRAVIS_BRANCH}"
script:
- >-
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \
| ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \
| ( grep -v -f .astyleignore || true ) \
| while read file; do astyle -n --options=.astylerc "${file}"; done
- git diff --exit-code --diff-filter=d --color
- <<: *docs-vm
name: "doxygen"
env: NAME=docs
install: install:
# Install dependencies # Install dependencies
- sudo apt-get install doxygen - sudo apt-get install doxygen
@ -81,7 +148,11 @@ matrix:
find -name "*.s" | tee BUILD/badasm | find -name "*.s" | tee BUILD/badasm |
sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ] sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ]
- &tools-pytest
### Python Tests ###
- &pytools-vm
stage: "Pytest"
name: "tools-py27"
env: NAME=tools-py2.7 env: NAME=tools-py2.7
python: 2.7 python: 2.7
install: install:
@ -112,62 +183,36 @@ matrix:
# Coverage for tools # Coverage for tools
- coveralls - coveralls
- env: - <<: *pytools-vm
- NAME=doxy-spellcheck name: "tools-py35"
install:
- sudo apt-get install aspell
script:
# Run local testing on header file doxy
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh drivers
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh platform
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh events
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh rtos
- ./tools/test/travis-ci/doxy-spellchecker/spell.sh features/netsocket
after_success:
# Coverage for tools
- coveralls
- <<: *tools-pytest
env: NAME=tools-py3.5 env: NAME=tools-py3.5
python: 3.5 python: 3.5
- <<: *tools-pytest - <<: *pytools-vm
name: "tools-py36"
env: NAME=tools-py3.6 env: NAME=tools-py3.6
python: 3.6 python: 3.6
- <<: *tools-pytest - <<: *pytools-vm
name: "tools-py37"
env: NAME=tools-py3.7 env: NAME=tools-py3.7
python: 3.7 python: 3.7
dist: xenial
- env:
- NAME=astyle ### Extended Tests ###
install: - &extended-vm
- >- stage: "Extended"
curl -L0 https://mbed-os-ci.s3-eu-west-1.amazonaws.com/jenkins-ci/deps/astyle_3.1_linux.tar.gz --output astyle.tar.gz; name: "psa autogen"
mkdir -p BUILD && tar xf astyle.tar.gz -C BUILD; env: NAME=psa-autogen
cd BUILD/astyle/build/gcc; language: python
make; python: 3.7
export PATH=$PWD/bin:$PATH;
cd -
- astyle --version
# Fetch remaining information needed for branch comparison
- git fetch --all --unshallow --tags
- git fetch origin "${TRAVIS_BRANCH}"
script: script:
- >- - python tools/psa/generate_partition_code.py
git diff --name-only --diff-filter=d FETCH_HEAD..HEAD \ - git diff --exit-code
| ( grep '.\(c\|cpp\|h\|hpp\)$' || true ) \
| ( grep -v -f .astyleignore || true ) \
| while read file; do astyle -n --options=.astylerc "${file}"; done
- git diff --exit-code --diff-filter=d --color
- env: - <<: *extended-vm
- NAME=events name: "events"
- EVENTS=events env: NAME=events EVENTS=events
install: install:
# Install dependencies # Install dependencies
- sudo apt-get install gcc-arm-embedded - sudo apt-get install gcc-arm-embedded
@ -198,15 +243,15 @@ matrix:
| capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \ | capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \
|| echo 0) || echo 0)
#STATUSM="Passed, runtime is ${CURR} cycles" #STATUSM="Passed, runtime is ${CURR} cycles"
#if [ "$PREV" -ne 0 ] #if [ "$PREV" -ne 0 ]
#then #then
# STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") cycles)" # STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") cycles)"
#fi #fi
- env: - <<: *extended-vm
- NAME=littlefs name: "littlefs"
- LITTLEFS=features/storage/filesystem/littlefs env: NAME=littlefs LITTLEFS=features/storage/filesystem/littlefs
install: install:
# Install dependencies # Install dependencies
- sudo apt-get install gcc-arm-embedded fuse libfuse-dev - sudo apt-get install gcc-arm-embedded fuse libfuse-dev
@ -268,37 +313,8 @@ matrix:
| capture(\"code size is (?<size>[0-9]+)\").size" \ | capture(\"code size is (?<size>[0-9]+)\").size" \
|| echo 0) || echo 0)
#STATUSM="Passed, code size is ${CURR}B" #STATUSM="Passed, code size is ${CURR}B"
#if [ "$PREV" -ne 0 ] #if [ "$PREV" -ne 0 ]
#then #then
# STATUSM="$STATUSM ($(python -c "print '%+.2f' % (100*($CURR-$PREV)/$PREV.0)")%)" # STATUSM="$STATUSM ($(python -c "print '%+.2f' % (100*($CURR-$PREV)/$PREV.0)")%)"
#fi #fi
- env:
- NAME=gitattributestest
script:
# Check that no changes after clone. This check that .gitattributes is used right way.
- git diff --exit-code
- env:
- NAME=licence_check
script:
- >-
! grep --recursive --max-count=100 --ignore-case --exclude .travis.yml \
"gnu general\|gnu lesser\|lesser general\|public license"
- env:
- NAME=include_check
script:
- echo 'Checking that there are no '#include "mbed.h"' in code where it should not be'
- |
! git grep '^#include\s["'"']mbed.h['"'"]$' -- '*.c' '*.h' '*.cpp' '*.hpp' \
':!*platform_mbed.h' ':!*TESTS/*' ':!TEST_APPS/' ':!UNITTESTS/' \
':!*tests/*' ':!*targets/*' ':!*TARGET_*' ':!*unsupported/*'
- env:
- NAME=psa-autogen
script:
# Run SPM code generators and check that changes are not needed
- python tools/psa/generate_partition_code.py
- git diff --exit-code