Dockerfile for building/installing blockstack-core, Dockerfile for CI with codecov

This commit is contained in:
Aaron Blankstein
2019-04-25 07:43:33 -05:00
parent 7c39455de6
commit 11f6747de9
3 changed files with 38 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
Dockerfile
target
integration_tests/blockstack-consensus-data/
integration_tests/test-out/
api/data
@@ -7,3 +9,4 @@ api/data
testnet/index.html
testnet.log
testnet-logs*
legacy

View File

@@ -1,5 +1,23 @@
FROM python:onbuild
ENV PORT 8080
EXPOSE 8080
ENTRYPOINT ["python"]
CMD ["app.py"]
FROM rust:latest
WORKDIR /src/
# Hacks to cache the build dependencies.
RUN USER=root cargo new --bin blockstack-core
WORKDIR /src/blockstack-core
COPY ./Cargo.lock ./Cargo.lock
COPY ./Cargo.toml ./Cargo.toml
RUN cargo build --release
RUN rm src/*.rs
RUN rm ./target/release/deps/blockstack_core*
# copy your source tree
COPY . .
RUN cargo build --release
RUN cargo install --path .
CMD ["blockstack-core"]

View File

@@ -0,0 +1,12 @@
FROM circleci/rust
WORKDIR /kcov/
RUN sudo apt-get update
RUN sudo apt-get install cmake binutils-dev libcurl4-openssl-dev zlib1g-dev libdw-dev libiberty-dev git
ENV KCOV_VERSION 34
RUN sudo git clone --single-branch --branch v$KCOV_VERSION https://github.com/SimonKagstrom/kcov.git
RUN cd kcov && sudo cmake . && sudo make -j$(nproc) && sudo make install
RUN cargo install cargo-kcov