Skip to content

Commit

Permalink
[Chore] Update native binary build script
Browse files Browse the repository at this point in the history
  • Loading branch information
krendelhoff2 committed Oct 8, 2024
1 parent 087cc6b commit 67b14f9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions docker/package/scripts/build-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@ export OPAMROOT=$PWD/opamroot
dune_filepath="$1"
binary_name="$2"

echo "******* Initializing opam-repository... *******"
opam init tezos ./opam-repository --bare --disable-sandboxing

echo "******* Entering tezos... *******"
cd tezos
opam init local ../opam-repository --bare --disable-sandboxing
opam switch create . --repositories=local --no-install

echo "******* Creating switch *******"

. scripts/version.sh

opam switch create . --repositories=tezos "ocaml-base-compiler.$ocaml_version" --no-install

export OPAMSWITCH="$PWD"
opam repository remove default > /dev/null 2>&1

eval "$(opam env)"
OPAMASSUMEDEPEXTS=true opam install conf-rust conf-rust-2021

export CFLAGS="-fPIC ${CFLAGS:-}"
OPAMASSUMEDEPEXTS=true opam install opam/virtual/octez-deps.opam --deps-only --criteria="-notuptodate,-changed,-removed"
OPAMASSUMEDEPEXTS=true opam install opam/virtual/octez-deps.opam.locked --deps-only --criteria="-notuptodate,-changed,-removed"

eval "$(opam env)"
dune build "$dune_filepath"
cp "./_build/default/$dune_filepath" "../$binary_name"
cd ..

0 comments on commit 67b14f9

Please sign in to comment.