diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index a7b2f0e97d0301a5ae6ccd5ae400004507dc6642..ba23bb989a11dc9a2fa0ef6fe45c60658d091af6 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -1034,85 +1034,6 @@ wasm-runtime-check: SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G -ocaml-check: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu - rules: - - changes: - - '**/*.ml' - - '**/*.mli' - - .gitlab-ci.yml - - .gitlab/**/* - - devtools/**/* - - src/**/* - - tezt/**/* - when: on_success - needs: - - job: oc.docker:ci:amd64 - - job: trigger - - job: sanity_ci - optional: true - - job: docker:hadolint - optional: true - - job: oc.ocaml_fmt - optional: true - - job: oc.semgrep - optional: true - - job: oc.misc_checks - optional: true - - job: check_jsonnet - optional: true - - job: check_rust_fmt - optional: true - - job: documentation:rst-check - optional: true - - job: nix - optional: true - - job: commit_titles - optional: true - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - cache: - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - - key: sccache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_sccache - policy: pull-push - - key: dune_cache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull-push - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - dune build @check --stop-on-first-error - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - DUNE_CACHE: enabled - DUNE_CACHE_STORAGE_MODE: hardlink - DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - oc.build_kernels: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} stage: build @@ -2790,7 +2711,7 @@ audit_riscv_deps: check_riscv_kernels: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: build + stage: test tags: - gcp rules: @@ -2922,6 +2843,85 @@ test_evm_compatibility: SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G +ocaml-check: + image: ${ci_image_name}/build:${ci_image_tag} + stage: test + tags: + - gcp_very_high_cpu + rules: + - changes: + - '**/*.ml' + - '**/*.mli' + - .gitlab-ci.yml + - .gitlab/**/* + - devtools/**/* + - src/**/* + - tezt/**/* + when: on_success + needs: + - job: oc.docker:ci:amd64 + - job: trigger + - job: sanity_ci + optional: true + - job: docker:hadolint + optional: true + - job: oc.ocaml_fmt + optional: true + - job: oc.semgrep + optional: true + - job: oc.misc_checks + optional: true + - job: check_jsonnet + optional: true + - job: check_rust_fmt + optional: true + - job: documentation:rst-check + optional: true + - job: nix + optional: true + - job: commit_titles + optional: true + dependencies: + - oc.docker:ci:amd64 + timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push + - key: dune_cache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_dune_cache + policy: pull-push + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - dune build @check --stop-on-first-error + after_script: + - ./scripts/ci/sccache-stop.sh + - eval $(opam env) + - dune cache trim --size=5GB + variables: + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + DUNE_CACHE: enabled + DUNE_CACHE_STORAGE_MODE: hardlink + DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache + retry: + max: 2 + when: + - stuck_or_timeout_failure + - runner_system_failure + oc.unit:non-proto-x86_64: image: ${ci_image_name}/test:${ci_image_tag} stage: test diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index b48878da82a51419cb56d1bd3f901c3b957a77f1..3f6975b9f872712847e614576c224134e6745b91 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -1033,85 +1033,6 @@ wasm-runtime-check: SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G -ocaml-check: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu - rules: - - changes: - - '**/*.ml' - - '**/*.mli' - - .gitlab-ci.yml - - .gitlab/**/* - - devtools/**/* - - src/**/* - - tezt/**/* - when: on_success - needs: - - job: oc.docker:ci:amd64 - - job: trigger - - job: sanity_ci - optional: true - - job: docker:hadolint - optional: true - - job: oc.ocaml_fmt - optional: true - - job: oc.semgrep - optional: true - - job: oc.misc_checks - optional: true - - job: check_jsonnet - optional: true - - job: check_rust_fmt - optional: true - - job: documentation:rst-check - optional: true - - job: nix - optional: true - - job: commit_titles - optional: true - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - cache: - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - - key: sccache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_sccache - policy: pull-push - - key: dune_cache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull-push - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - dune build @check --stop-on-first-error - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - DUNE_CACHE: enabled - DUNE_CACHE_STORAGE_MODE: hardlink - DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - oc.build_kernels: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} stage: build @@ -2789,7 +2710,7 @@ audit_riscv_deps: check_riscv_kernels: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: build + stage: test tags: - gcp rules: @@ -2921,6 +2842,85 @@ test_evm_compatibility: SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G +ocaml-check: + image: ${ci_image_name}/build:${ci_image_tag} + stage: test + tags: + - gcp_very_high_cpu + rules: + - changes: + - '**/*.ml' + - '**/*.mli' + - .gitlab-ci.yml + - .gitlab/**/* + - devtools/**/* + - src/**/* + - tezt/**/* + when: on_success + needs: + - job: oc.docker:ci:amd64 + - job: trigger + - job: sanity_ci + optional: true + - job: docker:hadolint + optional: true + - job: oc.ocaml_fmt + optional: true + - job: oc.semgrep + optional: true + - job: oc.misc_checks + optional: true + - job: check_jsonnet + optional: true + - job: check_rust_fmt + optional: true + - job: documentation:rst-check + optional: true + - job: nix + optional: true + - job: commit_titles + optional: true + dependencies: + - oc.docker:ci:amd64 + timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push + - key: dune_cache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_dune_cache + policy: pull-push + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - dune build @check --stop-on-first-error + after_script: + - ./scripts/ci/sccache-stop.sh + - eval $(opam env) + - dune cache trim --size=5GB + variables: + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + DUNE_CACHE: enabled + DUNE_CACHE_STORAGE_MODE: hardlink + DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache + retry: + max: 2 + when: + - stuck_or_timeout_failure + - runner_system_failure + oc.unit:non-proto-x86_64: image: ${ci_image_name}/test:${ci_image_tag} stage: test diff --git a/.gitlab/ci/pipelines/schedule_extended_test.yml b/.gitlab/ci/pipelines/schedule_extended_test.yml index cfad5acf7540c78f42af8fd6ee0dd48f77e19450..4e32655fd91cac7baaf83fb5d94c4b3014a9db9c 100644 --- a/.gitlab/ci/pipelines/schedule_extended_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_test.yml @@ -693,55 +693,6 @@ wasm-runtime-check: SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G -ocaml-check: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu - rules: - - when: always - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - cache: - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - - key: sccache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_sccache - policy: pull-push - - key: dune_cache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull-push - interruptible: false - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - dune build @check --stop-on-first-error - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - DUNE_CACHE: enabled - DUNE_CACHE_STORAGE_MODE: hardlink - DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - oc.build_kernels: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} stage: build @@ -2441,7 +2392,7 @@ audit_riscv_deps: check_riscv_kernels: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: build + stage: test tags: - gcp rules: @@ -2555,6 +2506,55 @@ test_evm_compatibility: SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G +ocaml-check: + image: ${ci_image_name}/build:${ci_image_tag} + stage: test + tags: + - gcp_very_high_cpu + rules: + - when: always + dependencies: + - oc.docker:ci:amd64 + timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push + - key: dune_cache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_dune_cache + policy: pull-push + interruptible: false + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - dune build @check --stop-on-first-error + after_script: + - ./scripts/ci/sccache-stop.sh + - eval $(opam env) + - dune cache trim --size=5GB + variables: + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + DUNE_CACHE: enabled + DUNE_CACHE_STORAGE_MODE: hardlink + DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache + retry: + max: 2 + when: + - stuck_or_timeout_failure + - runner_system_failure + oc.unit:non-proto-x86_64: image: ${ci_image_name}/test:${ci_image_tag} stage: test diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index 8dba9218868c00ada0c6720fb9b1663ee9c0a1bc..994ef824b8396a7e17f68f1b935eff3c4055787e 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -776,29 +776,6 @@ let jobs pipeline_type = ["etherlink/lib_wasm_runtime/lint.sh"] |> enable_cargo_cache |> enable_sccache in - let job_ocaml_check : tezos_job = - job - ~__POS__ - ~name:"ocaml-check" - ~cpu:Very_high - ~image:Images.CI.build - ~stage - ~retry: - {max = 2; when_ = [Stuck_or_timeout_failure; Runner_system_failure]} - ~dependencies:dependencies_needs_start - ~rules:(make_rules ~changes:changeset_ocaml_check_files ()) - ~before_script: - (before_script - ~take_ownership:true - ~source_version:true - ~eval_opam:true - []) - (* Stops on first error for easier detection of problems in - the log and to reduce time to merge of other MRs further - down the merge train. *) - ["dune build @check --stop-on-first-error"] - |> enable_cargo_cache |> enable_sccache |> enable_dune_cache - in let build_octez_source = (* We check compilation of the octez tarball on scheduled pipelines because it's not worth testing it for every merge @@ -864,7 +841,6 @@ let jobs pipeline_type = job_build_x86_64_release; job_build_x86_64_exp_dev_extra; wasm_runtime_check; - job_ocaml_check; job_build_kernels; job_build_dsn_node; job_tezt_fetch_records; @@ -908,6 +884,29 @@ let jobs pipeline_type = (* Test jobs*) let test = + let job_ocaml_check : tezos_job = + job + ~__POS__ + ~name:"ocaml-check" + ~cpu:Very_high + ~image:Images.CI.build + ~stage:Stages.test + ~retry: + {max = 2; when_ = [Stuck_or_timeout_failure; Runner_system_failure]} + ~dependencies:dependencies_needs_start + ~rules:(make_rules ~changes:changeset_ocaml_check_files ()) + ~before_script: + (before_script + ~take_ownership:true + ~source_version:true + ~eval_opam:true + []) + (* Stops on first error for easier detection of problems in + the log and to reduce time to merge of other MRs further + down the merge train. *) + ["dune build @check --stop-on-first-error"] + |> enable_cargo_cache |> enable_sccache |> enable_dune_cache + in (* This job triggers the debian child pipeline automatically if any files in the changeset is modified. It's the same as job_debian_repository_trigger that can be run manually. @@ -1258,6 +1257,7 @@ let jobs pipeline_type = ["dune runtest resto"] in [ + job_ocaml_check; oc_unit_non_proto_x86_64; oc_unit_etherlink_x86_64; oc_unit_other_x86_64; @@ -1759,7 +1759,6 @@ let jobs pipeline_type = in let job_check_riscv_kernels : tezos_job = make_job_kernel - ~stage:Stages.build ~__POS__ ~name:"check_riscv_kernels" ~changes:changeset_riscv_kernels