Skip to content

Commit

Permalink
Use docker in travis
Browse files Browse the repository at this point in the history
  • Loading branch information
yura-pakhuchiy committed Jun 15, 2018
1 parent c8a521c commit fd5097a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 70 deletions.
72 changes: 6 additions & 66 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,7 @@
sudo: false
dist: trusty
language: c

compiler:
- clang
- gcc

env:
- GOAL=stm32 TOOLCHAIN_SHORTVER=7-2017q4 TOOLCHAIN_LONGVER=gcc-arm-none-eabi-7-2017-q4-major
# - GOAL=unix
- GOAL=src

matrix:
exclude:
- compiler: clang
env: GOAL=stm32
- compiler: clang
env: GOAL=src

addons:
apt:
packages:
- build-essential
- gcc-multilib
- libusb-1.0-0-dev
- libudev-dev
- python3
- python3-pip

before_install:
- pip3 install --user --upgrade pip setuptools wheel

install:
- pip3 install --user scons==3.0.1
- pip3 install --user flake8==3.5.0
- pip3 install --user pytest==3.4.2
- pip3 install --user ecdsa==0.13 mnemonic==0.18 requests
- pip3 install --user click==6.7 pyblake2==1.1.0 rlp==0.6.0
- pip3 install --user --no-deps trezor==0.9.1

before_script:
- test "$GOAL" != "stm32" || wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/$TOOLCHAIN_SHORTVER/$TOOLCHAIN_LONGVER-linux.tar.bz2
- test "$GOAL" != "stm32" || tar xfj $TOOLCHAIN_LONGVER-linux.tar.bz2
- test "$GOAL" != "stm32" || export PATH=$PWD/$TOOLCHAIN_LONGVER/bin:$PATH

language: generic
services:
- docker
script:
- test "$GOAL" != "stm32" || make build_cross
- test "$GOAL" != "stm32" || make build_boardloader
- test "$GOAL" != "stm32" || make build_bootloader
- test "$GOAL" != "stm32" || make build_prodtest
- test "$GOAL" != "stm32" || make build_firmware
- test "$GOAL" != "stm32" || make sizecheck

- test "$GOAL" != "unix" || make build_unix_noui
- test "$GOAL" != "unix" || make test
- test "$GOAL" != "unix" || make test_emu

# - test "$GOAL" != "src" || make style

notifications:
webhooks:
urls:
- http://ci-bot.satoshilabs.com:5000/travis
on_success: always
on_failure: always
on_start: always
- pwd
- ls
- ./build-docker.sh
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH

# install python tools

RUN pip3 install click pyblake2 scons
RUN pip3 install --no-deps git+https://github.com/trezor/python-trezor.git@master
RUN pip3 install scons==3.0.1
RUN pip3 install flake8==3.5.0
RUN pip3 install pytest==3.4.2
RUN pip3 install ecdsa==0.13 mnemonic==0.18 requests
RUN pip3 install click==6.7 pyblake2==1.1.0 rlp==0.6.0
RUN pip3 install --no-deps trezor==0.9.1

# workarounds for weird default install

Expand Down
4 changes: 2 additions & 2 deletions build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
set -e

IMAGE=trezor-core-build
TAG=${1:-master}
TAG=${1:-2.0.6-zcoin}

docker build -t $IMAGE .

docker run -t -v $(pwd)/build-docker:/build:z $IMAGE /bin/sh -c "\
git clone https://github.com/trezor/trezor-core && \
git clone https://github.com/yura-pakhuchiy/trezor-core && \
cd trezor-core && \
ln -s /build build &&
git checkout $TAG && \
Expand Down

0 comments on commit fd5097a

Please sign in to comment.