takashi kadono
/
Nucleo446_SSD1331
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/.travis.yml@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | language: python |
kadonotakashi | 0:8fdf9a60065b | 2 | python: 2.7 |
kadonotakashi | 0:8fdf9a60065b | 3 | |
kadonotakashi | 0:8fdf9a60065b | 4 | env: |
kadonotakashi | 0:8fdf9a60065b | 5 | global: |
kadonotakashi | 0:8fdf9a60065b | 6 | - > |
kadonotakashi | 0:8fdf9a60065b | 7 | STATUS=$'curl -so/dev/null --user "$MBED_BOT" --request POST |
kadonotakashi | 0:8fdf9a60065b | 8 | https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT} |
kadonotakashi | 0:8fdf9a60065b | 9 | --data @- << DATA\n{ |
kadonotakashi | 0:8fdf9a60065b | 10 | "state": "$0", |
kadonotakashi | 0:8fdf9a60065b | 11 | "description": "$1", |
kadonotakashi | 0:8fdf9a60065b | 12 | "context": "travis-ci/$NAME", |
kadonotakashi | 0:8fdf9a60065b | 13 | "target_url": "https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID" |
kadonotakashi | 0:8fdf9a60065b | 14 | }\nDATA' |
kadonotakashi | 0:8fdf9a60065b | 15 | |
kadonotakashi | 0:8fdf9a60065b | 16 | cache: |
kadonotakashi | 0:8fdf9a60065b | 17 | pip: true |
kadonotakashi | 0:8fdf9a60065b | 18 | directories: |
kadonotakashi | 0:8fdf9a60065b | 19 | - $HOME/.cache/apt |
kadonotakashi | 0:8fdf9a60065b | 20 | - $HOME/gcc-arm-none-eabi-6-2017-q2-update |
kadonotakashi | 0:8fdf9a60065b | 21 | |
kadonotakashi | 0:8fdf9a60065b | 22 | before_install: |
kadonotakashi | 0:8fdf9a60065b | 23 | - bash -c "$STATUS" pending "Local $NAME testing is in progress" |
kadonotakashi | 0:8fdf9a60065b | 24 | # Make sure pipefail |
kadonotakashi | 0:8fdf9a60065b | 25 | - set -o pipefail |
kadonotakashi | 0:8fdf9a60065b | 26 | # Setup apt to cache |
kadonotakashi | 0:8fdf9a60065b | 27 | - mkdir -p $HOME/.cache/apt/partial |
kadonotakashi | 0:8fdf9a60065b | 28 | - sudo rm -rf /var/cache/apt/archives |
kadonotakashi | 0:8fdf9a60065b | 29 | - sudo ln -s $HOME/.cache/apt /var/cache/apt/archives |
kadonotakashi | 0:8fdf9a60065b | 30 | # Setup ppa to make sure arm-none-eabi-gcc is correct version |
kadonotakashi | 0:8fdf9a60065b | 31 | - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa |
kadonotakashi | 0:8fdf9a60065b | 32 | - sudo add-apt-repository -y ppa:deadsnakes/ppa |
kadonotakashi | 0:8fdf9a60065b | 33 | # Fix for "The following signatures were invalid: KEYEXPIRED 1515625755" failed". See https://github.com/travis-ci/travis-ci/issues/9037 |
kadonotakashi | 0:8fdf9a60065b | 34 | - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 |
kadonotakashi | 0:8fdf9a60065b | 35 | # Loop until update succeeds (timeouts can occur) |
kadonotakashi | 0:8fdf9a60065b | 36 | - travis_retry $(! sudo apt-get update 2>&1 |grep Failed) |
kadonotakashi | 0:8fdf9a60065b | 37 | |
kadonotakashi | 0:8fdf9a60065b | 38 | after_success: |
kadonotakashi | 0:8fdf9a60065b | 39 | - bash -c "$STATUS" success "Local $NAME testing has passed" |
kadonotakashi | 0:8fdf9a60065b | 40 | |
kadonotakashi | 0:8fdf9a60065b | 41 | after_failure: |
kadonotakashi | 0:8fdf9a60065b | 42 | - bash -c "$STATUS" failure "Local $NAME testing has failed" |
kadonotakashi | 0:8fdf9a60065b | 43 | |
kadonotakashi | 0:8fdf9a60065b | 44 | matrix: |
kadonotakashi | 0:8fdf9a60065b | 45 | include: |
kadonotakashi | 0:8fdf9a60065b | 46 | - env: |
kadonotakashi | 0:8fdf9a60065b | 47 | - NAME=docs |
kadonotakashi | 0:8fdf9a60065b | 48 | install: |
kadonotakashi | 0:8fdf9a60065b | 49 | # Install dependencies |
kadonotakashi | 0:8fdf9a60065b | 50 | - sudo apt-get install doxygen |
kadonotakashi | 0:8fdf9a60065b | 51 | # Print versions we use |
kadonotakashi | 0:8fdf9a60065b | 52 | - doxygen --version |
kadonotakashi | 0:8fdf9a60065b | 53 | before_script: |
kadonotakashi | 0:8fdf9a60065b | 54 | # Create BUILD directory for tests |
kadonotakashi | 0:8fdf9a60065b | 55 | - mkdir BUILD |
kadonotakashi | 0:8fdf9a60065b | 56 | script: |
kadonotakashi | 0:8fdf9a60065b | 57 | # Assert that the Doxygen build produced no warnings. |
kadonotakashi | 0:8fdf9a60065b | 58 | # The strange command below asserts that the Doxygen command had an |
kadonotakashi | 0:8fdf9a60065b | 59 | # output of zero length |
kadonotakashi | 0:8fdf9a60065b | 60 | - > |
kadonotakashi | 0:8fdf9a60065b | 61 | doxygen doxyfile_options 2>&1 | |
kadonotakashi | 0:8fdf9a60065b | 62 | tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ] |
kadonotakashi | 0:8fdf9a60065b | 63 | # Assert that all binary libraries are named correctly |
kadonotakashi | 0:8fdf9a60065b | 64 | # The strange command below asserts that there are exactly 0 libraries |
kadonotakashi | 0:8fdf9a60065b | 65 | # that do not start with lib |
kadonotakashi | 0:8fdf9a60065b | 66 | - > |
kadonotakashi | 0:8fdf9a60065b | 67 | find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | |
kadonotakashi | 0:8fdf9a60065b | 68 | tee BUILD/badlibs | |
kadonotakashi | 0:8fdf9a60065b | 69 | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ] |
kadonotakashi | 0:8fdf9a60065b | 70 | # Assert that all assebler files are named correctly |
kadonotakashi | 0:8fdf9a60065b | 71 | # The strange command below asserts that there are exactly 0 libraries |
kadonotakashi | 0:8fdf9a60065b | 72 | # that do end with .s |
kadonotakashi | 0:8fdf9a60065b | 73 | - > |
kadonotakashi | 0:8fdf9a60065b | 74 | find -name "*.s" | tee BUILD/badasm | |
kadonotakashi | 0:8fdf9a60065b | 75 | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ] |
kadonotakashi | 0:8fdf9a60065b | 76 | |
kadonotakashi | 0:8fdf9a60065b | 77 | - &tools-pytest |
kadonotakashi | 0:8fdf9a60065b | 78 | env: NAME=tools-py2.7 |
kadonotakashi | 0:8fdf9a60065b | 79 | python: 2.7 |
kadonotakashi | 0:8fdf9a60065b | 80 | install: |
kadonotakashi | 0:8fdf9a60065b | 81 | # Install dependencies |
kadonotakashi | 0:8fdf9a60065b | 82 | - sudo apt-get install gcc-arm-embedded |
kadonotakashi | 0:8fdf9a60065b | 83 | - pip install -r requirements.txt |
kadonotakashi | 0:8fdf9a60065b | 84 | - pip install pytest pylint hypothesis mock coverage coveralls |
kadonotakashi | 0:8fdf9a60065b | 85 | # Print versions we use |
kadonotakashi | 0:8fdf9a60065b | 86 | |
kadonotakashi | 0:8fdf9a60065b | 87 | - arm-none-eabi-gcc --version |
kadonotakashi | 0:8fdf9a60065b | 88 | - python --version |
kadonotakashi | 0:8fdf9a60065b | 89 | script: |
kadonotakashi | 0:8fdf9a60065b | 90 | # Run local testing on tools |
kadonotakashi | 0:8fdf9a60065b | 91 | - PYTHONPATH=. coverage run -a -m pytest tools/test |
kadonotakashi | 0:8fdf9a60065b | 92 | - python tools/test/pylint.py |
kadonotakashi | 0:8fdf9a60065b | 93 | - coverage run -a tools/project.py -S | sed -n '/^Total/p' |
kadonotakashi | 0:8fdf9a60065b | 94 | - coverage html |
kadonotakashi | 0:8fdf9a60065b | 95 | after_success: |
kadonotakashi | 0:8fdf9a60065b | 96 | # Coverage for tools |
kadonotakashi | 0:8fdf9a60065b | 97 | - coveralls |
kadonotakashi | 0:8fdf9a60065b | 98 | # Report success since we have overridden default behaviour |
kadonotakashi | 0:8fdf9a60065b | 99 | - bash -c "$STATUS" success "Local $NAME testing has passed" |
kadonotakashi | 0:8fdf9a60065b | 100 | |
kadonotakashi | 0:8fdf9a60065b | 101 | # - <<: *tools-pytest |
kadonotakashi | 0:8fdf9a60065b | 102 | # env: NAME=tools-py3.5 |
kadonotakashi | 0:8fdf9a60065b | 103 | # python: 3.5 |
kadonotakashi | 0:8fdf9a60065b | 104 | # |
kadonotakashi | 0:8fdf9a60065b | 105 | # - <<: *tools-pytest |
kadonotakashi | 0:8fdf9a60065b | 106 | # env: NAME=tools-py3.6 |
kadonotakashi | 0:8fdf9a60065b | 107 | # python: 3.6 |
kadonotakashi | 0:8fdf9a60065b | 108 | |
kadonotakashi | 0:8fdf9a60065b | 109 | - env: |
kadonotakashi | 0:8fdf9a60065b | 110 | - NAME=astyle |
kadonotakashi | 0:8fdf9a60065b | 111 | install: |
kadonotakashi | 0:8fdf9a60065b | 112 | - curl -L0 http://mbed-os.s3-eu-west-1.amazonaws.com/builds/deps/astyle_3.1_linux.tar.gz --output astyle.tar.gz; |
kadonotakashi | 0:8fdf9a60065b | 113 | mkdir -p BUILD && tar xf astyle.tar.gz -C BUILD; |
kadonotakashi | 0:8fdf9a60065b | 114 | pushd BUILD/astyle/build/gcc; |
kadonotakashi | 0:8fdf9a60065b | 115 | make; |
kadonotakashi | 0:8fdf9a60065b | 116 | export PATH=$PWD/bin:$PATH; |
kadonotakashi | 0:8fdf9a60065b | 117 | popd; |
kadonotakashi | 0:8fdf9a60065b | 118 | - astyle --version |
kadonotakashi | 0:8fdf9a60065b | 119 | script: |
kadonotakashi | 0:8fdf9a60065b | 120 | # only changed files this time |
kadonotakashi | 0:8fdf9a60065b | 121 | - git diff --name-only $TRAVIS_BRANCH | grep '.*\.\(h\|c\|hpp\|cpp\)' | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle-files-changed.out; |
kadonotakashi | 0:8fdf9a60065b | 122 | if [ $(cat astyle-files-changed.out | grep Formatted | wc -l) -ne 0 ]; then |
kadonotakashi | 0:8fdf9a60065b | 123 | git --no-pager diff; |
kadonotakashi | 0:8fdf9a60065b | 124 | echo "Please fix style issues as shown above"; |
kadonotakashi | 0:8fdf9a60065b | 125 | else |
kadonotakashi | 0:8fdf9a60065b | 126 | echo "Coding style check OK"; |
kadonotakashi | 0:8fdf9a60065b | 127 | fi |
kadonotakashi | 0:8fdf9a60065b | 128 | after_success: |
kadonotakashi | 0:8fdf9a60065b | 129 | # run astyle for all files on the branch |
kadonotakashi | 0:8fdf9a60065b | 130 | - git checkout -- . |
kadonotakashi | 0:8fdf9a60065b | 131 | - find -regex '.*\.\(h\|c\|hpp\|cpp\)' -type f | fgrep -v -f .astyleignore | xargs -n 100 -I {} bash -c "astyle -n --options=.astylerc \"{}\"" > astyle-branch.out; |
kadonotakashi | 0:8fdf9a60065b | 132 | # update status if we succeeded, compare with master if possible |
kadonotakashi | 0:8fdf9a60065b | 133 | - | |
kadonotakashi | 0:8fdf9a60065b | 134 | CURR=$(cat astyle-branch.out | grep Formatted | wc -l) |
kadonotakashi | 0:8fdf9a60065b | 135 | PREV=$(curl https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \ |
kadonotakashi | 0:8fdf9a60065b | 136 | | jq -re "select(.sha != \"$TRAVIS_COMMIT\") |
kadonotakashi | 0:8fdf9a60065b | 137 | | .statuses[] | select(.context == \"travis-ci/$NAME\").description |
kadonotakashi | 0:8fdf9a60065b | 138 | | capture(\", (?<files>[0-9]+) files\").warnings" \ |
kadonotakashi | 0:8fdf9a60065b | 139 | || echo 0) |
kadonotakashi | 0:8fdf9a60065b | 140 | |
kadonotakashi | 0:8fdf9a60065b | 141 | STATUSM="Passed, ${CURR} files" |
kadonotakashi | 0:8fdf9a60065b | 142 | if [ "$PREV" -ne 0 ] |
kadonotakashi | 0:8fdf9a60065b | 143 | then |
kadonotakashi | 0:8fdf9a60065b | 144 | STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") files)" |
kadonotakashi | 0:8fdf9a60065b | 145 | fi |
kadonotakashi | 0:8fdf9a60065b | 146 | - bash -c "$STATUS" success "$STATUSM" |
kadonotakashi | 0:8fdf9a60065b | 147 | |
kadonotakashi | 0:8fdf9a60065b | 148 | - env: |
kadonotakashi | 0:8fdf9a60065b | 149 | - NAME=events |
kadonotakashi | 0:8fdf9a60065b | 150 | - EVENTS=events |
kadonotakashi | 0:8fdf9a60065b | 151 | install: |
kadonotakashi | 0:8fdf9a60065b | 152 | # Install dependencies |
kadonotakashi | 0:8fdf9a60065b | 153 | - sudo apt-get install gcc-arm-embedded |
kadonotakashi | 0:8fdf9a60065b | 154 | - pip install -r requirements.txt |
kadonotakashi | 0:8fdf9a60065b | 155 | # Print versions we use |
kadonotakashi | 0:8fdf9a60065b | 156 | - arm-none-eabi-gcc --version |
kadonotakashi | 0:8fdf9a60065b | 157 | - gcc --version |
kadonotakashi | 0:8fdf9a60065b | 158 | - python --version |
kadonotakashi | 0:8fdf9a60065b | 159 | script: |
kadonotakashi | 0:8fdf9a60065b | 160 | # Check that example compiles |
kadonotakashi | 0:8fdf9a60065b | 161 | - sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp |
kadonotakashi | 0:8fdf9a60065b | 162 | - python tools/make.py -t GCC_ARM -m K64F --source=. --build=BUILD/K64F/GCC_ARM -j0 |
kadonotakashi | 0:8fdf9a60065b | 163 | # Check that example compiles without rtos |
kadonotakashi | 0:8fdf9a60065b | 164 | - sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp |
kadonotakashi | 0:8fdf9a60065b | 165 | - rm -r rtos features/cellular features/netsocket features/nanostack features/lwipstack features/frameworks/greentea-client features/frameworks/utest features/frameworks/unity components BUILD |
kadonotakashi | 0:8fdf9a60065b | 166 | - python tools/make.py -t GCC_ARM -m DISCO_F401VC --source=. --build=BUILD/DISCO_F401VC/GCC_ARM -j0 |
kadonotakashi | 0:8fdf9a60065b | 167 | # Run local equeue tests |
kadonotakashi | 0:8fdf9a60065b | 168 | - make -C $EVENTS/equeue test |
kadonotakashi | 0:8fdf9a60065b | 169 | # Run profiling tests |
kadonotakashi | 0:8fdf9a60065b | 170 | - make -C $EVENTS/equeue prof | tee prof |
kadonotakashi | 0:8fdf9a60065b | 171 | after_success: |
kadonotakashi | 0:8fdf9a60065b | 172 | # update status if we succeeded, compare with master if possible |
kadonotakashi | 0:8fdf9a60065b | 173 | - | |
kadonotakashi | 0:8fdf9a60065b | 174 | CURR=$(grep -o '[0-9]\+ cycles' prof | awk '{sum += $1} END {print sum}') |
kadonotakashi | 0:8fdf9a60065b | 175 | PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \ |
kadonotakashi | 0:8fdf9a60065b | 176 | | jq -re "select(.sha != \"$TRAVIS_COMMIT\") |
kadonotakashi | 0:8fdf9a60065b | 177 | | .statuses[] | select(.context == \"travis-ci/$NAME\").description |
kadonotakashi | 0:8fdf9a60065b | 178 | | capture(\"runtime is (?<runtime>[0-9]+)\").runtime" \ |
kadonotakashi | 0:8fdf9a60065b | 179 | || echo 0) |
kadonotakashi | 0:8fdf9a60065b | 180 | |
kadonotakashi | 0:8fdf9a60065b | 181 | STATUSM="Passed, runtime is ${CURR} cycles" |
kadonotakashi | 0:8fdf9a60065b | 182 | if [ "$PREV" -ne 0 ] |
kadonotakashi | 0:8fdf9a60065b | 183 | then |
kadonotakashi | 0:8fdf9a60065b | 184 | STATUSM="$STATUSM ($(python -c "print '%+d' % ($CURR-$PREV)") cycles)" |
kadonotakashi | 0:8fdf9a60065b | 185 | fi |
kadonotakashi | 0:8fdf9a60065b | 186 | - bash -c "$STATUS" success "$STATUSM" |
kadonotakashi | 0:8fdf9a60065b | 187 | |
kadonotakashi | 0:8fdf9a60065b | 188 | - env: |
kadonotakashi | 0:8fdf9a60065b | 189 | - NAME=littlefs |
kadonotakashi | 0:8fdf9a60065b | 190 | - LITTLEFS=features/storage/filesystem/littlefs |
kadonotakashi | 0:8fdf9a60065b | 191 | install: |
kadonotakashi | 0:8fdf9a60065b | 192 | # Install dependencies |
kadonotakashi | 0:8fdf9a60065b | 193 | - sudo apt-get install gcc-arm-embedded fuse libfuse-dev |
kadonotakashi | 0:8fdf9a60065b | 194 | - pip install -r requirements.txt |
kadonotakashi | 0:8fdf9a60065b | 195 | # Print versions |
kadonotakashi | 0:8fdf9a60065b | 196 | - arm-none-eabi-gcc --version |
kadonotakashi | 0:8fdf9a60065b | 197 | - gcc --version |
kadonotakashi | 0:8fdf9a60065b | 198 | - python --version |
kadonotakashi | 0:8fdf9a60065b | 199 | - fusermount --version |
kadonotakashi | 0:8fdf9a60065b | 200 | before_script: |
kadonotakashi | 0:8fdf9a60065b | 201 | # Setup and patch littlefs-fuse |
kadonotakashi | 0:8fdf9a60065b | 202 | - git clone https://github.com/armmbed/littlefs-fuse littlefs_fuse |
kadonotakashi | 0:8fdf9a60065b | 203 | - git -C littlefs_fuse checkout 3f1ed6e37799e49e3710830dc6abb926d5503cf2 |
kadonotakashi | 0:8fdf9a60065b | 204 | - echo '*' > littlefs_fuse/.mbedignore |
kadonotakashi | 0:8fdf9a60065b | 205 | - rm -rf littlefs_fuse/littlefs/* |
kadonotakashi | 0:8fdf9a60065b | 206 | - cp -r $(git ls-tree --name-only HEAD $LITTLEFS/littlefs/) littlefs_fuse/littlefs |
kadonotakashi | 0:8fdf9a60065b | 207 | # Create file-backed disk |
kadonotakashi | 0:8fdf9a60065b | 208 | - mkdir MOUNT |
kadonotakashi | 0:8fdf9a60065b | 209 | - sudo chmod a+rw /dev/loop0 |
kadonotakashi | 0:8fdf9a60065b | 210 | - dd if=/dev/zero bs=512 count=2048 of=DISK |
kadonotakashi | 0:8fdf9a60065b | 211 | - losetup /dev/loop0 DISK |
kadonotakashi | 0:8fdf9a60065b | 212 | - CFLAGS="-Werror -Wno-format" |
kadonotakashi | 0:8fdf9a60065b | 213 | script: |
kadonotakashi | 0:8fdf9a60065b | 214 | # Check that example compiles |
kadonotakashi | 0:8fdf9a60065b | 215 | - export CFLAGS="-Werror -Wno-format" |
kadonotakashi | 0:8fdf9a60065b | 216 | - sed -n '/``` c++/,/```/{/```/d;p;}' $LITTLEFS/README.md > main.cpp |
kadonotakashi | 0:8fdf9a60065b | 217 | - python tools/make.py -t GCC_ARM -m K82F --source=. --build=BUILD/K82F/GCC_ARM -j0 |
kadonotakashi | 0:8fdf9a60065b | 218 | # Run local littlefs tests |
kadonotakashi | 0:8fdf9a60065b | 219 | - make -C$LITTLEFS/littlefs test QUIET=1 |
kadonotakashi | 0:8fdf9a60065b | 220 | # Run local littlefs tests with set of variations |
kadonotakashi | 0:8fdf9a60065b | 221 | - make -C$LITTLEFS/littlefs test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64" |
kadonotakashi | 0:8fdf9a60065b | 222 | - make -C$LITTLEFS/littlefs test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" |
kadonotakashi | 0:8fdf9a60065b | 223 | - make -C$LITTLEFS/littlefs test QUIET=1 CFLAGS+="-DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" |
kadonotakashi | 0:8fdf9a60065b | 224 | - make -C$LITTLEFS/littlefs test QUIET=1 CFLAGS+="-DLFS_BLOCK_COUNT=1023 -DLFS_LOOKAHEAD=2048" |
kadonotakashi | 0:8fdf9a60065b | 225 | - make -C$LITTLEFS/littlefs clean test QUIET=1 CFLAGS+="-DLFS_NO_INTRINSICS" |
kadonotakashi | 0:8fdf9a60065b | 226 | # Self-hosting littlefs fuzz test with littlefs-fuse |
kadonotakashi | 0:8fdf9a60065b | 227 | - make -Clittlefs_fuse |
kadonotakashi | 0:8fdf9a60065b | 228 | - littlefs_fuse/lfs --format /dev/loop0 |
kadonotakashi | 0:8fdf9a60065b | 229 | - littlefs_fuse/lfs /dev/loop0 MOUNT |
kadonotakashi | 0:8fdf9a60065b | 230 | - ls MOUNT |
kadonotakashi | 0:8fdf9a60065b | 231 | - mkdir MOUNT/littlefs |
kadonotakashi | 0:8fdf9a60065b | 232 | - cp -r $(git ls-tree --name-only HEAD $LITTLEFS/littlefs/) MOUNT/littlefs |
kadonotakashi | 0:8fdf9a60065b | 233 | - ls MOUNT/littlefs |
kadonotakashi | 0:8fdf9a60065b | 234 | - CFLAGS="-Wno-format" make -CMOUNT/littlefs -B test_dirs test_files QUIET=1 |
kadonotakashi | 0:8fdf9a60065b | 235 | # Compile and find the code size with smallest configuration |
kadonotakashi | 0:8fdf9a60065b | 236 | - cd $TRAVIS_BUILD_DIR/$LITTLEFS/littlefs |
kadonotakashi | 0:8fdf9a60065b | 237 | - make clean size |
kadonotakashi | 0:8fdf9a60065b | 238 | CC='arm-none-eabi-gcc -mthumb' |
kadonotakashi | 0:8fdf9a60065b | 239 | OBJ="$(ls lfs*.o | tr '\n' ' ')" |
kadonotakashi | 0:8fdf9a60065b | 240 | CFLAGS+="-DLFS_NO_ASSERT -DLFS_NO_DEBUG -DLFS_NO_WARN -DLFS_NO_ERROR" |
kadonotakashi | 0:8fdf9a60065b | 241 | | tee sizes |
kadonotakashi | 0:8fdf9a60065b | 242 | after_success: |
kadonotakashi | 0:8fdf9a60065b | 243 | # update status if we succeeded, compare with master if possible |
kadonotakashi | 0:8fdf9a60065b | 244 | - | |
kadonotakashi | 0:8fdf9a60065b | 245 | CURR=$(tail -n1 sizes | awk '{print $1}') |
kadonotakashi | 0:8fdf9a60065b | 246 | PREV=$(curl -u "$MBED_BOT" https://api.github.com/repos/$TRAVIS_REPO_SLUG/status/master \ |
kadonotakashi | 0:8fdf9a60065b | 247 | | jq -re "select(.sha != \"$TRAVIS_COMMIT\") |
kadonotakashi | 0:8fdf9a60065b | 248 | | .statuses[] | select(.context == \"travis-ci/$NAME\").description |
kadonotakashi | 0:8fdf9a60065b | 249 | | capture(\"code size is (?<size>[0-9]+)\").size" \ |
kadonotakashi | 0:8fdf9a60065b | 250 | || echo 0) |
kadonotakashi | 0:8fdf9a60065b | 251 | |
kadonotakashi | 0:8fdf9a60065b | 252 | STATUSM="Passed, code size is ${CURR}B" |
kadonotakashi | 0:8fdf9a60065b | 253 | if [ "$PREV" -ne 0 ] |
kadonotakashi | 0:8fdf9a60065b | 254 | then |
kadonotakashi | 0:8fdf9a60065b | 255 | STATUSM="$STATUSM ($(python -c "print '%+.2f' % (100*($CURR-$PREV)/$PREV.0)")%)" |
kadonotakashi | 0:8fdf9a60065b | 256 | fi |
kadonotakashi | 0:8fdf9a60065b | 257 | - bash -c "$STATUS" success "$STATUSM" |
kadonotakashi | 0:8fdf9a60065b | 258 | |
kadonotakashi | 0:8fdf9a60065b | 259 | - env: |
kadonotakashi | 0:8fdf9a60065b | 260 | - NAME=gitattributestest |
kadonotakashi | 0:8fdf9a60065b | 261 | script: |
kadonotakashi | 0:8fdf9a60065b | 262 | # Check that no changes after clone. This check that .gitattributes is used right way. |
kadonotakashi | 0:8fdf9a60065b | 263 | - git diff --exit-code |
kadonotakashi | 0:8fdf9a60065b | 264 | |
kadonotakashi | 0:8fdf9a60065b | 265 | - env: |
kadonotakashi | 0:8fdf9a60065b | 266 | - NAME=licence_check |
kadonotakashi | 0:8fdf9a60065b | 267 | script: |
kadonotakashi | 0:8fdf9a60065b | 268 | - echo 'Checking that there is no GPL licence text in code' |
kadonotakashi | 0:8fdf9a60065b | 269 | - ! git grep -q --ignore-case "gnu general public"; |
kadonotakashi | 0:8fdf9a60065b | 270 | - ! git grep -q --ignore-case "gnu library general public"; |