diff --git a/.gitlab/ci/templates.yml b/.gitlab/ci/templates.yml index e4ec92d0e6b4622412cc2f241c093d23c1a34b98..320bb65b8fb718636efb67de1f61c34f1a3add21 100644 --- a/.gitlab/ci/templates.yml +++ b/.gitlab/ci/templates.yml @@ -2,7 +2,7 @@ variables: # /!\ CI_REGISTRY is overriden to use a private Docker registry mirror in AWS ECR # in GitLab namespaces `nomadic-labs` and `tezos` ## This value MUST be the same as `opam_repository_tag` in `scripts/version.sh` - build_deps_image_version: fa7875a43d20b0377624a310460f6776ac948905 + build_deps_image_version: d830ad8b1830feceeb245a967a6fb7900a2aac9c build_deps_image_name: "${CI_REGISTRY}/tezos/opam-repository" GIT_STRATEGY: fetch GIT_DEPTH: "1" diff --git a/manifest/main.ml b/manifest/main.ml index c841d01050d6cd84b2045217c0078473ccc37110..e68fe43879aef55ad439991798a34cde8e66dcb9 100644 --- a/manifest/main.ml +++ b/manifest/main.ml @@ -99,7 +99,7 @@ let caqti = external_lib "caqti" V.True let caqti_lwt = external_lib "caqti-lwt" V.True -let caqti_driver_postgresql = external_lib "caqti-driver-postgresql" V.True +let caqti_dynload = external_lib "caqti-dynload" V.True let cmdliner = external_lib "cmdliner" V.(at_least "1.1.0") @@ -5442,7 +5442,7 @@ let _octez_tps_evaluation = [ octez_base |> open_ ~m:"TzPervasives"; caqti; - caqti_driver_postgresql; + caqti_dynload; caqti_lwt; data_encoding; lwt; diff --git a/opam/tezos-tps-evaluation.opam b/opam/tezos-tps-evaluation.opam index 645cafe9aea871884e83cf7756cb85d6ce52b584..1e3e47360a3e8046c8794a2a149f5b456ff6b3c0 100644 --- a/opam/tezos-tps-evaluation.opam +++ b/opam/tezos-tps-evaluation.opam @@ -11,7 +11,7 @@ depends: [ "dune" { >= "3.0" } "tezos-base" "caqti" - "caqti-driver-postgresql" + "caqti-dynload" "caqti-lwt" "data-encoding" { >= "0.6" & < "0.7" } "lwt" { >= "5.4.0" } diff --git a/scripts/install_build_deps.raw.sh b/scripts/install_build_deps.raw.sh index cb1085ecaee9a890ecacc9b8db6ca7ff5792614f..4c11cb06ccca0dc04736a0f4ef19b898e96d7fc2 100755 --- a/scripts/install_build_deps.raw.sh +++ b/scripts/install_build_deps.raw.sh @@ -6,13 +6,7 @@ src_dir="$(dirname "$script_dir")" #shellcheck source=scripts/version.sh . "$script_dir"/version.sh -if [ "$1" = "--tps" ]; then - opams=$(find "$src_dir/vendors" "$src_dir/src" "$src_dir/tezt" "$src_dir/opam" -name \*.opam -print) -else - # The TPS evaluation tool requires some extra dependencies that we want to hide from the end user that - # builds Octez. As such we're not building it by default. - opams=$(find "$src_dir/vendors" "$src_dir/src" "$src_dir/tezt" "$src_dir/opam" -name \*.opam -not -name tezos-tps-evaluation.opam -print) -fi +opams=$(find "$src_dir/vendors" "$src_dir/src" "$src_dir/tezt" "$src_dir/opam" -name \*.opam -print) export OPAMYES="${OPAMYES:=true}" @@ -46,3 +40,7 @@ $opam_depext_command # an error. # shellcheck disable=SC2086 opam install $opams --deps-only --with-test --criteria="-notuptodate,-changed,-removed" + +if [ "$1" = "--tps" ]; then + opam install caqti-driver-postgresql +fi diff --git a/scripts/update_opam_repo.sh b/scripts/update_opam_repo.sh index 93ba211f4911a7a193acef966d86dc2abe32268d..b0e430d74f1c22bd32a5f6e28c2237a17dd0e422 100755 --- a/scripts/update_opam_repo.sh +++ b/scripts/update_opam_repo.sh @@ -120,8 +120,14 @@ case $(opam --version) in esac #shellcheck disable=SC2086 OPAMSOLVERTIMEOUT=600 opam admin filter --yes --resolve \ - $packages,ocaml,ocaml-base-compiler,odoc,${opam_depext_dep}js_of_ocaml-ppx,opam-ed,ledgerwallet-tezos,$dummy_pkg - + $packages,ocaml,ocaml-base-compiler,odoc,${opam_depext_dep}ledgerwallet-tezos,caqti-driver-postgresql,$dummy_pkg +## - ocaml-base-compiler has to be explicitely listed for the solver +## to not prefer the "variant" `system` of the compiler +## - odoc is used by the CI to generate the doc +## - ledgerwallet-tezos is an optional dependency of signer-services +## we want to have when building released binaries +## - caqti-driver-postgresq is needed by tps measurement software to +## read tezos-indexer databases ## Adding useful compiler variants for variant in afl flambda fp ; do diff --git a/scripts/version.sh b/scripts/version.sh index fee1e7551583f08ab79d11f1ad9419117ca5c495..169559621136b8f26270ef88bdccc256088034a3 100755 --- a/scripts/version.sh +++ b/scripts/version.sh @@ -25,7 +25,7 @@ export full_opam_repository_tag=231273e96a862099add322413688f896afb02464 ## opam_repository is an additional, tezos-specific opam repository. ## This value MUST be the same as `build_deps_image_version` in `.gitlab/ci/templates.ym export opam_repository_url=https://gitlab.com/tezos/opam-repository -export opam_repository_tag=fa7875a43d20b0377624a310460f6776ac948905 +export opam_repository_tag=d830ad8b1830feceeb245a967a6fb7900a2aac9c export opam_repository_git=$opam_repository_url.git export opam_repository=$opam_repository_git\#$opam_repository_tag diff --git a/src/bin_tps_evaluation/dune b/src/bin_tps_evaluation/dune index 0fba5e79e169df4a9a038add5c26e6a2cbd599b0..0493317c01a833f3ff890d7d0767379fb21d27b9 100644 --- a/src/bin_tps_evaluation/dune +++ b/src/bin_tps_evaluation/dune @@ -9,7 +9,7 @@ (libraries tezos-base caqti - caqti-driver-postgresql + caqti-dynload caqti-lwt data-encoding lwt