.

Committer:
mbed_official
Date:
Fri Dec 15 21:00:16 2017 +0000
Revision:
3:0afcfcd3941b
Parent:
1:2bfc377bcc2a
Child:
25:65a9183a2178
Merge pull request #13 from ARMmbed/travis-matrix

Split Travis job into actual matrix
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-filesystem

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 3:0afcfcd3941b 1
mbed_official 3:0afcfcd3941b 2 env:
mbed_official 3:0afcfcd3941b 3 matrix:
mbed_official 3:0afcfcd3941b 4 - TARGET=K82F
mbed_official 3:0afcfcd3941b 5 - TARGET=NRF52840_DK
mbed_official 3:0afcfcd3941b 6 - TARGET=K64F
mbed_official 3:0afcfcd3941b 7 - TARGET=UBLOX_EVK_ODIN_W2
mbed_official 3:0afcfcd3941b 8 - TARGET=NUCLEO_F429ZI
mbed_official 3:0afcfcd3941b 9 global:
mbed_official 3:0afcfcd3941b 10 - >
mbed_official 3:0afcfcd3941b 11 STATUS=$'curl -so/dev/null --user $MBED_BOT --request POST
mbed_official 3:0afcfcd3941b 12 https://api.github.com/repos/$TRAVIS_REPO_SLUG/statuses/${TRAVIS_PULL_REQUEST_SHA:-$TRAVIS_COMMIT}
mbed_official 3:0afcfcd3941b 13 --data @- << DATA\n{
mbed_official 3:0afcfcd3941b 14 "state": "$0",
mbed_official 3:0afcfcd3941b 15 "description": "$1",
mbed_official 3:0afcfcd3941b 16 "context": "travis-ci/$TARGET",
mbed_official 3:0afcfcd3941b 17 "target_url": "https://travis-ci.org/$TRAVIS_REPO_SLUG/jobs/$TRAVIS_JOB_ID"
mbed_official 3:0afcfcd3941b 18 }\nDATA'
mbed_official 3:0afcfcd3941b 19
mbed_official 0:8e251d9511b8 20 cache:
mbed_official 0:8e251d9511b8 21 pip: true
mbed_official 0:8e251d9511b8 22 directories:
mbed_official 0:8e251d9511b8 23 - $HOME/.cache/apt
mbed_official 0:8e251d9511b8 24
mbed_official 0:8e251d9511b8 25 before_install:
mbed_official 3:0afcfcd3941b 26 - bash -c "$STATUS" pending "Build $TARGET in progress"
mbed_official 0:8e251d9511b8 27 # Make sure pipefail
mbed_official 0:8e251d9511b8 28 - set -o pipefail
mbed_official 0:8e251d9511b8 29 # Setup apt to cache
mbed_official 0:8e251d9511b8 30 - mkdir -p $HOME/.cache/apt/partial
mbed_official 0:8e251d9511b8 31 - sudo rm -rf /var/cache/apt/archives
mbed_official 0:8e251d9511b8 32 - sudo ln -s $HOME/.cache/apt /var/cache/apt/archives
mbed_official 0:8e251d9511b8 33 # Setup ppa to make sure arm-none-eabi-gcc is correct version
mbed_official 0:8e251d9511b8 34 - sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
mbed_official 0:8e251d9511b8 35 - sudo apt-get update -qq
mbed_official 0:8e251d9511b8 36
mbed_official 3:0afcfcd3941b 37 after_success:
mbed_official 3:0afcfcd3941b 38 - bash -c "$STATUS" success "Build $TARGET has passed"
mbed_official 3:0afcfcd3941b 39
mbed_official 3:0afcfcd3941b 40 after_failure:
mbed_official 3:0afcfcd3941b 41 - bash -c "$STATUS" failure "Build $TARGET has failed"
mbed_official 3:0afcfcd3941b 42
mbed_official 0:8e251d9511b8 43 install:
mbed_official 0:8e251d9511b8 44 # Install dependencies
mbed_official 0:8e251d9511b8 45 - sudo apt-get install gcc-arm-embedded
mbed_official 0:8e251d9511b8 46 - pip install --user mbed-cli
mbed_official 0:8e251d9511b8 47 # Deploy mbed and pip dependencies
mbed_official 0:8e251d9511b8 48 - mbed deploy
mbed_official 0:8e251d9511b8 49 - pip install --user -r mbed-os/requirements.txt
mbed_official 0:8e251d9511b8 50 # Print versions we use
mbed_official 0:8e251d9511b8 51 - arm-none-eabi-gcc --version
mbed_official 0:8e251d9511b8 52 - gcc --version
mbed_official 0:8e251d9511b8 53 - python --version
mbed_official 0:8e251d9511b8 54
mbed_official 0:8e251d9511b8 55 script:
mbed_official 0:8e251d9511b8 56 # Check that example compiles with littlefs + spif
mbed_official 3:0afcfcd3941b 57 - mbed compile -t GCC_ARM -m $TARGET -j0
mbed_official 1:2bfc377bcc2a 58
mbed_official 1:2bfc377bcc2a 59 # Check that example compiles with littlefs + dataflash
mbed_official 1:2bfc377bcc2a 60 - sed -i 's/SPIFBlockDevice bd/DataFlashBlockDevice bd/g' main.cpp
mbed_official 1:2bfc377bcc2a 61 - sed -i 's/MBED_CONF_SPIF_DRIVER/MBED_CONF_DATAFLASH/g' main.cpp
mbed_official 3:0afcfcd3941b 62 - mbed compile -t GCC_ARM -m $TARGET -j0
mbed_official 0:8e251d9511b8 63
mbed_official 0:8e251d9511b8 64 # Check that example compiles with fatfs + sd
mbed_official 0:8e251d9511b8 65 - sed -i 's/LittleFileSystem fs/FATFileSystem fs/g' main.cpp
mbed_official 1:2bfc377bcc2a 66 - sed -i 's/DataFlashBlockDevice bd/SDBlockDevice bd/g' main.cpp
mbed_official 1:2bfc377bcc2a 67 - sed -i 's/MBED_CONF_DATAFLASH/MBED_CONF_SD/g' main.cpp
mbed_official 3:0afcfcd3941b 68 - mbed compile -t GCC_ARM -m $TARGET -j0
mbed_official 1:2bfc377bcc2a 69
mbed_official 1:2bfc377bcc2a 70 # Check that example compiles with fatfs + heap
mbed_official 1:2bfc377bcc2a 71 - sed -i 's/SDBlockDevice bd(/HeapBlockDevice bd(1024*512, 512);/g' main.cpp
mbed_official 1:2bfc377bcc2a 72 - sed -i '/MBED_CONF_SD/d' main.cpp
mbed_official 3:0afcfcd3941b 73 - mbed compile -t GCC_ARM -m $TARGET -j0
mbed_official 1:2bfc377bcc2a 74