From d520a3db68962780e36533fb981e5451869b678a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Proust?= Date: Thu, 26 Apr 2018 11:13:08 +0800 Subject: [PATCH] CI: adding test dependencies to CI scripts --- scripts/ci/create_docker_image.build_deps.sh | 9 ++++++++- scripts/ci/create_opam_repository.tezos_deps.sh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/ci/create_docker_image.build_deps.sh b/scripts/ci/create_docker_image.build_deps.sh index 59e2b58d1..383c86859 100755 --- a/scripts/ci/create_docker_image.build_deps.sh +++ b/scripts/ci/create_docker_image.build_deps.sh @@ -25,6 +25,7 @@ image_name="${1:-tezos_build_deps}" image_version="${2:-latest}" base_image="${3:-tezos_opam:alpine-${alpine_version}_ocaml-${ocaml_version}}" cached_image="${4:-}" +test_deps="ocp-indent alcotest.0.8.3 alcotest-lwt crowbar" cat < "$tmp_dir"/Dockerfile FROM $base_image @@ -37,7 +38,13 @@ RUN opam exec -- ./tezos/scripts/install_build_deps.sh || \ echo ; \ opam remote add default https://opam.ocaml.org/2.0 && \ 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 tar -c $dependencies | tar -C "$tmp_dir" -x diff --git a/scripts/ci/create_opam_repository.tezos_deps.sh b/scripts/ci/create_opam_repository.tezos_deps.sh index c19469757..fa8cc543d 100755 --- a/scripts/ci/create_opam_repository.tezos_deps.sh +++ b/scripts/ci/create_opam_repository.tezos_deps.sh @@ -48,7 +48,7 @@ done # Hack: it loks like there is too many cycle in the opam-repository, # when using `opam-bundle --with-test --with-doc`, so we manually # 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 echo