From b60e83fa541439b00f8243bae343aa2d314102ec Mon Sep 17 00:00:00 2001 From: Killian Delarue Date: Tue, 15 Apr 2025 14:34:29 +0200 Subject: [PATCH 1/4] CIAO: Move [enable_{sccache;cargo_cache}] to from [Tezos_ci] --- ci/bin/common.ml | 60 ------------------------------------ ci/lib_tezos_ci/tezos_ci.ml | 41 +++++++++++++++++++++++- ci/lib_tezos_ci/tezos_ci.mli | 47 +++++++++++++++++++++++++++- 3 files changed, 86 insertions(+), 62 deletions(-) diff --git a/ci/bin/common.ml b/ci/bin/common.ml index 41016f4e2137..fd0d78361291 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -139,44 +139,6 @@ let enable_kernels = (* Common GitLab CI caches *) -(** Add variable enabling sccache. - - This function should be applied to jobs that build rust files and - which has a configured sccache Gitlab CI cache. - - - [key] and [path] configure the key under which the cache is - stored, and the path that will be cached. By default, the [key] - contains the name of the job, thus scoping the cache to all - instances of that job. By default, [path] is the folder - ["$CI_PROJECT_DIR/_sccache"], and this function also sets the - environment dir [SCCACHE_DIR] such that sccache stores its caches - there. - - - [cache_size] sets the environment variable [SCCACHE_CACHE_SIZE] - that configures the maximum size of the cache. - - - [error_log], [idle_timeout] and [log] sets the environment - variables [SCCACHE_ERROR_LOG], [SCCACHE_IDLE_TIMEOUT] and - [SCCACHE_LOG] respectively. See the sccache documentation for more - information on these variables. *) -let enable_sccache ?key ?error_log ?idle_timeout ?log - ?(path = "$CI_PROJECT_DIR/_sccache") ?(cache_size = "5G") job = - let key = - Option.value - ~default:("sccache-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) - key - in - job - |> append_variables - ([("SCCACHE_DIR", path); ("SCCACHE_CACHE_SIZE", cache_size)] - @ opt_var "SCCACHE_ERROR_LOG" Fun.id error_log - @ opt_var "SCCACHE_IDLE_TIMEOUT" Fun.id idle_timeout - @ opt_var "SCCACHE_LOG" Fun.id log) - |> append_cache (cache ~key [path]) - (* Starts sccache and sets [RUSTC_WRAPPER] *) - |> append_before_script [". ./scripts/ci/sccache-start.sh"] - |> append_after_script ["./scripts/ci/sccache-stop.sh"] - (** Enable caching of Cargo's target folder which stores files which can speed up subsequent compilation passes. @@ -200,28 +162,6 @@ let enable_cargo_target_caches ?key job = ] |> append_cache (cache ~key [cache_dir]) -(** Allow cargo to access the network by setting [CARGO_NET_OFFLINE=false]. - - This function should only be applied to jobs that have a GitLab CI - cache for [CARGO_HOME], as enabled through [enable_cache_cargo] (that - function calls this function, so there is no need to apply both). - Exceptions can be made for jobs that must have CARGO_HOME set to - something different than {!cargo_home}. *) -let enable_networked_cargo = append_variables [("CARGO_NET_OFFLINE", "false")] - -(** Adds a GitLab CI cache for the CARGO_HOME folder. - - More precisely, we only cache the non-SCM dependencies in the - sub-directory [registry/cache]. *) -let enable_cargo_cache job = - job - |> append_cache - (cache - ~key:("cargo-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) - [cargo_home // "registry/cache"]) - (* Allow Cargo to access the network *) - |> enable_networked_cargo - (** Add variable enabling dune cache. This function can be applied to jobs that run dune. diff --git a/ci/lib_tezos_ci/tezos_ci.ml b/ci/lib_tezos_ci/tezos_ci.ml index dc7c4b8010da..bde13545cc59 100644 --- a/ci/lib_tezos_ci/tezos_ci.ml +++ b/ci/lib_tezos_ci/tezos_ci.ml @@ -1,7 +1,7 @@ (*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) -(* Copyright (c) 2023-2024 Nomadic Labs. *) +(* Copyright (c) 2023 Nomadic Labs. *) (* *) (*****************************************************************************) @@ -1440,6 +1440,45 @@ let job_docker_authenticated ?(skip_docker_initialization = false) ~name script +(** {2 Caches} *) + +let enable_sccache ?key ?error_log ?idle_timeout ?log + ?(path = "$CI_PROJECT_DIR/_sccache") ?(cache_size = "5G") job = + let key = + Option.value + ~default:("sccache-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) + key + in + job + |> append_variables + ([("SCCACHE_DIR", path); ("SCCACHE_CACHE_SIZE", cache_size)] + @ opt_var "SCCACHE_ERROR_LOG" Fun.id error_log + @ opt_var "SCCACHE_IDLE_TIMEOUT" Fun.id idle_timeout + @ opt_var "SCCACHE_LOG" Fun.id log) + |> append_cache (cache ~key [path]) + (* Starts sccache and sets [RUSTC_WRAPPER] *) + |> append_before_script [". ./scripts/ci/sccache-start.sh"] + |> append_after_script ["./scripts/ci/sccache-stop.sh"] + +let cargo_home = + (* Note: + - We want [CARGO_HOME] to be in a sub-folder of + {!ci_project_dir} to enable GitLab CI caching. + - We want [CARGO_HOME] to be hidden from dune + (thus the dot-prefix). *) + Gitlab_ci.Predefined_vars.(show ci_project_dir) // ".cargo" + +let enable_networked_cargo = append_variables [("CARGO_NET_OFFLINE", "false")] + +let enable_cargo_cache job = + job + |> append_cache + (cache + ~key:("cargo-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) + [cargo_home // "registry/cache"]) + (* Allow Cargo to access the network *) + |> enable_networked_cargo + (** A set of internally and externally built images. Use this module to register images built in the CI of diff --git a/ci/lib_tezos_ci/tezos_ci.mli b/ci/lib_tezos_ci/tezos_ci.mli index 769b92e778b6..1143bef934e5 100644 --- a/ci/lib_tezos_ci/tezos_ci.mli +++ b/ci/lib_tezos_ci/tezos_ci.mli @@ -1,7 +1,7 @@ (*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) -(* Copyright (c) 2023-2024 Nomadic Labs. *) +(* Copyright (c) 2023 Nomadic Labs. *) (* *) (*****************************************************************************) @@ -170,6 +170,51 @@ module Pipeline : sig val describe_pipeline : string -> unit end +(** Add variable enabling sccache. + + This function should be applied to jobs that build rust files and + which has a configured sccache Gitlab CI cache. + + - [key] and [path] configure the key under which the cache is + stored, and the path that will be cached. By default, the [key] + contains the name of the job, thus scoping the cache to all + instances of that job. By default, [path] is the folder + ["$CI_PROJECT_DIR/_sccache"], and this function also sets the + environment dir [SCCACHE_DIR] such that sccache stores its caches + there. + + - [cache_size] sets the environment variable [SCCACHE_CACHE_SIZE] + that configures the maximum size of the cache. + + - [error_log], [idle_timeout] and [log] sets the environment + variables [SCCACHE_ERROR_LOG], [SCCACHE_IDLE_TIMEOUT] and + [SCCACHE_LOG] respectively. See the sccache documentation for more + information on these variables. *) +val enable_sccache : + ?key:string -> + ?error_log:string -> + ?idle_timeout:string -> + ?log:string -> + ?path:string -> + ?cache_size:string -> + tezos_job -> + tezos_job + +(** Allow cargo to access the network by setting [CARGO_NET_OFFLINE=false]. + + This function should only be applied to jobs that have a GitLab CI + cache for [CARGO_HOME], as enabled through [enable_cache_cargo] (that + function calls this function, so there is no need to apply both). + Exceptions can be made for jobs that must have CARGO_HOME set to + something different than {!cargo_home}. *) +val enable_networked_cargo : tezos_job -> tezos_job + +(** Adds a GitLab CI cache for the CARGO_HOME folder. + + More precisely, we only cache the non-SCM dependencies in the + sub-directory [registry/cache]. *) +val enable_cargo_cache : tezos_job -> tezos_job + (** A facility for registering images for [image:] keywords. Images can be registered in two manners: -- GitLab From 02d0d35a2a2b96dd351f4c99777d2de41f4c99b0 Mon Sep 17 00:00:00 2001 From: Killian Delarue Date: Tue, 15 Apr 2025 11:17:14 +0200 Subject: [PATCH 2/4] Teztale, CI: Rename [teztale.ml] to [common.ml] --- ci/bin/code_verification.ml | 4 ++-- ci/bin/release_tag.ml | 4 ++-- teztale/ci/{teztale.ml => common.ml} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename teztale/ci/{teztale.ml => common.ml} (100%) diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index 445b06018dba..59961f1a3405 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -846,9 +846,9 @@ let jobs pipeline_type = () in let job_build_teztale ~arch = - Teztale.job_build + Teztale.Common.job_build ~arch - ~rules:(make_rules ~manual:Yes ~changes:Teztale.changeset ()) + ~rules:(make_rules ~manual:Yes ~changes:Teztale.Common.changeset ()) () |> enable_cargo_cache |> enable_sccache in diff --git a/ci/bin/release_tag.ml b/ci/bin/release_tag.ml index 2c0095a001f4..f8ae910908d9 100644 --- a/ci/bin/release_tag.ml +++ b/ci/bin/release_tag.ml @@ -53,8 +53,8 @@ let monitoring_child_pipeline = job_datadog_pipeline_trace; Grafazos_ci.Common.job_build_grafazos (); job_build_layer1_profiling ~expire_in:Never (); - Teztale.job_build ~expire_in:Never ~arch:Arm64 (); - Teztale.job_build ~expire_in:Never ~arch:Amd64 (); + Teztale.Common.job_build ~expire_in:Never ~arch:Arm64 (); + Teztale.Common.job_build ~expire_in:Never ~arch:Amd64 (); ] let job_release_page ~test ?dependencies () = diff --git a/teztale/ci/teztale.ml b/teztale/ci/common.ml similarity index 100% rename from teztale/ci/teztale.ml rename to teztale/ci/common.ml -- GitLab From 2a078e0db2e54e863ef60d5a00d022a77ebff785 Mon Sep 17 00:00:00 2001 From: Killian Delarue Date: Tue, 15 Apr 2025 11:07:59 +0200 Subject: [PATCH 3/4] Teztale: Introduce [teztale/ci/release.ml] --- .gitlab/ci/pipelines/octez_monitoring.yml | 28 ++++++++++++++++++++++ ci/bin/code_verification.ml | 1 - teztale/ci/common.ml | 1 + teztale/ci/release.ml | 29 +++++++++++++++++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 teztale/ci/release.ml diff --git a/.gitlab/ci/pipelines/octez_monitoring.yml b/.gitlab/ci/pipelines/octez_monitoring.yml index 4fc3dfd608af..66e687b8d4ca 100644 --- a/.gitlab/ci/pipelines/octez_monitoring.yml +++ b/.gitlab/ci/pipelines/octez_monitoring.yml @@ -168,18 +168,32 @@ teztale.build:static-arm64: dependencies: - oc.docker:ci:arm64 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/datadog_send_job_info.sh - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh - eval $(opam env) + - . ./scripts/ci/sccache-start.sh script: - make teztale after_script: - mkdir -p ./teztale-binaries/arm64 - mv octez-teztale-* ./teztale-binaries/arm64/ + - ./scripts/ci/sccache-stop.sh variables: PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G artifacts: name: teztale-binaries expire_in: never @@ -195,18 +209,32 @@ teztale.build:static-x86_64: 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/datadog_send_job_info.sh - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh - eval $(opam env) + - . ./scripts/ci/sccache-start.sh script: - make teztale after_script: - mkdir -p ./teztale-binaries/x86_64 - mv octez-teztale-* ./teztale-binaries/x86_64/ + - ./scripts/ci/sccache-stop.sh variables: PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G artifacts: name: teztale-binaries expire_in: never diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index 59961f1a3405..7e990fa97e0a 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -850,7 +850,6 @@ let jobs pipeline_type = ~arch ~rules:(make_rules ~manual:Yes ~changes:Teztale.Common.changeset ()) () - |> enable_cargo_cache |> enable_sccache in [ job_build_arm64_release; diff --git a/teztale/ci/common.ml b/teztale/ci/common.ml index d11b11f8011c..0f9b092d8ff0 100644 --- a/teztale/ci/common.ml +++ b/teztale/ci/common.ml @@ -42,3 +42,4 @@ let job_build ?rules ?(expire_in = Gitlab_ci.Types.(Duration (Days 1))) ~arch () "mv octez-teztale-* ./teztale-binaries/" ^ arch_string ^ "/"; ] ["make teztale"] + |> enable_cargo_cache |> enable_sccache diff --git a/teztale/ci/release.ml b/teztale/ci/release.ml new file mode 100644 index 000000000000..feb09f7bc69a --- /dev/null +++ b/teztale/ci/release.ml @@ -0,0 +1,29 @@ +(*****************************************************************************) +(* *) +(* SPDX-License-Identifier: MIT *) +(* Copyright (c) 2025 Nomadic Labs. *) +(* *) +(*****************************************************************************) + +open Tezos_ci + +let job_datadog_pipeline_trace : tezos_job = + job + ~__POS__ + ~allow_failure:Yes + ~name:"datadog_pipeline_trace" + ~image:Images.datadog_ci + ~before_script:[". ./scripts/ci/datadog_send_job_info.sh"] + ~stage:Stages.start + [ + "CI_MERGE_REQUEST_IID=${CI_MERGE_REQUEST_IID:-none}"; + "DATADOG_SITE=datadoghq.eu datadog-ci tag --level pipeline --tags \ + pipeline_type:$PIPELINE_TYPE --tags mr_number:$CI_MERGE_REQUEST_IID"; + ] + +let jobs ~test () = + (if test then [] else [job_datadog_pipeline_trace]) + @ [ + Common.job_build ~expire_in:Never ~arch:Amd64 (); + Common.job_build ~expire_in:Never ~arch:Arm64 (); + ] -- GitLab From 5a5764ceccaaa337c4d14eecd82d94604f0a3c24 Mon Sep 17 00:00:00 2001 From: Killian Delarue Date: Tue, 15 Apr 2025 11:08:24 +0200 Subject: [PATCH 4/4] CI: Register Teztale release pipeline --- .gitlab-ci.yml | 18 ++- .../ci/pipelines/teztale_release_tag_test.yml | 134 ++++++++++++++++++ ci/bin/main.ml | 16 ++- 3 files changed, 163 insertions(+), 5 deletions(-) create mode 100644 .gitlab/ci/pipelines/teztale_release_tag_test.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3eb4380123b..4a46059ef7ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,6 +56,11 @@ workflow: variables: PIPELINE_TYPE: grafazos_release_tag_test when: always + - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG + =~ /^teztale-v\d+\.\d+$/ + variables: + PIPELINE_TYPE: teztale_release_tag_test + when: always - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ variables: PIPELINE_TYPE: octez_evm_node_release_tag @@ -63,14 +68,14 @@ workflow: - if: $CI_PROJECT_NAMESPACE == "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ variables: PIPELINE_TYPE: non_release_tag when: always - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ variables: PIPELINE_TYPE: non_release_tag_test when: always @@ -198,6 +203,11 @@ include: - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^grafazos-v\d+\.\d+$/ when: always +- local: .gitlab/ci/pipelines/teztale_release_tag_test.yml + rules: + - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG + =~ /^teztale-v\d+\.\d+$/ + when: always - local: .gitlab/ci/pipelines/octez_evm_node_release_tag.yml rules: - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ @@ -207,14 +217,14 @@ include: - if: $CI_PROJECT_NAMESPACE == "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ when: always - local: .gitlab/ci/pipelines/non_release_tag_test.yml rules: - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ when: always - local: .gitlab/ci/pipelines/schedule_extended_test.yml rules: diff --git a/.gitlab/ci/pipelines/teztale_release_tag_test.yml b/.gitlab/ci/pipelines/teztale_release_tag_test.yml new file mode 100644 index 000000000000..463f8cea993b --- /dev/null +++ b/.gitlab/ci/pipelines/teztale_release_tag_test.yml @@ -0,0 +1,134 @@ +# This file was automatically generated, do not edit. +# Edit file ci/bin/main.ml instead. + +stages: +- images +- build + +oc.docker:ci:amd64: + image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 + stage: images + tags: + - gcp + dependencies: [] + timeout: 90 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + script: + - ./images/ci_create_ci_images.sh + services: + - docker:${DOCKER_VERSION}-dind + variables: + DOCKER_VERSION: 24.0.7 + CI_DOCKER_HUB: "false" + ARCH: amd64 + artifacts: + reports: + dotenv: ci_image_tag.env + +oc.docker:ci:arm64: + image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 + stage: images + tags: + - gcp_arm64 + dependencies: [] + timeout: 90 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + script: + - ./images/ci_create_ci_images.sh + services: + - docker:${DOCKER_VERSION}-dind + variables: + DOCKER_VERSION: 24.0.7 + CI_DOCKER_HUB: "false" + ARCH: arm64 + artifacts: + reports: + dotenv: ci_image_tag.env + retry: + max: 1 + when: + - runner_system_failure + +teztale.build:static-x86_64: + 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/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make teztale + after_script: + - mkdir -p ./teztale-binaries/x86_64 + - mv octez-teztale-* ./teztale-binaries/x86_64/ + - ./scripts/ci/sccache-stop.sh + variables: + PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + artifacts: + name: teztale-binaries + expire_in: never + paths: + - teztale-binaries/x86_64/octez-teztale-* + when: on_success + +teztale.build:static-arm64: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp_arm64 + dependencies: + - oc.docker:ci:arm64 + 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/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make teztale + after_script: + - mkdir -p ./teztale-binaries/arm64 + - mv octez-teztale-* ./teztale-binaries/arm64/ + - ./scripts/ci/sccache-stop.sh + variables: + PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + artifacts: + name: teztale-binaries + expire_in: never + paths: + - teztale-binaries/arm64/octez-teztale-* + when: on_success diff --git a/ci/bin/main.ml b/ci/bin/main.ml index 20987e8183b2..0f0f247d477c 100644 --- a/ci/bin/main.ml +++ b/ci/bin/main.ml @@ -148,6 +148,8 @@ let () = in (* Matches Grafazos release tags, e.g. [grafazos-v1.2]. *) let grafazos_release_tag_re = "/^grafazos-v\\d+\\.\\d+$/" in + (* Matches Teztale release tags, e.g. [teztale-v1.2]. *) + let teztale_release_tag_re = "/^teztale-v\\d+\\.\\d+$/" in let open Rules in let open Pipeline in (* Matches either Octez release tags or Octez beta release tags, @@ -162,7 +164,8 @@ let () = Predefined_vars.ci_commit_tag != null && (not has_any_octez_release_tag) && (not (has_tag_match octez_evm_node_release_tag_re)) - && not (has_tag_match grafazos_release_tag_re)) + && (not (has_tag_match grafazos_release_tag_re)) + && not (has_tag_match teztale_release_tag_re)) in let release_description = "\n\n\ @@ -238,6 +241,17 @@ let () = intended, without publishing any release. Developers or release \ managers can create this pipeline by pushing a tag to a fork of \ 'tezos/tezos', e.g. to the 'nomadic-labs/tezos' project." ; + (* TODO: We should be able to register this pipeline in [teztale/ci]. *) + register + "teztale_release_tag_test" + If.(not_on_tezos_namespace && push && has_tag_match teztale_release_tag_re) + ~jobs:(Teztale.Release.jobs ~test:true ()) + ~description: + "Test release pipeline for Teztale.\n\n\ + This pipeline checks that 'teztale_release_tag' pipelines work as \ + intended, without publishing any release. Developers or release \ + managers can create this pipeline by pushing a tag to a fork of \ + 'tezos/tezos', e.g. to the 'nomadic-labs/tezos' project." ; register "octez_evm_node_release_tag" If.(push && has_tag_match octez_evm_node_release_tag_re) -- GitLab