compile and run lotus net with docker:go

This commit is contained in:
Anton Evangelatov 2020-06-17 19:02:04 +02:00
parent 3ca1593919
commit 3cc6fb6c6e
3 changed files with 13 additions and 51 deletions

11
lotus-testground/Makefile Normal file
View File

@ -0,0 +1,11 @@
all:
deps:
git submodule update --init
cd extern/filecoin-ffi && make
run-exec:
testground run single --plan=network --testcase=lotus-network --builder=exec:go --runner=local:exec --instances=2
run-docker:
testground run single --plan=network --testcase=lotus-network --builder=docker:go --runner=local:docker --instances=2

View File

@ -6,10 +6,11 @@ runner = "local:exec"
[builders."docker:go"]
enabled = true
skip_runtime_image = true
[builders."docker:go".dockerfile_extensions]
pre_mod_download = """
RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq
RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq gcc git bzr pkg-config
ARG LOTUS_VERSION=master
RUN git clone https://github.com/filecoin-project/lotus.git ${PLAN_DIR}/../lotus && cd ${PLAN_DIR}/../lotus && git checkout ${LOTUS_VERSION} && git submodule update --init && make 2k
RUN cd ${PLAN_DIR}/../lotus/extern/filecoin-ffi \
@ -18,10 +19,6 @@ RUN cd ${PLAN_DIR}/../lotus/extern/filecoin-ffi \
&& cp -R ${PLAN_DIR}/../lotus/extern/filecoin-ffi /tmp
"""
pre_runtime_copy = """
COPY --from=builder /usr/lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/* /usr/lib/
"""
[builders."exec:go"]
enabled = true

View File

@ -1,46 +0,0 @@
name = "lotus-testground"
[defaults]
builder = "exec:go"
runner = "local:exec"
[builders."docker:go"]
enabled = true
[builders."docker:go".dockerfile_extensions]
pre_mod_download = """
RUN apt-get update && apt-get install -y ca-certificates llvm clang mesa-opencl-icd ocl-icd-opencl-dev jq
ARG LOTUS_VERSION=master
RUN git clone https://github.com/filecoin-project/lotus.git ${PLAN_DIR}/../lotus && cd ${PLAN_DIR}/../lotus && git checkout ${LOTUS_VERSION} && git submodule update --init && make 2k
RUN cd ${PLAN_DIR}/../lotus/extern/filecoin-ffi \
&& make \
&& mkdir /tmp/filecoin-ffi \
&& cp -R ${PLAN_DIR}/../lotus/extern/filecoin-ffi /tmp
"""
pre_runtime_copy = """
COPY --from=builder /usr/lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/* /usr/lib/
"""
[builders."exec:go"]
enabled = true
[runners."local:docker"]
enabled = true
[runners."local:exec"]
enabled = true
[runners."cluster:swarm"]
enabled = true
[runners."cluster:k8s"]
enabled = true
# seq 0
[[testcases]]
name = "lotus-network"
instances = { min = 2, max = 2, default = 2 }
[testcases.params]
miner-count = { type = "int", default = 1 }