mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
update Dockerfile and .travis.yml to be more similar to trezor-mcu
This commit is contained in:
parent
ba3b958612
commit
1e697787a6
55
.travis.yml
55
.travis.yml
@ -2,11 +2,25 @@ sudo: false
|
|||||||
dist: trusty
|
dist: trusty
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
- deadsnakes
|
||||||
|
packages:
|
||||||
|
- build-essential
|
||||||
|
- python3.6
|
||||||
|
- python3.6-dev
|
||||||
|
- python3.6-venv
|
||||||
|
- libusb-1.0-0-dev
|
||||||
|
- libudev-dev
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
|
- MAKEFLAGS=-j2
|
||||||
|
- PYTHON=python3.6
|
||||||
- PROTOBUF_VERSION=3.4.0
|
- PROTOBUF_VERSION=3.4.0
|
||||||
- TOOLCHAIN_SHORTVER=7-2018q2
|
- TOOLCHAIN_SHORTVER=8-2018q4
|
||||||
- TOOLCHAIN_LONGVER=gcc-arm-none-eabi-7-2018-q2-update
|
- TOOLCHAIN_LONGVER=gcc-arm-none-eabi-8-2018-q4-major
|
||||||
matrix:
|
matrix:
|
||||||
- GOAL=stm32
|
- GOAL=stm32
|
||||||
- GOAL=unix
|
- GOAL=unix
|
||||||
@ -17,40 +31,27 @@ matrix:
|
|||||||
- compiler: clang
|
- compiler: clang
|
||||||
env: GOAL=unix
|
env: GOAL=unix
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- deadsnakes
|
|
||||||
packages:
|
|
||||||
- build-essential
|
|
||||||
- gcc-multilib
|
|
||||||
- libusb-1.0-0-dev
|
|
||||||
- libudev-dev
|
|
||||||
- python3.6
|
|
||||||
- python3.6-dev
|
|
||||||
- python3.6-venv
|
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/libsodium
|
- $HOME/libsodium
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- python3.6 -m ensurepip --user
|
- $PYTHON -m ensurepip --user
|
||||||
- python3.6 -m pip install --user pipenv
|
- $PYTHON -m pip install --user pipenv
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- curl -LO "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip"
|
- ./travis-install-libsodium.sh
|
||||||
- unzip "protoc-${PROTOBUF_VERSION}-linux-x86_64.zip" -d protoc
|
- export PKG_CONFIG_PATH=$HOME/libsodium/lib/pkgconfig:$PKG_CONFIG_PATH
|
||||||
- export PATH="$(pwd)/protoc/bin:$PATH"
|
- export LD_LIBRARY_PATH=$HOME/libsodium/lib:$LD_LIBRARY_PATH
|
||||||
- ./travis-install-libsodium.sh
|
- wget "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip"
|
||||||
- export PKG_CONFIG_PATH=$HOME/libsodium/lib/pkgconfig:$PKG_CONFIG_PATH
|
- unzip "protoc-${PROTOBUF_VERSION}-linux-x86_64.zip" -d protoc
|
||||||
- export LD_LIBRARY_PATH=$HOME/libsodium/lib:$LD_LIBRARY_PATH
|
- export PATH="$(pwd)/protoc/bin:$PATH"
|
||||||
- pipenv install
|
- pipenv install
|
||||||
|
|
||||||
before_script:
|
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" || 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" || tar xfj $TOOLCHAIN_LONGVER-linux.tar.bz2
|
||||||
- test "$GOAL" != "stm32" || export PATH=$PWD/$TOOLCHAIN_LONGVER/bin:$PATH
|
- test "$GOAL" != "stm32" || export PATH=$PWD/$TOOLCHAIN_LONGVER/bin:$PATH
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- test "$GOAL" != "src" || pipenv run make style_check
|
- test "$GOAL" != "src" || pipenv run make style_check
|
||||||
|
23
Dockerfile
23
Dockerfile
@ -8,7 +8,7 @@ ENV TOOLCHAIN_FLAVOR=$TOOLCHAIN_FLAVOR
|
|||||||
# install build tools and dependencies
|
# install build tools and dependencies
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
build-essential wget git python3-pip gcc-multilib
|
build-essential wget git python3-pip
|
||||||
|
|
||||||
# install dependencies from toolchain source build
|
# install dependencies from toolchain source build
|
||||||
|
|
||||||
@ -46,20 +46,23 @@ RUN if [ "$TOOLCHAIN_FLAVOR" = "src" ]; then \
|
|||||||
popd ; \
|
popd ; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install additional tools
|
# download protobuf
|
||||||
|
|
||||||
RUN apt-get install -y protobuf-compiler libprotobuf-dev
|
ENV PROTOBUF_VERSION=3.4.0
|
||||||
|
ENV PROTOBUF_HASH=e4b51de1b75813e62d6ecdde582efa798586e09b5beaebfb866ae7c9eaadace4
|
||||||
|
RUN wget "https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip"
|
||||||
|
RUN echo "${PROTOBUF_HASH} protoc-${PROTOBUF_VERSION}-linux-x86_64.zip" | sha256sum -c
|
||||||
|
|
||||||
# setup toolchain
|
# setup toolchain
|
||||||
|
|
||||||
ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH
|
ENV PATH=/opt/$TOOLCHAIN_LONGVER/bin:$PATH
|
||||||
|
|
||||||
|
ENV PYTHON=python3
|
||||||
|
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
|
||||||
|
|
||||||
|
# use zipfile module to extract files world-readable
|
||||||
|
RUN $PYTHON -m zipfile -e "protoc-${PROTOBUF_VERSION}-linux-x86_64.zip" /usr/local && chmod 755 /usr/local/bin/protoc
|
||||||
|
|
||||||
# install python dependencies
|
# install python dependencies
|
||||||
|
|
||||||
RUN pip3 install scons trezor
|
RUN $PYTHON -m pip install scons trezor
|
||||||
|
|
||||||
# workarounds for weird default install
|
|
||||||
|
|
||||||
RUN ln -s python3 /usr/bin/python
|
|
||||||
RUN ln -s dist-packages /usr/local/lib/python3.5/site-packages
|
|
||||||
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
|
|
||||||
|
2
vendor/micropython
vendored
2
vendor/micropython
vendored
@ -1 +1 @@
|
|||||||
Subproject commit b98de8b581dfd691dcb1b4efbe7d489a81e1cbaf
|
Subproject commit c5d8107e2af090ff4547851297a484652fde4242
|
Loading…
Reference in New Issue
Block a user