|
1 |
| -python: |
2 |
| - - "2.7" |
3 |
| -script: |
4 |
| - - mkdir BUILD |
5 |
| -# Assert that the Doxygen build produced no warnings. |
6 |
| -# The strange command below asserts that the Doxygen command had an |
7 |
| -# output of zero length |
8 |
| - - | |
9 |
| - doxygen doxyfile_options 2>&1 | tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ] |
10 |
| -# Assert that all binary libraries are named correctly |
11 |
| -# The strange command below asserts that there are exactly 0 libraries that do |
12 |
| -# not start with lib |
13 |
| - - | |
14 |
| - find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | tee BUILD/badlibs | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ] |
15 |
| -# Assert that all assebler files are named correctly |
16 |
| -# The strange command below asserts that there are exactly 0 libraries that do |
17 |
| -# end with .s |
18 |
| - - | |
19 |
| - find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ] |
20 |
| - - make -C events/equeue test clean |
21 |
| - - PYTHONPATH=. coverage run -a -m pytest tools/test |
22 |
| - - python2 tools/test/pylint.py |
23 |
| - - coverage run -a tools/project.py -S |
24 |
| - - python2 tools/build_travis.py |
25 |
| - - coverage html |
26 |
| -after_success: |
27 |
| - - coveralls |
| 1 | + |
| 2 | +env: |
| 3 | + global: |
| 4 | + - > |
| 5 | + STATUS=$'curl -so/dev/null --user $MBED_BOT --request POST |
| 6 | + https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT} |
| 7 | + --data @- << DATA\n{ |
| 8 | + "state": "$0", |
| 9 | + "description": "$1", |
| 10 | + "context": "travis-ci/$NAME", |
| 11 | + "target_url": "https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID" |
| 12 | + }\nDATA' |
| 13 | +
|
28 | 14 | before_install:
|
| 15 | + - bash -c "$STATUS" pending "Local $NAME testing is in progress" |
| 16 | + # Make sure pipefail |
| 17 | + - set -o pipefail |
| 18 | + # Setup ppa to make sure arm-none-eabi-gcc is correct version |
29 | 19 | - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
30 | 20 | - sudo add-apt-repository -y ppa:libreoffice/libreoffice-4-2
|
31 | 21 | - sudo apt-get update -qq
|
32 |
| - - sudo apt-get install -qq gcc-arm-embedded doxygen --force-yes |
33 |
| - # Print versions we use |
34 |
| - - arm-none-eabi-gcc --version |
35 |
| - - python --version |
36 |
| - - doxygen --version |
37 |
| -install: |
38 |
| - - pip install --user -r requirements.txt |
39 |
| - - pip install --user pytest |
40 |
| - - pip install --user pylint |
41 |
| - - pip install --user hypothesis |
42 |
| - - pip install --user mock |
43 |
| - - pip install --user coverage |
44 |
| - - pip install --user coveralls |
| 22 | + |
| 23 | +after_success: |
| 24 | + - bash -c "$STATUS" success "Local $NAME testing has passed" |
| 25 | + |
| 26 | +after_failure: |
| 27 | + - bash -c "$STATUS" failure "Local $NAME testing has failed" |
| 28 | + |
| 29 | +matrix: |
| 30 | + include: |
| 31 | + - python: '2.7' |
| 32 | + env: |
| 33 | + - NAME=tools |
| 34 | + install: |
| 35 | + # Install dependencies |
| 36 | + - sudo apt-get install gcc-arm-embedded doxygen |
| 37 | + - pip install --user -r requirements.txt |
| 38 | + - pip install --user pytest |
| 39 | + - pip install --user pylint |
| 40 | + - pip install --user hypothesis |
| 41 | + - pip install --user mock |
| 42 | + - pip install --user coverage |
| 43 | + - pip install --user coveralls |
| 44 | + # Print versions we use |
| 45 | + - arm-none-eabi-gcc --version |
| 46 | + - python --version |
| 47 | + - doxygen --version |
| 48 | + before_script: |
| 49 | + # Create BUILD directory for tests |
| 50 | + - mkdir BUILD |
| 51 | + script: |
| 52 | + # Assert that the Doxygen build produced no warnings. |
| 53 | + # The strange command below asserts that the Doxygen command had an |
| 54 | + # output of zero length |
| 55 | + - | |
| 56 | + doxygen doxyfile_options 2>&1 | tee BUILD/doxygen.out && [ ! -s BUILD/doxygen.out ] |
| 57 | + # Assert that all binary libraries are named correctly |
| 58 | + # The strange command below asserts that there are exactly 0 libraries that do |
| 59 | + # not start with lib |
| 60 | + - | |
| 61 | + find "(" -name "*.a" -or -name "*.ar" ")" -and -not -name "lib*" | tee BUILD/badlibs | sed -e "s/^/Bad library name found: /" && [ ! -s BUILD/badlibs ] |
| 62 | + # Assert that all assebler files are named correctly |
| 63 | + # The strange command below asserts that there are exactly 0 libraries that do |
| 64 | + # end with .s |
| 65 | + - | |
| 66 | + find -name "*.s" | tee BUILD/badasm | sed -e "s/^/Bad Assembler file name found: /" && [ ! -s BUILD/badasm ] |
| 67 | + # Run local testing on tools |
| 68 | + # Note: These take ~40 minutes to run |
| 69 | + - PYTHONPATH=. coverage run -a -m pytest tools/test |
| 70 | + - python2 tools/test/pylint.py |
| 71 | + - coverage run -a tools/project.py -S | sed -n '/^Total/p' |
| 72 | + # - python2 -u tools/build_travis.py | sed -n '/^Executing/p' |
| 73 | + - coverage html |
| 74 | + after_success: |
| 75 | + # Coverage for tools |
| 76 | + - coveralls |
| 77 | + # Report success since we have overridden default behaviour |
| 78 | + - bash -c "$STATUS" success "Local $NAME testing has passed" |
| 79 | + |
| 80 | + - python: '2.7' |
| 81 | + env: |
| 82 | + - NAME=events |
| 83 | + - EVENTS=events |
| 84 | + install: |
| 85 | + # Install dependencies |
| 86 | + - sudo apt-get install gcc-arm-embedded |
| 87 | + - pip install --user -r requirements.txt |
| 88 | + # Print versions we use |
| 89 | + - arm-none-eabi-gcc --version |
| 90 | + - gcc --version |
| 91 | + - python --version |
| 92 | + script: |
| 93 | + # Check that example compiles |
| 94 | + - sed -n '/``` cpp/,/```/{/```$/Q;/```/d;p;}' $EVENTS/README.md > main.cpp |
| 95 | + - python tools/make.py -t GCC_ARM -m K64F --source=. --build=BUILD/K64F/GCC_ARM -j0 |
| 96 | + # Run local equeue tests |
| 97 | + - make -C $EVENTS/equeue test |
| 98 | + |
| 99 | + - python: '2.7' |
| 100 | + env: |
| 101 | + - NAME=littlefs |
| 102 | + - LITTLEFS=features/filesystem/littlefs |
| 103 | + install: |
| 104 | + # Install dependencies |
| 105 | + - sudo apt-get install gcc-arm-embedded fuse libfuse-dev |
| 106 | + - pip install --user -r requirements.txt |
| 107 | + - git clone https://github.com/armmbed/spiflash-driver.git |
| 108 | + # Print versions |
| 109 | + - arm-none-eabi-gcc --version |
| 110 | + - gcc --version |
| 111 | + - python --version |
| 112 | + - fusermount --version |
| 113 | + before_script: |
| 114 | + # Setup and patch littlefs-fuse |
| 115 | + - git clone https://github.com/geky/littlefs-fuse littlefs_fuse |
| 116 | + - echo '*' > littlefs_fuse/.mbedignore |
| 117 | + - rm -rf littlefs_fuse/littlefs/* |
| 118 | + - cp -r $(git ls-tree --name-only HEAD $LITTLEFS/littlefs/) littlefs_fuse/littlefs |
| 119 | + # Create file-backed disk |
| 120 | + - mkdir MOUNT |
| 121 | + - sudo chmod a+rw /dev/loop0 |
| 122 | + - dd if=/dev/zero bs=512 count=2048 of=DISK |
| 123 | + - losetup /dev/loop0 DISK |
| 124 | + script: |
| 125 | + # Check that example compiles |
| 126 | + - sed -n '/``` c++/,/```/{/```/d;p;}' $LITTLEFS/README.md > main.cpp |
| 127 | + - python tools/make.py -t GCC_ARM -m K82F --source=. --build=BUILD/K82F/GCC_ARM -j0 |
| 128 | + # Run local littlefs tests |
| 129 | + - CFLAGS="-Wno-format" make -C$LITTLEFS/littlefs test QUIET=1 |
| 130 | + # Run local littlefs tests with set of variations |
| 131 | + - CFLAGS="-Wno-format -DLFS_READ_SIZE=64 -DLFS_PROG_SIZE=64" make -C$LITTLEFS/littlefs test QUIET=1 |
| 132 | + - CFLAGS="-Wno-format -DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" make -C$LITTLEFS/littlefs test QUIET=1 |
| 133 | + - CFLAGS="-Wno-format -DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" make -C$LITTLEFS/littlefs test QUIET=1 |
| 134 | + - CFLAGS="-Wno-format -DLFS_BLOCK_COUNT=1023" make -C$LITTLEFS/littlefs test QUIET=1 |
| 135 | + - CFLAGS="-Wno-format -DLFS_LOOKAHEAD=2048" make -C$LITTLEFS/littlefs test QUIET=1 |
| 136 | + # Self-hosting littlefs fuzz test with littlefs-fuse |
| 137 | + - make -Clittlefs_fuse |
| 138 | + - littlefs_fuse/lfs --format /dev/loop0 |
| 139 | + - littlefs_fuse/lfs /dev/loop0 MOUNT |
| 140 | + - ls MOUNT |
| 141 | + - mkdir MOUNT/littlefs |
| 142 | + - cp -r $(git ls-tree --name-only HEAD $LITTLEFS/littlefs/) MOUNT/littlefs |
| 143 | + - ls MOUNT/littlefs |
| 144 | + - CFLAGS="-Wno-format" make -CMOUNT/littlefs -B test_dirs QUIET=1 |
| 145 | + |
| 146 | + - python: '2.7' |
| 147 | + env: |
| 148 | + - NAME=mbed2 |
| 149 | + install: |
| 150 | + # Install dependencies |
| 151 | + - sudo apt-get install gcc-arm-embedded |
| 152 | + - pip install --user -r requirements.txt |
| 153 | + # Print versions we use |
| 154 | + - arm-none-eabi-gcc --version |
| 155 | + - python --version |
| 156 | + before_script: |
| 157 | + # Create BUILD directory for tests |
| 158 | + - mkdir BUILD |
| 159 | + script: |
| 160 | + # Run local mbed 2 testing |
| 161 | + # Note: These take ~40 minutes to run |
| 162 | + - python2 -u tools/build_travis.py | sed -n '/^Executing/p' |
| 163 | + |
0 commit comments