forked from MinaProtocol/mina
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path4-deb-builder
More file actions
61 lines (50 loc) · 2.34 KB
/
Copy path4-deb-builder
File metadata and controls
61 lines (50 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#################################################################################################
# The "deb-builder" Stage
# - builds mina and any other binaries required to run `make deb`
#################################################################################################
FROM toolchain AS deb-builder
# Use --build-arg "DUNE_PROFILE=dev" to build a dev image or for CI
ARG DUNE_PROFILE=devnet
# branch to checkout on first clone (this will be the only available branch in the container)
# can also be a tagged release
ARG MINA_BRANCH=compatible
ARG MINA_COMMIT
# repo to checkout the branch from
ARG MINA_REPO=https://github.com/MinaProtocol/mina
# location of repo used for pins and external package commits
ARG MINA_DIR=mina
ENV MINA_COMMIT_SHA1=${MINA_COMMIT}
ENV PATH "$PATH:/usr/lib/go/bin:$HOME/.cargo/bin"
# HACK: build without special cpu features to allow more people to run mina
RUN ./scripts/zexe-standardize.sh
# --- Build all major tagets required for packaging
RUN echo "--- Build all major tagets required for packaging" \
&& echo "Building from Commit SHA: ${MINA_COMMIT_SHA1}" \
&& eval $(opam config env) \
&& dune build --profile=${DUNE_PROFILE} \
src/app/logproc/logproc.exe \
src/app/runtime_genesis_ledger/runtime_genesis_ledger.exe \
src/app/generate_keypair/generate_keypair.exe \
src/app/validate_keypair/validate_keypair.exe \
src/app/cli/src/mina.exe \
src/app/cli/src/mina_testnet_signatures.exe \
src/app/cli/src/mina_mainnet_signatures.exe \
src/app/archive/archive.exe \
src/app/archive/archive_testnet_signatures.exe \
src/app/archive/archive_mainnet_signatures.exe \
src/app/rosetta/rosetta.exe \
src/app/rosetta/rosetta_mainnet_signatures.exe \
src/app/rosetta/rosetta_testnet_signatures.exe \
src/app/rosetta/ocaml-signer/signer.exe
# --- MAKE DEB
RUN eval $(opam config env) \
&& echo "Building from Commit SHA: ${MINA_COMMIT_SHA1}" \
&& ./scripts/rebuild-deb.sh
# Rosetta-demo artifacts / build dir removal:
# Make rosetta-crucial components and the generate_keypair tool
# && dune build --profile=${DUNE_PROFILE} \
# && _build/default/src/app/runtime_genesis_ledger/runtime_genesis_ledger.exe \
# --config-file src/app/rosetta/demo-config.json \
# --genesis-dir ${HOME}/demo-genesis \
# && mv _build/default/src/app $HOME/app \
# && rm -rf _build