From 3a5479ee1cdc7d3afb8c75316df9cad836e5952f Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Wed, 4 Dec 2024 13:41:03 +0000 Subject: [PATCH] Profiler: Add CI job to check for build errors Co-authored-by: Killian Delarue --- .gitlab/ci/pipelines/before_merging.yml | 32 ++++++++++++++++++ .gitlab/ci/pipelines/merge_train.yml | 32 ++++++++++++++++++ .../ci/pipelines/schedule_extended_test.yml | 33 +++++++++++++++++++ ci/bin/code_verification.ml | 24 ++++++++++++-- 4 files changed, 118 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 118f9fb60352..aee527c79440 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -1166,6 +1166,38 @@ build_grafazos_dashboards: - grafazos/output/**/*.json when: on_success +build-layer1-profiling: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp + 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 + before_script: + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make octez-layer1 + after_script: + - ./scripts/ci/sccache-stop.sh + variables: + TEZOS_PPX_PROFILER: profiling + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + select_tezts: image: ${ci_image_name}/prebuild:${ci_image_tag} stage: build diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index 8ddee5303f96..26e118b43672 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -1165,6 +1165,38 @@ build_grafazos_dashboards: - grafazos/output/**/*.json when: on_success +build-layer1-profiling: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp + 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 + before_script: + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make octez-layer1 + after_script: + - ./scripts/ci/sccache-stop.sh + variables: + TEZOS_PPX_PROFILER: profiling + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + select_tezts: image: ${ci_image_name}/prebuild:${ci_image_tag} stage: build diff --git a/.gitlab/ci/pipelines/schedule_extended_test.yml b/.gitlab/ci/pipelines/schedule_extended_test.yml index 5e12721311f1..6e71e526e035 100644 --- a/.gitlab/ci/pipelines/schedule_extended_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_test.yml @@ -780,6 +780,39 @@ build_grafazos_dashboards: - grafazos/output/**/*.json when: on_success +build-layer1-profiling: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp + 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 + interruptible: false + before_script: + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make octez-layer1 + after_script: + - ./scripts/ci/sccache-stop.sh + variables: + TEZOS_PPX_PROFILER: profiling + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + oc.build:rpm:amd64: image: $DISTRIBUTION stage: build diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index 2bce547f9862..b1e64dcf055a 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -655,6 +655,7 @@ let jobs pipeline_type = (* Build jobs *) let build = + let stage = Stages.build in (* TODO: The code is a bit convoluted here because these jobs are either in the build or in the manual stage depending on the pipeline type. However, we can put them in the build stage on @@ -672,7 +673,7 @@ let jobs pipeline_type = ~__POS__ ~name:"wasm-runtime-check" ~image:Images.CI.build - ~stage:Stages.build + ~stage ~dependencies:dependencies_needs_start ~rules:(make_rules ~changes:changeset_wasm_runtime_check_files ()) ~before_script: @@ -689,7 +690,7 @@ let jobs pipeline_type = ~__POS__ ~name:"ocaml-check" ~image:Images.CI.build - ~stage:Stages.build + ~stage ~dependencies:dependencies_needs_start ~rules:(make_rules ~changes:changeset_ocaml_check_files ()) ~before_script: @@ -711,7 +712,7 @@ let jobs pipeline_type = pipelines. *) job ~__POS__ - ~stage:Stages.build + ~stage ~image:Images.CI.build ~rules:(make_rules ~manual:Yes ()) ~before_script: @@ -749,6 +750,22 @@ let jobs pipeline_type = | Schedule_extended_test -> Common.job_build_grafazos ~rules:[job_rule ~when_:Always ()] () in + let job_build_layer1_profiling = + job + ~__POS__ + ~stage + ~image:Images.CI.build + ~name:"build-layer1-profiling" + ~before_script: + (before_script + ~take_ownership:true + ~source_version:true + ~eval_opam:true + []) + ~variables:[("TEZOS_PPX_PROFILER", "profiling")] + ["make octez-layer1"] + |> enable_cargo_cache |> enable_sccache + in [ job_build_arm64_release; job_build_arm64_exp_dev_extra; @@ -762,6 +779,7 @@ let jobs pipeline_type = job_tezt_fetch_records; build_octez_source; job_build_grafazos; + job_build_layer1_profiling; ] @ Option.to_list job_select_tezts @ bin_packages_jobs -- GitLab