kopia lustrzana https://github.com/solokeys/solo1
Add Rust to travis and to the toolchain container.
Not sure if this is the way to do it... Make salty build.pull/478/head
rodzic
27e1e78281
commit
398943d6c8
17
.travis.yml
17
.travis.yml
|
@ -12,10 +12,21 @@ addons:
|
|||
services:
|
||||
- docker
|
||||
before_install:
|
||||
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
||||
- sudo apt-get update -q
|
||||
- sudo apt-get install -y gcc-arm-embedded python3-venv
|
||||
- sudo add-apt-repository -y ppa:team-gcc-arm-embedded/ppa
|
||||
- sudo apt-get update -q
|
||||
- sudo apt-get install -y gcc-arm-embedded python3-venv
|
||||
- >
|
||||
set -eu;
|
||||
url="https://raw.githubusercontent.com/rust-lang/rustup/1.22.1/rustup-init.sh";
|
||||
wget -O rustup-init.sh "$url";
|
||||
echo "b273275cf4d83cb6b991c1090baeca54 rustup-init.sh" | md5sum -c -;
|
||||
echo "8928261388c8fae83bfd79b08d9030dfe21d17a8b59e9dcabda779213f6a3d14 rustup-init.sh" | sha256sum -c -;
|
||||
bash ./rustup-init.sh --profile=minimal -y -t thumbv7em-none-eabihf;
|
||||
rm rustup-init.sh;
|
||||
set +eu
|
||||
|
||||
script:
|
||||
- export CC=gcc-8
|
||||
- source ${HOME}/.cargo/env
|
||||
- pyenv shell 3.6.7
|
||||
- make travis
|
||||
|
|
16
Dockerfile
16
Dockerfile
|
@ -9,6 +9,8 @@ RUN apt-get update \
|
|||
wget \
|
||||
bzip2 \
|
||||
git \
|
||||
gcc \
|
||||
libc6-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install ARM compiler
|
||||
|
@ -35,4 +37,16 @@ RUN set -eux; \
|
|||
pip install -U pip
|
||||
|
||||
# solo-python (Python3.7 script for merging etc.)
|
||||
RUN pip install -U solo-python
|
||||
RUN pip install -U solo-python
|
||||
|
||||
# Rust for salty
|
||||
ENV RUSTUP_HOME=/rust/rustup
|
||||
ENV CARGO_HOME=/rust/cargo
|
||||
RUN set -eux; \
|
||||
url="https://raw.githubusercontent.com/rust-lang/rustup/1.22.1/rustup-init.sh"; \
|
||||
wget -O rustup-init.sh "$url"; \
|
||||
echo "b273275cf4d83cb6b991c1090baeca54 rustup-init.sh" | md5sum -c -; \
|
||||
echo "8928261388c8fae83bfd79b08d9030dfe21d17a8b59e9dcabda779213f6a3d14 rustup-init.sh" | sha256sum -c -; \
|
||||
bash ./rustup-init.sh --profile=minimal -y -t thumbv7em-none-eabihf; \
|
||||
rm rustup-init.sh; \
|
||||
chmod -R go+rwX /rust
|
||||
|
|
6
Makefile
6
Makefile
|
@ -41,9 +41,12 @@ all: main
|
|||
tinycbor/Makefile crypto/tiny-AES-c/aes.c:
|
||||
git submodule update --init
|
||||
|
||||
.PHONY: cbor
|
||||
.PHONY: cbor cborclean
|
||||
cbor: $(LIBCBOR)
|
||||
|
||||
cborclean:
|
||||
cd tinycbor && $(MAKE) clean
|
||||
|
||||
$(LIBCBOR):
|
||||
cd tinycbor/ && $(MAKE) LDFLAGS='' -j8
|
||||
|
||||
|
@ -54,6 +57,7 @@ version:
|
|||
@git describe
|
||||
|
||||
test: venv
|
||||
$(MAKE) cborclean
|
||||
$(MAKE) clean
|
||||
$(MAKE) -C . main
|
||||
$(MAKE) clean
|
||||
|
|
|
@ -86,3 +86,6 @@ cbor:
|
|||
LDFLAGS="$(LDFLAGS_LIB)" \
|
||||
CFLAGS="$(CFLAGS) -Os -DCBOR_PARSER_MAX_RECURSIONS=3"
|
||||
|
||||
salty:
|
||||
cd ../../crypto/salty/c-api && cargo clean
|
||||
cd ../../crypto/salty/c-api && $(MAKE)
|
||||
|
|
Ładowanie…
Reference in New Issue