forked from alibaba/AliOS-Things
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (45 loc) · 2.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language: python
python:
- '2.7'
sudo: false
env:
# Toolchains
ARM_TOOLCHAIN_URL="https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2"
ESP8266_TOOLCHAIN_URL="http://arduino.esp8266.com/linux64-xtensa-lx106-elf.tar.gz"
ESP32_TOOLCHAIN_URL="https://dl.espressif.com/dl/xtensa-esp32-elf-linux64-1.22.0-61-gab8375a-5.2.0.tar.gz"
TOOLCHAIN_DIR="${HOME}/toolchain"
ESP8266_BINDIR="${TOOLCHAIN_DIR}/xtensa-lx106-elf/bin"
ESP32_BINDIR="${TOOLCHAIN_DIR}/xtensa-esp32-elf/bin"
ARM_BINDIR="${TOOLCHAIN_DIR}/gcc-arm-none-eabi/bin"
PATH="${PATH}:${ARM_BINDIR}:${ESP8266_BINDIR}:${ESP32_BINDIR}"
before_install:
- sudo apt install -qq gcc-multilib libssl-dev libssl-dev:i386 libncurses5-dev libncurses5-dev:i386 libreadline-dev libreadline-dev:i386
install:
- pwd
- cd ${HOME}
- mkdir -p ${TOOLCHAIN_DIR}
- wget ${ARM_TOOLCHAIN_URL} -O gcc-arm-none-eabi.tar.bz2
- tar xaf gcc-arm-none-eabi.tar.bz2 && mv gcc-arm-none-eabi-5_4-2016q3 ${TOOLCHAIN_DIR}/gcc-arm-none-eabi
- wget ${ESP8266_TOOLCHAIN_URL} -O linux64-xtensa-lx106-elf.tar.gz
- tar xaf linux64-xtensa-lx106-elf.tar.gz -C ${TOOLCHAIN_DIR}
- wget ${ESP32_TOOLCHAIN_URL} -O xtensa-esp32-elf-linux64.tar.gz
- tar xaf xtensa-esp32-elf-linux64.tar.gz -C ${TOOLCHAIN_DIR}
- pip install aos-cube pyserial
before_script:
- cd ${TRAVIS_BUILD_DIR}
- echo "export PATH=""${PATH}" >> ~/.bashrc
- echo ${TRAVIS_COMMIT}
- echo ${TRAVIS_PULL_REQUEST}
- echo ${TRAVIS_JOB_NUMBER}
script:
- bash ./tools/prebuild/prebuild.sh
- ls -lh ./prebuild
after_success:
- if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then DIRNAME=push MARK=push; else DIRNAME=pr MARK=${TRAVIS_PULL_REQUEST}; fi
- AOS_TARBALL=aos.${TRAVIS_BRANCH}.`echo ${TRAVIS_COMMIT} | head -c7`.${MARK}
- mv prebuild ${AOS_TARBALL}
- tar caf ${AOS_TARBALL}.tar ./${AOS_TARBALL}
- gzip ${AOS_TARBALL}.tar
- pip install oss2
- python ./tools/ci/oss-uploader.py ./${AOS_TARBALL}.tar.gz ${DIRNAME}/${AOS_TARBALL}.tar.gz
- ls -lh ${AOS_TARBALL}.tar.gz