CI: adding test dependencies to CI scripts
This commit is contained in:
parent
8b5bce50cf
commit
d520a3db68
@ -25,6 +25,7 @@ image_name="${1:-tezos_build_deps}"
|
|||||||
image_version="${2:-latest}"
|
image_version="${2:-latest}"
|
||||||
base_image="${3:-tezos_opam:alpine-${alpine_version}_ocaml-${ocaml_version}}"
|
base_image="${3:-tezos_opam:alpine-${alpine_version}_ocaml-${ocaml_version}}"
|
||||||
cached_image="${4:-}"
|
cached_image="${4:-}"
|
||||||
|
test_deps="ocp-indent alcotest.0.8.3 alcotest-lwt crowbar"
|
||||||
|
|
||||||
cat <<EOF > "$tmp_dir"/Dockerfile
|
cat <<EOF > "$tmp_dir"/Dockerfile
|
||||||
FROM $base_image
|
FROM $base_image
|
||||||
@ -37,7 +38,13 @@ RUN opam exec -- ./tezos/scripts/install_build_deps.sh || \
|
|||||||
echo ; \
|
echo ; \
|
||||||
opam remote add default https://opam.ocaml.org/2.0 && \
|
opam remote add default https://opam.ocaml.org/2.0 && \
|
||||||
opam exec -- ./tezos/scripts/install_build_deps.sh )
|
opam exec -- ./tezos/scripts/install_build_deps.sh )
|
||||||
RUN opam install --yes ocp-indent alcotest.0.8.3 alcotest-lwt
|
RUN opam install --yes $test_deps || \
|
||||||
|
( echo ; \
|
||||||
|
echo "### Failed to build with preloaded package" ; \
|
||||||
|
echo "### Retrying with the default opam repository" ; \
|
||||||
|
echo ; \
|
||||||
|
opam remote add default https://opam.ocaml.org/2.0 && \
|
||||||
|
opam install --yes $test_deps )
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
tar -c $dependencies | tar -C "$tmp_dir" -x
|
tar -c $dependencies | tar -C "$tmp_dir" -x
|
||||||
|
@ -48,7 +48,7 @@ done
|
|||||||
# Hack: it loks like there is too many cycle in the opam-repository,
|
# Hack: it loks like there is too many cycle in the opam-repository,
|
||||||
# when using `opam-bundle --with-test --with-doc`, so we manually
|
# when using `opam-bundle --with-test --with-doc`, so we manually
|
||||||
# inline some of the test and doc dependencies.
|
# inline some of the test and doc dependencies.
|
||||||
extra_packages="depext alcotest-lwt ocp-indent odoc ounit"
|
extra_packages="depext alcotest-lwt ocp-indent odoc ounit crowbar"
|
||||||
|
|
||||||
if ! [ -f "$build_dir"/opam-repository-master.tgz ]; then
|
if ! [ -f "$build_dir"/opam-repository-master.tgz ]; then
|
||||||
echo
|
echo
|
||||||
|
Loading…
Reference in New Issue
Block a user