From e866fc86d3c3086d8f4fd2a072e0435c4a5fb018 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 22 Apr 2025 18:39:19 +0200 Subject: [PATCH 01/35] Feat: memory_monitor.sh and minimal pipeline to run tezt --- .gitlab/ci/pipelines/before_merging.yml | 4597 +---------------------- tezt_analysis/memory_tracker.sh | 52 + tezt_analysis/run_tezt.sh | 22 + tezt_analysis/run_tezt_sequential.sh | 44 + 4 files changed, 308 insertions(+), 4407 deletions(-) create mode 100755 tezt_analysis/memory_tracker.sh create mode 100755 tezt_analysis/run_tezt.sh create mode 100755 tezt_analysis/run_tezt_sequential.sh diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 4aed0eca2a1f..f3ab125f4e3b 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -11,6 +11,7 @@ stages: - doc - manual +# Keep oc.docker:ci:amd64: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 stage: images @@ -31,45 +32,7 @@ oc.docker:ci:amd64: reports: dotenv: ci_image_tag.env -oc.docker:client-libs-dependencies: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: images - tags: - - gcp - dependencies: [] - timeout: 60 minutes - before_script: [] - script: - - ./scripts/ci/docker_client_libs_dependencies_build.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - CI_DOCKER_HUB: "false" - artifacts: - reports: - dotenv: client_libs_dependencies_image_tag.env - -oc.docker:jsonnet:amd64: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: images - tags: - - gcp - dependencies: [] - timeout: 60 minutes - before_script: - - ./scripts/ci/docker_initialize.sh - script: - - ./scripts/ci/docker_jsonnet_build.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - CI_DOCKER_HUB: "false" - artifacts: - reports: - dotenv: jsonnet_image_tag.env - +# Keep oc.docker:rust-toolchain:amd64: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 stage: images @@ -89,50 +52,7 @@ oc.docker:rust-toolchain:amd64: reports: dotenv: rust_toolchain_image_tag.env -oc.docker:rust-sdk-bindings:amd64: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: images - tags: - - gcp - dependencies: [] - timeout: 60 minutes - before_script: - - ./scripts/ci/docker_initialize.sh - script: - - ./scripts/ci/docker_rust_sdk_bindings_build.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - CI_DOCKER_HUB: "false" - artifacts: - reports: - dotenv: rust_sdk_bindings_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: [] - 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 - +# Keep trigger: image: datadog/ci:v2.44.0 stage: start @@ -154,261 +74,52 @@ trigger: - DATADOG_SITE=datadoghq.eu datadog-ci tag --level pipeline --tags pipeline_type:$PIPELINE_TYPE --tags mr_number:$CI_MERGE_REQUEST_IID -sanity_ci: - image: ${ci_image_name}/build:${ci_image_tag} - stage: sanity - tags: - - gcp - needs: - - oc.docker:ci:amd64 - - trigger - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - ./scripts/ci/take_ownership.sh - - eval $(opam env) - script: - - make --silent -C manifest check - - make --silent -C ci check - -docker:hadolint: - image: hadolint/hadolint:2.12.0-alpine - stage: sanity - tags: - - gcp - rules: - - changes: - - Dockerfile - - build.Dockerfile - when: on_success - needs: - - trigger - dependencies: [] - timeout: 60 minutes - script: - - hadolint build.Dockerfile - - hadolint Dockerfile -oc.ocaml_fmt: +# Keep +oc.build_x86_64-released: image: ${ci_image_name}/build:${ci_image_tag} - stage: sanity - tags: - - gcp - rules: - - changes: - - '**/*.ml' - - '**/*.mli' - - '**/.ocamlformat' - - .gitlab-ci.yml - - .gitlab/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - trigger - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - cache: - key: dune_cache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull-push - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - script: - - scripts/lint.sh --check-ocamlformat - - dune build --profile=dev @fmt - after_script: - - eval $(opam env) - - dune cache trim --size=5GB - variables: - DUNE_CACHE: enabled - DUNE_CACHE_STORAGE_MODE: hardlink - DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache - -oc.semgrep: - image: returntocorp/semgrep-agent:sha-c6cd7cf - stage: sanity - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - devtools/**/* - - scripts/semgrep/**/* - - src/**/* - - tezt/**/* - when: on_success - needs: - - trigger - dependencies: [] - timeout: 60 minutes - script: - - echo "OCaml code linting. For information on how to reproduce locally, check out - scripts/semgrep/README.md" - - sh ./scripts/semgrep/lint-all-ocaml-sources.sh - -oc.misc_checks: - image: ${ci_image_name}/test:${ci_image_tag} - stage: sanity + stage: build tags: - - gcp + - gcp_high_cpu rules: - changes: - .gitlab-ci.yml - .gitlab/**/* + - CHANGES.rst + - LICENSES/**/* + - Makefile + - brassaia-eio/**/* + - brassaia/**/* - client-libs/**/* - - contrib/**/* - - devtools/**/* + - cohttp/**/* + - data-encoding/**/* - docs/**/* + - dune + - dune-project + - dune-workspace - etherlink/**/* + - irmin/**/* + - michelson_test_scripts/**/* + - opam/**/* + - opentelemetry/**/* + - prometheus/**/* + - resto/**/* + - rust-toolchain + - script-inputs/**/* + - script-inputs/**/*/ - scripts/**/* + - scripts/**/*/ + - sdk/**/* - src/**/* - tezt/**/* + - tzt_reference_test_suite/**/* + - vendors/**/* when: on_success needs: - - oc.docker:ci:amd64 - - trigger - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . $HOME/.venv/bin/activate - script: - - ./scripts/ci/lint_misc_check.sh - - scripts/check_wasm_pvm_regressions.sh check - - etherlink/scripts/check_evm_store_migrations.sh check - - ./scripts/check_rollup_node_sql_migrations.sh check - - ./src/bin_dal_node/scripts/check_dal_store_migrations.sh check - - ./scripts/ci/lint_check_licenses.sh - -check_jsonnet: - image: ${jsonnet_image_name}:${jsonnet_image_tag} - stage: sanity - tags: - - gcp - rules: - - changes: - - '**/*.jsonnet' - when: on_success - needs: - - oc.docker:jsonnet:amd64 - - trigger - dependencies: - - oc.docker:jsonnet:amd64 - timeout: 60 minutes - before_script: - - cd grafazos/ - - jb install github.com/grafana/grafonnet/gen/grafonnet-v11.1.0@1ce5aec - - cd ../ - script: - - scripts/lint.sh --check-jsonnet-format - - scripts/lint.sh --check-jsonnet-lint - -check_rust_fmt: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: sanity - tags: - - gcp - rules: - - changes: - - '**/*.rs' - - .gitlab-ci.yml - - .gitlab/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - trigger - dependencies: - - oc.docker:rust-toolchain:amd64 - timeout: 60 minutes - script: - - scripts/check-format-rust.sh - -documentation:rst-check: - image: ${ci_image_name}/test:${ci_image_tag} - stage: sanity - tags: - - gcp - rules: - - changes: - - '**/*.rst' - - .gitlab-ci.yml - - .gitlab/**/* - when: on_success - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - . $HOME/.venv/bin/activate - script: - - make --silent -C docs sphinx-check - -nix: - image: nixos/nix:2.22.1 - stage: sanity - tags: - - gcp - rules: - - changes: - - '**/*.nix' - - flake.lock - - scripts/version.sh - when: on_success - needs: - - trigger - dependencies: [] - timeout: 60 minutes - cache: - key: nix-store - paths: - - /nix/store - policy: pull-push - before_script: - - mkdir -p ~/.config/nix - - echo 'extra-experimental-features = flakes nix-command' > ~/.config/nix/nix.conf - script: - - nix run .#ci-check-version-sh-lock - artifacts: - paths: - - flake.lock - when: on_failure - -commit_titles: - image: ${ci_image_name}/prebuild:${ci_image_tag} - stage: sanity - tags: - - gcp - needs: - - oc.docker:ci:amd64 - - trigger + - job: oc.docker:ci:amd64 + - job: trigger dependencies: - oc.docker:ci:amd64 - allow_failure: - exit_codes: 65 - timeout: 60 minutes - script: - - ./scripts/ci/check_commit_messages.sh || exit $? - -oc.build_arm64-released: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_arm64 - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--arm64(?:$|,)/ - when: on_success - - when: manual - allow_failure: true - dependencies: - - oc.docker:ci:arm64 timeout: 60 minutes cache: - key: cargo-$CI_JOB_NAME_SLUG @@ -433,7 +144,7 @@ oc.build_arm64-released: after_script: - ./scripts/ci/sccache-stop.sh variables: - ARCH: arm64 + ARCH: x86_64 EXECUTABLE_FILES: script-inputs/released-executables CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache @@ -441,9 +152,10 @@ oc.build_arm64-released: OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime + COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG - expire_in: 1 day + expire_in: 3 days paths: - octez-* - octez-teztale-* @@ -453,71 +165,18 @@ oc.build_arm64-released: - _build/default/contrib/octez_injector_server/octez_injector_server.exe - etherlink-governance-observer when: on_success + retry: + max: 2 + when: + - stuck_or_timeout_failure + - runner_system_failure -oc.build_arm64-exp-dev-extra: - image: ${ci_image_name}/build:${ci_image_tag} +# Keep +oc.build_dsn_node: + image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} stage: build tags: - - gcp_arm64 - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--arm64(?:$|,)/ - when: on_success - - when: manual - allow_failure: true - 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 - - key: rust-targets-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_target - policy: pull-push - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - ./scripts/ci/build_full_unreleased.sh - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - ARCH: arm64 - EXECUTABLE_FILES: script-inputs/experimental-executables script-inputs/dev-executables - BUILD_EXTRA: src/bin_tps_evaluation/main_tps_evaluation.exe src/bin_octogram/octogram_main.exe - tezt/tests/main.exe - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps - OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps - OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime - artifacts: - name: build-$ARCH-$CI_COMMIT_REF_SLUG - expire_in: 1 day - paths: - - octez-* - - octez-teztale-* - - src/proto_*/parameters/*.json - - _build/default/src/lib_protocol_compiler/bin/main_native.exe - - _build/default/tezt/tests/main.exe - - _build/default/contrib/octez_injector_server/octez_injector_server.exe - - etherlink-governance-observer - when: on_success - -oc.build:static-x86_64-linux-binaries: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu + - gcp rules: - changes: - .gitlab-ci.yml @@ -527,13 +186,18 @@ oc.build:static-x86_64-linux-binaries: - Makefile - brassaia-eio/**/* - brassaia/**/* + - client-libs/**/* - cohttp/**/* - data-encoding/**/* + - docs/**/* - dune - dune-project - dune-workspace + - etherlink.mk - etherlink/**/* + - images/**/* - irmin/**/* + - kernels.mk - michelson_test_scripts/**/* - opam/**/* - opentelemetry/**/* @@ -541,82 +205,53 @@ oc.build:static-x86_64-linux-binaries: - resto/**/* - rust-toolchain - script-inputs/**/* + - script-inputs/**/*/ - scripts/**/* + - scripts/**/*/ + - scripts/ci/**/* - sdk/**/* - src/**/* - tezt/**/* - tzt_reference_test_suite/**/* + - vendors/**/* 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 + - oc.docker:rust-toolchain: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: rust-targets-$CI_JOB_NAME_SLUG + - key: cargo-$CI_JOB_NAME_SLUG paths: - - $CI_PROJECT_DIR/_target + - $CI_PROJECT_DIR/.cargo/registry/cache policy: pull-push before_script: - - ./scripts/ci/take_ownership.sh - - eval $(opam env) - . ./scripts/ci/sccache-start.sh script: - - ./scripts/ci/build_static_binaries.sh + - make -f etherlink.mk octez-dsn-node after_script: - ./scripts/ci/sccache-stop.sh variables: - ARCH: x86_64 - EXECUTABLE_FILES: script-inputs/octez-released-executables script-inputs/octez-experimental-executables - CARGO_NET_OFFLINE: "false" + CC: clang + NATIVE_TARGET: x86_64-unknown-linux-musl SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 2G - OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps - OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps - OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime + SCCACHE_CACHE_SIZE: 5G + CARGO_NET_OFFLINE: "false" artifacts: + name: build-dsn-node-$CI_COMMIT_REF_SLUG + expire_in: 3 days paths: - - octez-binaries/$ARCH/* - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure + - octez-dsn-node + when: on_success -oc.build:static-arm64-linux-binaries: +# Keep +oc.tezt:fetch-records: image: ${ci_image_name}/build:${ci_image_tag} stage: build tags: - - gcp_arm64 + - gcp rules: - changes: - .gitlab-ci.yml @@ -645,73 +280,34 @@ oc.build:static-arm64-linux-binaries: - src/**/* - tezt/**/* - tzt_reference_test_suite/**/* - when: manual - allow_failure: true - needs: - - job: oc.docker:ci:arm64 - - 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 + when: on_success dependencies: - - oc.docker:ci:arm64 + - oc.docker:ci:amd64 + allow_failure: true 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: rust-targets-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_target - policy: pull-push before_script: - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh - eval $(opam env) - - . ./scripts/ci/sccache-start.sh script: - - ./scripts/ci/build_static_binaries.sh + - dune exec scripts/ci/update_records/update.exe -- --log-file tezt-fetch-records.log + --from last-successful-schedule-extended-test --info after_script: - - ./scripts/ci/sccache-stop.sh - variables: - ARCH: arm64 - EXECUTABLE_FILES: script-inputs/octez-released-executables script-inputs/octez-experimental-executables - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 2G - OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps - OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps - OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime + - ./scripts/ci/filter_corrupted_records.sh artifacts: + expire_in: 3 days paths: - - octez-binaries/$ARCH/* + - tezt-fetch-records.log + - tezt/records/*.json + - tezt/records/*.json.broken + when: always -oc.build_x86_64-released: - image: ${ci_image_name}/build:${ci_image_tag} +# Keep +select_tezts: + image: ${ci_image_name}/prebuild:${ci_image_tag} stage: build tags: - - gcp_high_cpu + - gcp rules: - changes: - .gitlab-ci.yml @@ -721,10 +317,8 @@ oc.build_x86_64-released: - Makefile - brassaia-eio/**/* - brassaia/**/* - - client-libs/**/* - cohttp/**/* - data-encoding/**/* - - docs/**/* - dune - dune-project - dune-workspace @@ -737,90 +331,27 @@ oc.build_x86_64-released: - resto/**/* - rust-toolchain - script-inputs/**/* - - script-inputs/**/*/ - scripts/**/* - - scripts/**/*/ - sdk/**/* - src/**/* - tezt/**/* - tzt_reference_test_suite/**/* - - vendors/**/* 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 + allow_failure: + exit_codes: 17 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: rust-targets-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_target - policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - eval $(opam env) - - . ./scripts/ci/sccache-start.sh script: - - ./scripts/ci/build_full_unreleased.sh - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - ARCH: x86_64 - EXECUTABLE_FILES: script-inputs/released-executables - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps - OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps - OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime - COVERAGE_OPTIONS: --instrument-with bisect_ppx + - scripts/ci/select_tezts.sh || exit $? artifacts: - name: build-$ARCH-$CI_COMMIT_REF_SLUG - expire_in: 1 day + expire_in: 3 days paths: - - octez-* - - octez-teztale-* - - src/proto_*/parameters/*.json - - _build/default/src/lib_protocol_compiler/bin/main_native.exe - - _build/default/tezt/tests/main.exe - - _build/default/contrib/octez_injector_server/octez_injector_server.exe - - etherlink-governance-observer - when: on_success - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure + - selected_tezts.tsl + when: always oc.build_x86_64-exp-dev-extra: image: ${ci_image_name}/build:${ci_image_tag} @@ -864,26 +395,6 @@ oc.build_x86_64-exp-dev-extra: 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 @@ -932,7 +443,7 @@ oc.build_x86_64-exp-dev-extra: DUNE_CACHE_ROOT: $CI_PROJECT_DIR/_dune_cache artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG - expire_in: 1 day + expire_in: 3 days paths: - octez-* - octez-teztale-* @@ -948,8 +459,8 @@ oc.build_x86_64-exp-dev-extra: - stuck_or_timeout_failure - runner_system_failure -wasm-runtime-check: - image: ${ci_image_name}/build:${ci_image_tag} +oc.build_kernels: + image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} stage: build tags: - gcp @@ -957,3866 +468,138 @@ wasm-runtime-check: - changes: - .gitlab-ci.yml - .gitlab/**/* - - src/lib_wasm_runtime/**/*.rs + - CHANGES.rst + - LICENSES/**/* + - Makefile + - brassaia-eio/**/* + - brassaia/**/* + - client-libs/**/* + - cohttp/**/* + - data-encoding/**/* + - docs/**/* + - dune + - dune-project + - dune-workspace + - etherlink.mk + - etherlink/**/* + - images/**/* + - irmin/**/* + - kernels.mk + - michelson_test_scripts/**/* + - opam/**/* + - opentelemetry/**/* + - prometheus/**/* + - resto/**/* + - rust-toolchain + - script-inputs/**/* + - script-inputs/**/*/ + - scripts/**/* + - scripts/**/*/ + - scripts/ci/**/* + - sdk/**/* + - src/**/* + - tezt/**/* + - tzt_reference_test_suite/**/* + - vendors/**/* 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 + - oc.docker:rust-toolchain:amd64 timeout: 60 minutes cache: - - key: cargo-$CI_JOB_NAME_SLUG + - key: kernels-sccache paths: - - $CI_PROJECT_DIR/.cargo/registry/cache + - $CI_PROJECT_DIR/_sccache policy: pull-push - - key: sccache-$CI_JOB_NAME_SLUG + - key: cargo-$CI_JOB_NAME_SLUG paths: - - $CI_PROJECT_DIR/_sccache + - $CI_PROJECT_DIR/.cargo/registry/cache policy: pull-push before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - . ./scripts/ci/sccache-start.sh script: - - etherlink/lib_wasm_runtime/lint.sh + - make -f kernels.mk build + - make -f etherlink.mk evm_kernel.wasm + - make -C src/riscv riscv-dummy.elf after_script: - ./scripts/ci/sccache-stop.sh variables: - CARGO_NET_OFFLINE: "false" + CC: clang + NATIVE_TARGET: x86_64-unknown-linux-musl 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/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 - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - client-libs/**/* - - cohttp/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink.mk - - etherlink/**/* - - images/**/* - - irmin/**/* - - kernels.mk - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - script-inputs/**/*/ - - scripts/**/* - - scripts/**/*/ - - scripts/ci/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - - vendors/**/* - when: on_success - dependencies: - - oc.docker:rust-toolchain:amd64 - timeout: 60 minutes - cache: - - key: kernels-sccache - paths: - - $CI_PROJECT_DIR/_sccache - policy: pull-push - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - before_script: - - . ./scripts/ci/sccache-start.sh - script: - - make -f kernels.mk build - - make -f etherlink.mk evm_kernel.wasm - - make -C src/riscv riscv-dummy.elf - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - CARGO_NET_OFFLINE: "false" - artifacts: - name: build-kernels-$CI_COMMIT_REF_SLUG - expire_in: 1 day - paths: - - evm_kernel.wasm - - smart-rollup-installer - - sequenced_kernel.wasm - - tx_kernel.wasm - - tx_kernel_dal.wasm - - dal_echo_kernel.wasm - - src/riscv/riscv-dummy.elf - when: on_success - -oc.build_dsn_node: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: build - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - client-libs/**/* - - cohttp/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink.mk - - etherlink/**/* - - images/**/* - - irmin/**/* - - kernels.mk - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - script-inputs/**/*/ - - scripts/**/* - - scripts/**/*/ - - scripts/ci/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - - vendors/**/* - when: on_success - dependencies: - - oc.docker:rust-toolchain:amd64 - timeout: 60 minutes - cache: - - key: sccache-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_sccache - policy: pull-push - - key: cargo-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/.cargo/registry/cache - policy: pull-push - before_script: - - . ./scripts/ci/sccache-start.sh - script: - - make -f etherlink.mk octez-dsn-node - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - CARGO_NET_OFFLINE: "false" - artifacts: - name: build-dsn-node-$CI_COMMIT_REF_SLUG - expire_in: 1 day - paths: - - octez-dsn-node - when: on_success - -oc.tezt:fetch-records: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - dependencies: - - oc.docker:ci:amd64 - allow_failure: true - timeout: 60 minutes - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - script: - - dune exec scripts/ci/update_records/update.exe -- --log-file tezt-fetch-records.log - --from last-successful-schedule-extended-test --info - after_script: - - ./scripts/ci/filter_corrupted_records.sh - artifacts: - expire_in: 4 hours - paths: - - tezt-fetch-records.log - - tezt/records/*.json - - tezt/records/*.json.broken - when: always - -build_octez_source: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu - rules: - - when: manual - allow_failure: 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 - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - ./scripts/ci/restrict_export_to_octez_source.sh - - ./scripts/ci/create_octez_tarball.sh octez - - mv octez.tar.bz2 ../ - - cd ../ - - tar xf octez.tar.bz2 - - cd octez/ - - eval $(opam env) - - make octez - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -build_grafazos_dashboards: - image: ${jsonnet_image_name}:${jsonnet_image_tag} - stage: build - tags: - - gcp - rules: - - changes: - - grafazos/**/* - when: always - - when: manual - allow_failure: true - dependencies: - - oc.docker:jsonnet:amd64 - timeout: 60 minutes - before_script: - - cd grafazos/ - - jb install github.com/grafana/grafonnet/gen/grafonnet-v11.1.0@1ce5aec - script: - - make - artifacts: - name: grafazos-dashboards - expire_in: 1 day - paths: - - grafazos/output/**/*.json - when: on_success - -teztale.build:static-x86_64: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp - rules: - - changes: - - teztale/**/* - when: on_success - - when: manual - allow_failure: 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 - before_script: - - ./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: 1 day - 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 - rules: - - changes: - - teztale/**/* - when: on_success - - when: manual - allow_failure: true - 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/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: 1 day - paths: - - teztale-binaries/arm64/octez-teztale-* - when: on_success - -etherlink.build:static-x86_64: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - Makefile - - etherlink/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - when: manual - allow_failure: 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: rust-targets-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_target - policy: pull-push - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make evm-node-static - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 2G - OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps - OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps - OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime - artifacts: - name: evm-binaries - paths: - - octez-evm-* - - etherlink-* - when: on_success - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - -etherlink.build:static-arm64: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_arm64 - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - Makefile - - etherlink/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - when: manual - allow_failure: true - 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 - - key: rust-targets-$CI_JOB_NAME_SLUG - paths: - - $CI_PROJECT_DIR/_target - policy: pull-push - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make evm-node-static - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 2G - OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rust_deps - OCTEZ_RUSTZCASH_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target/rustzcash_deps - OCTEZ_ETHERLINK_WASM_RUNTIME_TARGET_DIR: $CI_PROJECT_DIR/_target/etherlink_wasm_runtime - artifacts: - name: evm-binaries - paths: - - octez-evm-* - - etherlink-* - when: on_success - -build-layer1-profiling: - image: ${ci_image_name}/build:${ci_image_tag} - stage: build - tags: - - gcp_very_high_cpu - 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: - - scripts/slim-mode.sh on - - make build OCTEZ_EXECUTABLES?=octez-node - - mkdir -p octez-binaries/x86_64/ - - mv octez-node octez-binaries/x86_64/ - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - TEZOS_PPX_PROFILER: profiling - PROFILE: static - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - artifacts: - expire_in: 1 day - paths: - - ./octez-binaries/x86_64/octez-node - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - -select_tezts: - image: ${ci_image_name}/prebuild:${ci_image_tag} - stage: build - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - dependencies: - - oc.docker:ci:amd64 - allow_failure: - exit_codes: 17 - timeout: 60 minutes - before_script: - - ./scripts/ci/take_ownership.sh - - eval $(opam env) - script: - - scripts/ci/select_tezts.sh || exit $? - artifacts: - expire_in: 3 days - paths: - - selected_tezts.tsl - when: always - -trigger:debian_repository_partial_auto: - stage: test - variables: - PIPELINE_TYPE: debian_repository_partial_auto - rules: - - changes: - - debian-deps-build.Dockerfile - - docs/introduction/install-bin-deb.sh - - docs/introduction/upgrade-bin-deb.sh - - manifest/**/*.ml* - - scripts/ci/build-debian-packages.sh - - scripts/ci/build-debian-packages_current.sh - - scripts/ci/build-packages-dependencies.sh - - scripts/ci/create_debian_repo.sh - - scripts/ci/prepare-apt-repo.sh - - scripts/packaging/Release.conf - - scripts/packaging/build-deb-local.sh - - scripts/packaging/octez/debian/* - - scripts/version.sh - when: on_success - needs: - - 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 - trigger: - include: .gitlab/ci/pipelines/debian_repository_partial_auto.yml - strategy: depend - -trigger:rpm_repository_partial_auto: - stage: test - variables: - PIPELINE_TYPE: rpm_repository_partial_auto - rules: - - changes: - - manifest/**/*.ml* - - rpm-deps-build.Dockerfile - - scripts/ci/build-packages-dependencies.sh - - scripts/ci/build-rpm-packages.sh - - scripts/ci/create_rpm_repo.sh - - scripts/ci/prepare-apt-rpm-repo.sh - - scripts/packaging/build-deb-local.sh - - scripts/packaging/octez/rpm/* - - scripts/packaging/tests/rpm/* - - scripts/version.sh - when: on_success - needs: - - 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 - trigger: - include: .gitlab/ci/pipelines/rpm_repository_partial_auto.yml - strategy: depend - -trigger:homebrew_auto: - stage: test - variables: - PIPELINE_TYPE: homebrew_auto - rules: - - changes: - - manifest/**/*.ml* - - scripts/ci/install-gsutil.sh - - scripts/packaging/Formula/* - - scripts/packaging/homebrew_install.sh - - scripts/packaging/homebrew_release.sh - - scripts/packaging/test_homebrew_install.sh - - scripts/version.sh - when: on_success - needs: - - 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 - trigger: - include: .gitlab/ci/pipelines/homebrew_auto.yml - strategy: depend - -kaitai_checks: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - client-libs/*kaitai*/**/* - - images/**/* - - scripts/ci/**/* - - src/**/* - 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 - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make -C ${CI_PROJECT_DIR} check-kaitai-struct-files || (echo 'Octez encodings - and Kaitai files seem to be out of sync. You might need to run `make check-kaitai-struct-files` - and commit the resulting diff.' ; false) - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - artifacts: - expire_in: 1 hour - paths: - - _build/default/client-libs/bin_codec_kaitai/codec.exe - when: on_success - -kaitai_e2e_checks: - image: ${client_libs_dependencies_image_name}:${client_libs_dependencies_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - client-libs/*kaitai*/**/* - - images/**/* - - scripts/ci/**/* - - src/**/* - when: on_success - needs: - - oc.docker:client-libs-dependencies - - kaitai_checks - dependencies: - - oc.docker:client-libs-dependencies - - kaitai_checks - timeout: 60 minutes - before_script: - - . ./scripts/version.sh - - . ./scripts/install_build_deps.js.sh - script: - - ./client-libs/kaitai-struct-files/scripts/kaitai_e2e.sh client-libs/kaitai-struct-files/files - 2>/dev/null - -oc.check_lift_limits_patch: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - src/bin_tps_evaluation/lift_limits.patch - - src/proto_alpha/lib_protocol/main.ml - 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 - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - '[ $(git apply --numstat src/bin_tps_evaluation/lift_limits.patch | cut -f3) = - "src/proto_alpha/lib_protocol/main.ml" ]' - - git apply src/bin_tps_evaluation/lift_limits.patch - - dune build @src/proto_alpha/lib_protocol/check - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -oc.python_check: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - '**/*.py' - - .gitlab-ci.yml - - .gitlab/**/* - - poetry.lock - - pyproject.toml - 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 - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - . $HOME/.venv/bin/activate - script: - - ./scripts/ci/lint_misc_python_check.sh - -oc.integration:compiler-rejections: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - 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/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - dune build @runtest_rejections - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -oc.script:test-gen-genesis: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - 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 - before_script: - - eval $(opam env) - - cd scripts/gen-genesis - script: - - dune build gen_genesis.exe - -oc.script:snapshot_alpha_and_link: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp_very_high_cpu - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - scripts/snapshot_alpha.sh - - scripts/snapshot_alpha_and_link.sh - - scripts/user_activated_upgrade.sh - - src/proto_alpha/**/* - when: on_success - needs: - - job: oc.docker:ci:amd64 - - job: trigger - - job: oc.build_x86_64-released - optional: true - - job: oc.build_x86_64-exp-dev-extra - 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-build-cache-$CI_PIPELINE_ID - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - ./scripts/ci/script:snapshot_alpha_and_link.sh - 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.script:test_octez_release_versions: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - ./scripts/ci/take_ownership.sh - - . ./scripts/version.sh - - eval $(opam env) - script: - - ./scripts/test_octez_release_version.sh - -oc.script:b58_prefix: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - scripts/b58_prefix/b58_prefix.py - - scripts/b58_prefix/test_b58_prefix.py - 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 - before_script: - - . ./scripts/version.sh - - . $HOME/.venv/bin/activate - script: - - poetry run pylint scripts/b58_prefix/b58_prefix.py --disable=missing-docstring - --disable=invalid-name - - poetry run pytest scripts/b58_prefix/test_b58_prefix.py - -oc.test-liquidity-baking-scripts: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - scripts/check-liquidity-baking-scripts.sh - - scripts/ci/test_liquidity_baking_scripts.sh - - src/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - dependencies: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - timeout: 60 minutes - before_script: - - . ./scripts/version.sh - - eval $(opam env) - script: - - ./scripts/ci/test_liquidity_baking_scripts.sh - -oc:scripts:release_script_values: - image: ${ci_image_name}/prebuild:${ci_image_tag} - stage: test - tags: - - gcp - 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 - script: - - scripts/ci/test_release_values.sh - -mir_unit: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - contrib/mir/**/* - - images/**/* - 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 - script: - - cargo test --manifest-path contrib/mir/Cargo.toml - variables: - CARGO_NET_OFFLINE: "false" - -mir_tzt: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - contrib/mir/**/* - - images/**/* - - tzt_reference_test_suite/**/* - 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 - script: - - cargo run --manifest-path contrib/mir/Cargo.toml --bin tzt_runner tzt_reference_test_suite/*.tzt - variables: - CARGO_NET_OFFLINE: "false" - -test_sdk_rust: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - sdk/rust/**/* - when: on_success - needs: - - job: oc.docker:rust-toolchain: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:rust-toolchain: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/sccache-start.sh - script: - - make -C sdk/rust check - - make -C sdk/rust test - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_sdk_bindings: - image: ${rust_sdk_bindings_image_name}:${rust_sdk_bindings_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - contrib/sdk-bindings - - images/**/* - - sdk/rust/**/* - when: on_success - needs: - - job: oc.docker:rust-sdk-bindings: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:rust-sdk-bindings: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: - - . $HOME/.venv/bin/activate - - . ./scripts/ci/sccache-start.sh - script: - - make -C contrib/sdk-bindings check - - make -C contrib/sdk-bindings test - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_kernels: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - kernels.mk - - sdk/rust/**/* - - src/kernel_*/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - oc.build_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -f kernels.mk check - - make -f kernels.mk test - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_etherlink_kernel: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - etherlink.mk - - etherlink/**/*.rs - - images/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - oc.build_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -f etherlink.mk check - - make -f etherlink.mk test - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_etherlink_firehose: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - etherlink/firehose/**/* - - etherlink/tezt/tests/evm_kernel_inputs/erc20tok.* - - images/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - oc.build_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -C etherlink/firehose check - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -audit_riscv_deps: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: sanity - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - - src/riscv/**/* - when: on_success - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -C src/riscv audit - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -check_riscv_kernels: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: build - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - - src/riscv/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - audit_riscv_deps - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -C src/riscv CHECK_FLAGS= EXTRA_FLAGS='--no-default-features --features ci' - check - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_riscv_kernels: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - - src/riscv/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - check_riscv_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -C src/riscv EXTRA_FLAGS='--no-default-features --features ci' test - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_long_riscv_kernels: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - - src/riscv/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - check_riscv_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -C src/riscv EXTRA_FLAGS='--no-default-features --features ci' test-long - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_miri_riscv_kernels: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - images/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - - src/riscv/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - check_riscv_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -C src/riscv EXTRA_FLAGS='--no-default-features --features ci' test-miri - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -test_evm_compatibility: - image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - etherlink.mk - - etherlink/kernel_latest/evm_evaluation/**/* - - etherlink/kernel_latest/evm_execution/**/* - - images/**/* - when: on_success - needs: - - oc.docker:rust-toolchain:amd64 - - oc.build_kernels - dependencies: - - oc.docker:rust-toolchain: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/sccache-start.sh - script: - - make -f etherlink.mk EVM_EVALUATION_FEATURES=disable-file-logs evm-evaluation-assessor - - git clone --depth 1 --branch v14.1@etherlink https://github.com/functori/tests - ethereum_tests - - ./evm-evaluation-assessor --eth-tests ./ethereum_tests/ --resources ./etherlink/kernel_latest/evm_evaluation/resources/ - -c - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CC: clang - NATIVE_TARGET: x86_64-unknown-linux-musl - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - -oc.unit:non-proto-x86_64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - 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-build-cache-$CI_PIPELINE_ID - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make $MAKE_TARGETS - - ./scripts/ci/merge_coverage.sh - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - ARCH: x86_64 - MAKE_TARGETS: test-nonproto-unit - 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 - COVERAGE_OPTIONS: --instrument-with bisect_ppx - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 1 day - paths: - - test_results - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: test_results/*.xml - when: always - retry: 2 - -oc.unit:etherlink-x86_64: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - Makefile - - etherlink/**/* - - sdk/rust/**/* - - src/kernel_sdk/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - 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-build-cache-$CI_PIPELINE_ID - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make $MAKE_TARGETS - - ./scripts/ci/merge_coverage.sh - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - ARCH: x86_64 - MAKE_TARGETS: test-etherlink-unit - 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 - COVERAGE_OPTIONS: --instrument-with bisect_ppx - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 1 day - paths: - - test_results - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: test_results/*.xml - when: always - retry: 2 - -oc.unit:other-x86_64: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp_high_cpu - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - 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-build-cache-$CI_PIPELINE_ID - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make $MAKE_TARGETS - - ./scripts/ci/merge_coverage.sh - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - ARCH: x86_64 - MAKE_TARGETS: test-other-unit - 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 - COVERAGE_OPTIONS: --instrument-with bisect_ppx - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 1 day - paths: - - test_results - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: test_results/*.xml - when: always - retry: 2 - -oc.unit:proto-x86_64: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp_very_high_cpu - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - 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-build-cache-$CI_PIPELINE_ID - paths: - - $CI_PROJECT_DIR/_dune_cache - policy: pull - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make $MAKE_TARGETS - - ./scripts/ci/merge_coverage.sh - after_script: - - ./scripts/ci/sccache-stop.sh - - eval $(opam env) - - dune cache trim --size=5GB - variables: - ARCH: x86_64 - MAKE_TARGETS: test-proto-unit - 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 - COVERAGE_OPTIONS: --instrument-with bisect_ppx - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 1 day - paths: - - test_results - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: test_results/*.xml - when: always - retry: 2 - -oc.unit:non-proto-arm64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp_arm64 - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:arm64 - - oc.build_arm64-released - - oc.build_arm64-exp-dev-extra - 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/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make $MAKE_TARGETS - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - ARCH: arm64 - MAKE_TARGETS: test-nonproto-unit test-webassembly - DISTRIBUTE_TESTS_TO_PARALLELS: "true" - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - artifacts: - name: $CI_JOB_NAME-$CI_COMMIT_SHA-${ARCH} - expire_in: 1 day - paths: - - test_results - reports: - junit: test_results/*.xml - when: always - retry: 2 - parallel: 2 - -oc.unit:webassembly-x86_64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - dependencies: - - oc.docker:ci:amd64 - timeout: 20 minutes - before_script: - - . ./scripts/version.sh - - eval $(opam env) - script: - - make test-webassembly - -oc.unit:protocol_compiles: - image: ${ci_image_name}/build:${ci_image_tag} - stage: test - tags: - - gcp_very_high_cpu - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - 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/version.sh - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - dune build @runtest_compile_protocol - after_script: - - ./scripts/ci/sccache-stop.sh - variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - -de.unit:x86_64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - data-encoding/** - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - eval $(opam env) - script: - - dune runtest data-encoding - -de.unit:arm64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp_arm64 - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - data-encoding/** - when: on_success - needs: - - oc.docker:ci:arm64 - - oc.build_arm64-released - - oc.build_arm64-exp-dev-extra - dependencies: - - oc.docker:ci:arm64 - timeout: 60 minutes - before_script: - - eval $(opam env) - script: - - dune runtest data-encoding - -resto.unit:x86_64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - resto/** - when: on_success - needs: - - oc.docker:ci:amd64 - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - dependencies: - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - eval $(opam env) - script: - - dune runtest resto - -resto.unit:arm64: - image: ${ci_image_name}/test:${ci_image_tag} - stage: test - tags: - - gcp_arm64 - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - resto/** - when: on_success - needs: - - oc.docker:ci:arm64 - - oc.build_arm64-released - - oc.build_arm64-exp-dev-extra - dependencies: - - oc.docker:ci:arm64 - timeout: 60 minutes - before_script: - - eval $(opam env) - script: - - dune runtest resto - -oc.install_opam_noble: - image: ocaml/opam:ubuntu-24.04 - stage: test - tags: - - gcp - rules: - - when: manual - allow_failure: true - needs: - - 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: [] - allow_failure: true - timeout: 2 hours - script: - - ./docs/introduction/install-opam.sh - variables: - OPAMJOBS: "4" - -oc.compile_sources_doc_bookworm: - image: ocaml/opam:debian-12 - stage: test - tags: - - gcp_very_high_cpu - rules: - - changes: - - docs/introduction/compile-sources.sh - when: on_success - - when: manual - allow_failure: true - needs: - - 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: [] - timeout: 60 minutes - script: - - ./docs/introduction/compile-sources.sh ${CI_MERGE_REQUEST_SOURCE_PROJECT_PATH:-tezos/tezos} - ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master} - variables: - CARGO_HOME: /home/opam/.cargo - CARGO_NET_OFFLINE: "false" - retry: - max: 2 - when: - - stuck_or_timeout_failure - - runner_system_failure - -tezt: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - timeout: 40 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - - ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: "" - TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && - /cloud && /flaky - TEZT_RETRY: "1" - TEZT_PARALLEL: "3" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 2 - parallel: 100 - -tezt-memory-3k: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt_memory_3k - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - - ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: -memory_3k - TESTS: memory_3k && /ci_disabled && /memory_4k && /time_sensitive && /slow && - /cloud - TEZT_RETRY: "1" - TEZT_PARALLEL: "1" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 2 - parallel: 12 - -tezt-memory-4k: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt_memory_4k - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - - ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: -memory_4k - TESTS: memory_4k && /ci_disabled && /memory_3k && /time_sensitive && /slow && - /cloud - TEZT_RETRY: "1" - TEZT_PARALLEL: "1" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 2 - parallel: 4 - -tezt-time-sensitive: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - - ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: -time_sensitive - TESTS: time_sensitive && /ci_disabled && /memory_3k && /memory_4k && /slow && - /cloud - TEZT_RETRY: "1" - TEZT_PARALLEL: "1" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 2 - -tezt-slow: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: manual - allow_failure: true - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: -slow - TESTS: slow && /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && - /cloud && not (file = src/proto_019_PtParisA/lib_protocol/test/integration/test_adaptive_issuance_launch.ml) - TEZT_RETRY: "1" - TEZT_PARALLEL: "3" - TEZT_NO_NPX: "true" - artifacts: - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - reports: - junit: $JUNIT - when: always - retry: 2 - parallel: 20 - -tezt-flaky: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: manual - allow_failure: true - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - allow_failure: true - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - - ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: -flaky - TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && - /cloud && flaky - TEZT_RETRY: "3" - TEZT_PARALLEL: "1" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 2 - -tezt:static-binaries: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-exp-dev-extra - - oc.build:static-x86_64-linux-binaries - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-exp-dev-extra - - oc.build:static-x86_64-linux-binaries - - oc.tezt:fetch-records - timeout: 60 minutes - before_script: - - mv octez-binaries/x86_64/octez-* . - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: "" - TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && - /cloud && cli && /flaky - TEZT_RETRY: "1" - TEZT_PARALLEL: "3" - TEZT_NO_NPX: "true" - artifacts: - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - reports: - junit: $JUNIT - when: always - -oc.unified_coverage: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test_coverage - tags: - - gcp - rules: - - if: $GITLAB_USER_LOGIN == "nomadic-margebot" || $CI_MERGE_REQUEST_ASSIGNEES =~ - /nomadic-margebot/ || $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train" - when: never - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - dependencies: - - oc.docker:ci:amd64 - - oc.unit:non-proto-x86_64 - - oc.unit:etherlink-x86_64 - - oc.unit:other-x86_64 - - oc.unit:proto-x86_64 - - tezt - - tezt-memory-3k - - tezt-memory-4k - - tezt-time-sensitive - - tezt-flaky - allow_failure: - exit_codes: 64 - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - script: - - ./scripts/ci/report_coverage.sh || exit $? - variables: - TEZOS_WITHOUT_OPAM: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - SLACK_COVERAGE_CHANNEL: C02PHBE7W73 - artifacts: - expire_in: 15 days - paths: - - _coverage_report/ - - $BISECT_FILE - reports: - coverage_report: - coverage_format: cobertura - path: _coverage_report/cobertura.xml - when: always - expose_as: Coverage report - coverage: '/Coverage: ([^%]+%)/' - -oc.install_python_bookworm: - image: debian:bookworm - stage: doc - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--docs(?:$|,)/ - when: on_success - - changes: - - docs/developer/install-python-debian-ubuntu.sh - - poetry.lock - - pyproject.toml - when: on_success - - when: manual - allow_failure: true - needs: - - 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: [] - timeout: 60 minutes - script: - - ./docs/developer/install-python-debian-ubuntu.sh ${CI_MERGE_REQUEST_SOURCE_PROJECT_PATH:-tezos/tezos} - ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master} - -documentation:odoc: - image: ${ci_image_name}/test:${ci_image_tag} - stage: doc - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--docs(?:$|,)/ - when: on_success - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - brassaia/**/* - - client-libs/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - script-inputs/**/*/ - - scripts/**/*/ - - src/**/* - - tezt/**/* - - vendors/**/* - 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 - before_script: - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh - script: - - make -C docs odoc-lite - after_script: - - ./scripts/ci/sccache-stop.sh - variables: CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G artifacts: - expire_in: 1 hour + name: build-kernels-$CI_COMMIT_REF_SLUG + expire_in: 3 days paths: - - docs/_build/api/odoc/ - - docs/odoc.log - when: always + - evm_kernel.wasm + - smart-rollup-installer + - sequenced_kernel.wasm + - tx_kernel.wasm + - tx_kernel_dal.wasm + - dal_echo_kernel.wasm + - src/riscv/riscv-dummy.elf + when: on_success -documentation:manuals: - image: ${ci_image_name}/test:${ci_image_tag} - stage: doc +tezt: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--docs(?:$|,)/ - when: on_success - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - brassaia/**/* - - client-libs/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - script-inputs/**/*/ - - scripts/**/*/ - - src/**/* - - tezt/**/* - - vendors/**/* - when: on_success + - gcp_very_high_cpu_dev needs: - oc.docker:ci:amd64 + - select_tezts - oc.build_x86_64-released - oc.build_x86_64-exp-dev-extra - oc.build_kernels - oc.build_dsn_node + - oc.tezt:fetch-records dependencies: - oc.docker:ci:amd64 + - select_tezts - oc.build_x86_64-released - oc.build_x86_64-exp-dev-extra - oc.build_kernels - oc.build_dsn_node - timeout: 60 minutes - before_script: - - eval $(opam env) - script: - - make -C docs -j octez-gen - artifacts: - expire_in: 1 week - paths: - - docs/*/octez-*.html - - docs/api/octez-*.txt - - docs/developer/metrics.csv - - docs/developer/rollup_metrics.csv - - docs/user/node-config.json - -documentation:docgen: - image: ${ci_image_name}/test:${ci_image_tag} - stage: doc - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--docs(?:$|,)/ - when: on_success - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - brassaia/**/* - - client-libs/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - script-inputs/**/*/ - - scripts/**/*/ - - src/**/* - - tezt/**/* - - vendors/**/* - 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 + - oc.tezt:fetch-records + timeout: 5 days before_script: - - eval $(opam env) - - . ./scripts/ci/sccache-start.sh + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh script: - - make -C docs -j docexes-gen - after_script: - - ./scripts/ci/sccache-stop.sh + - cd /builds/tezos/tezos + - tezt_analysis/run_tezt.sh + - sleep 5400 # For debug purpose we wait 1h30 before + #- echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" + # CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" + #- ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records + # --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv + #- ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit + # --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log + # --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record + # tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json + # --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} + #- ./scripts/ci/merge_coverage.sh variables: - CARGO_NET_OFFLINE: "false" - SCCACHE_DIR: $CI_PROJECT_DIR/_sccache - SCCACHE_CACHE_SIZE: 5G - artifacts: - expire_in: 1 week - paths: - - docs/alpha/rpc.rst - - docs/shell/rpc.rst - - docs/user/default-acl.json - - docs/api/errors.rst - - docs/shell/p2p_api.rst - -documentation:build_all: - image: ${ci_image_name}/test:${ci_image_tag} - stage: doc - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--docs(?:$|,)/ - when: on_success - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - brassaia/**/* - - client-libs/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - script-inputs/**/*/ - - scripts/**/*/ - - src/**/* - - tezt/**/* - - vendors/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - documentation:odoc - - documentation:manuals - - documentation:docgen - dependencies: - - oc.docker:ci:amd64 - - documentation:odoc - - documentation:manuals - - documentation:docgen - timeout: 60 minutes - before_script: - - eval $(opam env) - - . $HOME/.venv/bin/activate - script: - - make -C docs -j sphinx - - make -C docs -j _build/octezdoc.txt + JUNIT: tezt-junit.xml + TEZT_VARIANT: "" + TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && + /cloud && /flaky + TEZT_RETRY: "1" + TEZT_PARALLEL: "3" + TEZT_NO_NPX: "true" + BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ artifacts: - expire_in: 1 week + name: coverage-files-$CI_JOB_ID + expire_in: 3 days paths: - - docs/_build/ - expose_as: Documentation - excluding old protocols - -documentation:linkcheck: - image: ${ci_image_name}/test:${ci_image_tag} - stage: doc - tags: - - gcp - rules: - - if: $CI_MERGE_REQUEST_LABELS =~ /(?:^|,)ci--docs(?:$|,)/ - when: on_success - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - brassaia/**/* - - client-libs/**/* - - data-encoding/**/* - - docs/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - script-inputs/**/*/ - - scripts/**/*/ - - src/**/* - - tezt/**/* - - vendors/**/* - when: manual - allow_failure: true - needs: - - oc.docker:ci:amd64 - - documentation:manuals - - documentation:docgen - - documentation:build_all - dependencies: - - oc.docker:ci:amd64 - - documentation:manuals - - documentation:docgen - - documentation:build_all - allow_failure: true - timeout: 60 minutes - before_script: - - . ./scripts/version.sh - - eval $(opam env) - - . $HOME/.venv/bin/activate - script: - - make -C docs redirectcheck - - make -C docs linkcheck - -trigger:homebrew: - stage: manual - variables: - PIPELINE_TYPE: homebrew - rules: - - when: manual - allow_failure: true - needs: [] - trigger: - include: .gitlab/ci/pipelines/homebrew.yml - strategy: depend - -trigger:rpm_repository_partial: - stage: manual - variables: - PIPELINE_TYPE: rpm_repository_partial - rules: - - when: manual - allow_failure: true - needs: [] - trigger: - include: .gitlab/ci/pipelines/rpm_repository_partial.yml - strategy: depend - -trigger:debian_repository_partial: - stage: manual - variables: - PIPELINE_TYPE: debian_repository_partial - rules: - - when: manual - allow_failure: true - needs: [] - trigger: - include: .gitlab/ci/pipelines/debian_repository_partial.yml - strategy: depend - -oc.docker:amd64: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: manual - tags: - - gcp - rules: - - changes: - - Dockerfile - - build.Dockerfile - when: on_success - - when: manual - allow_failure: true - needs: - - oc.docker:rust-toolchain:amd64 - - oc.docker:ci:amd64 - dependencies: - - oc.docker:rust-toolchain:amd64 - - oc.docker:ci:amd64 - timeout: 60 minutes - before_script: - - ./scripts/ci/docker_initialize.sh - script: - - ./scripts/ci/docker_release.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - CI_DOCKER_HUB: "false" - DOCKER_BUILD_TARGET: with-evm-artifacts - IMAGE_ARCH_PREFIX: amd64_ - EXECUTABLE_FILES: script-inputs/released-executables script-inputs/experimental-executables - -oc.docker:arm64: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: manual - tags: - - gcp_arm64 - rules: - - changes: - - Dockerfile - - build.Dockerfile - when: on_success - - when: manual - allow_failure: true - needs: - - oc.docker:ci:arm64 - dependencies: - - oc.docker:ci:arm64 - timeout: 60 minutes - before_script: - - ./scripts/ci/docker_initialize.sh - script: - - ./scripts/ci/docker_release.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - CI_DOCKER_HUB: "false" - DOCKER_BUILD_TARGET: without-evm-artifacts - IMAGE_ARCH_PREFIX: arm64_ - EXECUTABLE_FILES: script-inputs/released-executables script-inputs/experimental-executables - -oc.script.docker_verify_image_arm64: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: manual - tags: - - gcp - rules: - - when: manual - allow_failure: true - needs: - - oc.docker:arm64 - dependencies: [] - timeout: 60 minutes - before_script: - - ./scripts/ci/docker_initialize.sh - script: - - ./scripts/ci/docker_verify_signature.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - IMAGE_ARCH_PREFIX: arm64_ - -oc.script.docker_verify_image_amd64: - image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 - stage: manual - tags: - - gcp - rules: - - when: manual - allow_failure: true - needs: - - oc.docker:amd64 - dependencies: [] - timeout: 60 minutes - before_script: - - ./scripts/ci/docker_initialize.sh - script: - - ./scripts/ci/docker_verify_signature.sh - services: - - docker:${DOCKER_VERSION}-dind - variables: - DOCKER_VERSION: 24.0.7 - IMAGE_ARCH_PREFIX: amd64_ + - selected_tezts.tsv + - tezt.log + - tezt-*.log + - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json + - $JUNIT + - $BISECT_FILE/$CI_JOB_NAME_SLUG.* + reports: + junit: $JUNIT + when: always + retry: 1 diff --git a/tezt_analysis/memory_tracker.sh b/tezt_analysis/memory_tracker.sh new file mode 100755 index 000000000000..0194fa9661a7 --- /dev/null +++ b/tezt_analysis/memory_tracker.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +sudo apk add procps bash findutils + +MAIN_PID=$1 +OUTPUT_FILE=$2 +INTERVAL=0.5 # Check every half second +MAX_MEM=0 +MAX_CPU=0 + +echo "Starting monitoring for PID $MAIN_PID and children" > $OUTPUT_FILE + +while kill -0 $MAIN_PID 2> /dev/null; do + # Get all child PIDs + ALL_PIDS=$(pgrep -P $MAIN_PID | tr '\n' ' ') + ALL_PIDS="$MAIN_PID $ALL_PIDS" + + # Get total memory and CPU usage + TOTAL_MEM=0 + TOTAL_CPU=0 + + for pid in $ALL_PIDS; do + if [ -e /proc/$pid/status ]; then + # Get memory in KB + MEM=$(grep VmRSS /proc/$pid/status | awk '{print $2}') + if [ ! -z "$MEM" ]; then + TOTAL_MEM=$((TOTAL_MEM + MEM)) + fi + + # Get CPU usage + CPU=$(ps -p $pid -o %cpu= 2> /dev/null || echo "0") + TOTAL_CPU=$(echo "$TOTAL_CPU + $CPU" | bc) + fi + done + + # Update max values + if [ $TOTAL_MEM -gt $MAX_MEM ]; then + MAX_MEM=$TOTAL_MEM + echo "$(date +%H:%M:%S) - New peak memory: $MAX_MEM KB" >> $OUTPUT_FILE + fi + + if ( ($(echo "$TOTAL_CPU > $MAX_CPU" | bc -l))); then + MAX_CPU=$TOTAL_CPU + echo "$(date +%H:%M:%S) - New peak CPU: $MAX_CPU%" >> $OUTPUT_FILE + fi + + sleep $INTERVAL +done + +echo "=== SUMMARY ===" >> $OUTPUT_FILE +echo "Peak memory usage: $MAX_MEM KB ($(echo "scale=2; $MAX_MEM/1024" | bc) MB)" >> $OUTPUT_FILE +echo "Peak CPU usage: $MAX_CPU%" >> $OUTPUT_FILE diff --git a/tezt_analysis/run_tezt.sh b/tezt_analysis/run_tezt.sh new file mode 100755 index 000000000000..69abb15636ed --- /dev/null +++ b/tezt_analysis/run_tezt.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Run tezt test in background +_build/default/tezt/tests/main.exe -t 'Alpha: Sequencer produces an empty block in case of upgrade. (sequencer, latest, without dal, single chain)' & +TEST_PID=$! + +# Monitor it +touch memory_stats.txt +tezt_analysis/memory_tracker.sh $TEST_PID memory_stats.txt & +MONITOR_PID=$! + +# Wait for test to complete +wait $TEST_PID +TEST_EXIT_CODE=$? + +# Give monitor a moment to finish and kill it +sleep 1 +kill $MONITOR_PID 2> /dev/null + +# Display results +echo "Test completed with exit code: $TEST_EXIT_CODE" +cat memory_stats.txt diff --git a/tezt_analysis/run_tezt_sequential.sh b/tezt_analysis/run_tezt_sequential.sh new file mode 100755 index 000000000000..c545411dced6 --- /dev/null +++ b/tezt_analysis/run_tezt_sequential.sh @@ -0,0 +1,44 @@ +#!/bin/sh + +# Install needed packages +sudo apk add procps grep bc + +# Run test and capture PID +_build/default/tezt/tests/main.exe -t 'Alpha: Sequencer produces an empty block in case of upgrade. (sequencer, latest, without dal, single chain)' & +MAIN_PID=$! + +# Initialize peak values +peak_mem=0 +peak_cpu=0 + +# Monitor resource usage until process completes +while kill -0 $MAIN_PID 2> /dev/null; do + # Get all PIDs (parent and children) + pids="$MAIN_PID $(pgrep -P $MAIN_PID | tr '\n' ' ')" + + # Calculate total memory usage + total_mem=0 + for pid in $pids; do + if [ -e /proc/$pid/status ]; then + mem=$(grep VmRSS /proc/$pid/status | awk '{print $2}' || echo "0") + total_mem=$((total_mem + mem)) + fi + done + + # Update peak memory if needed + if [ $total_mem -gt $peak_mem ]; then + peak_mem=$total_mem + echo "New peak memory: $peak_mem KB ($(echo "scale=2; $peak_mem/1024" | bc) MB)" + fi + + sleep 1 +done + +# Display summary +echo "=======================" +echo "FINAL RESULTS:" +echo "Peak memory usage: $peak_mem KB ($(echo "scale=2; $peak_mem/1024" | bc) MB)" +echo "=======================" + +# Wait for the main process to complete +wait $MAIN_PID -- GitLab From 4484f3cd1ef300ea3777b89e6a30e4f1b75212b8 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Thu, 24 Apr 2025 16:19:39 +0200 Subject: [PATCH 02/35] WIP: memstat --- memstat/dune | 3 + memstat/main.ml | 360 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 363 insertions(+) create mode 100644 memstat/dune create mode 100644 memstat/main.ml diff --git a/memstat/dune b/memstat/dune new file mode 100644 index 000000000000..d8d38e1481d6 --- /dev/null +++ b/memstat/dune @@ -0,0 +1,3 @@ +(executable + (name main) + (libraries clap unix)) diff --git a/memstat/main.ml b/memstat/main.ml new file mode 100644 index 000000000000..b066d30812fb --- /dev/null +++ b/memstat/main.ml @@ -0,0 +1,360 @@ +let sf = Printf.sprintf + +let ( let* ) = Result.bind + +let echo x = Printf.ksprintf print_endline x + +let echo_e x = Printf.ksprintf prerr_endline x + +let list_map_r l f = + let rec loop acc = function + | [] -> Ok (List.rev acc) + | head :: tail -> + let* head = f head in + loop (head :: acc) tail + in + loop [] l + +type peak_mode = No_peak | Peak | Only_peak + +(* Shared memory is divided proportional to the number of processes that share it. *) +(* https://stackoverflow.com/questions/131303/how-can-i-measure-the-actual-memory-usage-of-an-application-or-process *) +let get_memory pid = + try + let ch = open_in ("/proc/" ^ string_of_int pid ^ "/smaps") in + Fun.protect ~finally:(fun () -> close_in ch) @@ fun () -> + let rec sum_pss acc = + match input_line ch with + | exception End_of_file -> acc + | line -> + let parse_error () = + failwith (Printf.sprintf "failed to parse %S" line) + in + let line = String.trim line in + let value = + if not (String.starts_with ~prefix:"Pss:" line) then 0 + else if not (String.ends_with ~suffix:"kB" line) then parse_error () + else + let value = + String.sub + line + (String.length "Pss:") + (String.length line - String.length "Pss:" + - String.length "kB") + |> String.trim + in + match int_of_string_opt value with + | None -> parse_error () + | Some value -> value + in + sum_pss (acc + value) + in + Ok (sum_pss 0) + with Sys_error message | Failure message -> Error message + +type process_info = { + pid : int; + command : string; + memory_kb : int; + children : process_info list; + total_memory_kb : int; +} + +let merge_into_peak_info info peak_info_ref = + match !peak_info_ref with + | None -> peak_info_ref := Some info + | Some old -> + if info.total_memory_kb > old.total_memory_kb then + peak_info_ref := Some info + +let rec input_lines ?(acc = []) ch = + match input_line ch with + | exception End_of_file -> List.rev acc + | line -> input_lines ~acc:(line :: acc) ch + +let get_children pid = + try + (* I think a task is the same as a thread. *) + let task_path = "/proc/" ^ string_of_int pid ^ "/task" in + let parse_tid line = + match int_of_string_opt (String.trim line) with + | None -> + failwith (sf "failed to parse %S from %s as a TID" line task_path) + | Some pid -> pid + in + let task_ids = + Sys.readdir task_path |> Array.to_list |> List.map parse_tid + in + let get_task_children tid = + let task_children_path = + task_path ^ "/" ^ string_of_int tid ^ "/children" + in + let ch = open_in task_children_path in + Fun.protect ~finally:(fun () -> close_in ch) @@ fun () -> + let parse_pid line = + match int_of_string_opt line with + | None -> + failwith + (sf "failed to parse %S from %s as a PID" line task_children_path) + | Some pid -> pid + in + input_lines ch + |> List.map (String.split_on_char ' ') + |> List.flatten |> List.map String.trim + |> List.filter (( <> ) "") + |> List.map parse_pid + in + Ok (List.flatten (List.map get_task_children task_ids)) + with Sys_error message | Failure message -> Error message + +let get_command pid = + let path = "/proc/" ^ string_of_int pid ^ "/comm" in + try + let ch = open_in path in + Fun.protect ~finally:(fun () -> close_in ch) @@ fun () -> Ok (input_line ch) + with Sys_error message -> Error message + +let rec get_process_info ~recursively pid = + let* command = get_command pid in + let* memory_kb = get_memory pid in + let* children = + if recursively then + let* children = get_children pid in + list_map_r children (get_process_info ~recursively) + else Ok [] + in + let total_memory_kb = + List.fold_left + (fun acc child -> acc + child.total_memory_kb) + memory_kb + children + in + Ok {pid; command; memory_kb; children; total_memory_kb} + +let show_bytes ~bytes kb = + if bytes then + (* TODO: is it 1024? Should be 1000 if kB, 1024 would be kiB, but need to check. *) + Printf.sprintf "%d" (kb * 1000) + else Printf.sprintf "%d kB" kb + +let output_process_info ~verbose ~bytes info = + (if verbose then + let rec loop level info = + let indent = String.make (level * 2) ' ' in + echo + "%s[%d] %s (%s)" + indent + info.pid + (show_bytes ~bytes info.memory_kb) + info.command ; + List.iter (loop (level + 1)) info.children + in + loop 0 info) ; + let bytes_string = show_bytes ~bytes info.total_memory_kb in + if bytes then echo "%s" bytes_string else echo "Total: %s" bytes_string + +let output_peak_info ~verbose ~peak ~bytes peak_info_opt = + match (peak, peak_info_opt) with + | No_peak, _ | _, None -> () + | Peak, Some peak_info -> + echo "Peak:" ; + output_process_info ~verbose ~bytes peak_info + | Only_peak, Some peak_info -> output_process_info ~verbose ~bytes peak_info + +let with_openfile path flags f = + match Unix.openfile path flags 0o600 with + | exception Unix.Unix_error (code, _, _) -> Error (Unix.error_message code) + | file -> Fun.protect ~finally:(fun () -> Unix.close file) @@ fun () -> f file + +let watch_child ~recursively ~verbose ~frequency ~peak ~bytes pid = + let peak_info = ref None in + let rec loop () = + match Unix.waitpid [WNOHANG] pid with + | exception Unix.Unix_error (code, _, _) -> Error (Unix.error_message code) + | pid', status -> + if pid' = pid then ( + match status with + | WEXITED n -> + if verbose then echo "Process exited with code %d" n ; + Ok () + | WSIGNALED _ -> + if verbose then echo "Process was killed by signal" ; + Ok () + | WSTOPPED _ -> + if verbose then echo "Process was stopped by signal" ; + Ok ()) + else ( + (match get_process_info ~recursively pid with + | Error message -> echo_e "Failed to get process info: %s" message + | Ok info -> ( + merge_into_peak_info info peak_info ; + match peak with + | No_peak | Peak -> output_process_info ~verbose ~bytes info + | Only_peak -> ())) ; + Unix.sleepf (1. /. frequency) ; + loop ()) + in + let result = loop () in + output_peak_info ~verbose ~peak ~bytes !peak_info ; + result + +let watch_pid ~recursively ~verbose ~frequency ~bytes pid = + let peak_info = ref None in + let rec loop () = + (match get_process_info ~recursively pid with + | Error message -> echo_e "Failed to get process info: %s" message + | Ok info -> + merge_into_peak_info info peak_info ; + output_process_info ~verbose ~bytes info) ; + Unix.sleepf (1. /. frequency) ; + loop () + in + loop () + +let run_and_watch ~recursively ~verbose ~frequency ~peak ~bytes ~stdout_path + ~stderr_path executable arguments = + with_openfile stdout_path [O_WRONLY] @@ fun process_stdout -> + with_openfile stderr_path [O_WRONLY] @@ fun process_stderr -> + let argv = Array.of_list (executable :: arguments) in + match + Unix.create_process executable argv Unix.stdin process_stdout process_stderr + with + | exception Unix.Unix_error (code, _, _) -> Error (Unix.error_message code) + | pid -> watch_child ~recursively ~verbose ~frequency ~peak ~bytes pid + +let () = + Clap.description "Measure a process memory usage." ; + let verbose = + Clap.flag + ~set_long:"verbose" + ~set_short:'v' + ~description: + "Output more information, such as information about child processes." + false + in + let recursively = + Clap.flag + ~set_long:"recursively" + ~set_short:'r' + ~description: + "Measure memory usage of child processes as well, recursively, to \ + output the total." + false + in + let frequency = + Clap.default_float + ~long:"frequency" + ~short:'f' + ~description: + "How many times to measure per second, if measuring more than once." + 10. + in + let peak = + Clap.flag_enum + [ + (["no-peak"], [], No_peak); + (["peak"], [], Peak); + (["only-peak"], [], Only_peak); + ] + ~description: + "Whether to output peak memory usage at the end (--peak or \ + --only-peak), or not (--no-peak). With --only-peak, do not output \ + values other than peak memory usage, and do not output the 'Peak:' \ + line, making it easier for scripts. Only works with the 'run' command \ + for now." + Peak + in + let bytes = + Clap.flag + ~set_long:"bytes" + ~description: + "Output memory usage in bytes instead of kilobytes, and without the \ + unit. Also, do not prefix the total with 'Total:'. Useful for scripts \ + that just want the value. Usually used without --verbose, but can be \ + used with --recursively to output the total, including children \ + memory usage." + false + in + let command = + Clap.subcommand + [ + ( Clap.case + "get" + ~description: + "Measure memory usage of a process that is already running." + @@ fun () -> + let watch = + Clap.flag + ~set_long:"watch" + ~set_short:'w' + ~description:"Repeat the measurement forever." + false + in + let pid = + Clap.mandatory_int + ~placeholder:"PID" + ~description:"PID of the process to measure." + () + in + `get (pid, watch) ); + ( Clap.case + "run" + ~description: + "Run a program and measure its memory usage until it exists." + @@ fun () -> + let stdout_path = + Clap.default_string + ~long:"redirect-process-stdout-to" + ~short:'O' + ~placeholder:"PATH" + ~description: + "Redirect the standard output channel of the process to PATH." + "/dev/null" + in + let stderr_path = + Clap.default_string + ~long:"redirect-process-stderr-to" + ~short:'E' + ~placeholder:"PATH" + ~description: + "Redirect the standard error channel of the process to PATH." + "/dev/null" + in + let executable = + Clap.mandatory_string + ~placeholder:"EXECUTABLE" + ~description:"Name of the executable to run." + () + in + let arguments = + Clap.list_string + ~placeholder:"ARGUMENTS" + ~description:"Arguments to pass to EXECUTABLE." + () + in + `run (executable, arguments, stdout_path, stderr_path) ); + ] + in + Clap.close () ; + + let result = + match command with + | `get (pid, watch) -> + if watch then watch_pid ~recursively ~verbose ~frequency ~bytes pid + else + let* info = get_process_info ~recursively pid in + output_process_info ~verbose ~bytes info ; + Ok () + | `run (executable, arguments, stdout_path, stderr_path) -> + run_and_watch + ~recursively + ~verbose + ~frequency + ~peak + ~bytes + ~stdout_path + ~stderr_path + executable + arguments + in + match result with Ok () -> () | Error message -> echo_e "Error: %s" message -- GitLab From 1b72b9853ded304d93286dc99a305f948299bda2 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Thu, 24 Apr 2025 16:44:47 +0200 Subject: [PATCH 03/35] Feat: WIP --- .gitlab/ci/pipelines/before_merging.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index f3ab125f4e3b..5794adcfeb8d 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -541,6 +541,26 @@ oc.build_kernels: - src/riscv/riscv-dummy.elf when: on_success +# Keep +build_memstat: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp_very_high_cpu + dependencies: + - oc.docker:ci:amd64 + timeout: 60 minutes + before_script: + - ./scripts/ci/take_ownership.sh + - eval $(opam env) + script: + - sleep 5400 # For debug purpose we wait 1h30 before + artifacts: + expire_in: 7 days + paths: + - _build/default/memstat/main.exe + when: always + tezt: image: ${ci_image_name}/e2etest:${ci_image_tag} stage: test -- GitLab From 09459d4ae679c114f8dbf6ad59a4d7b0b8a1fd00 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Thu, 24 Apr 2025 16:52:12 +0200 Subject: [PATCH 04/35] Feat: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 5794adcfeb8d..395f3ba52112 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -546,7 +546,7 @@ build_memstat: image: ${ci_image_name}/build:${ci_image_tag} stage: build tags: - - gcp_very_high_cpu + - gcp_dev dependencies: - oc.docker:ci:amd64 timeout: 60 minutes -- GitLab From 18e8a17676e5884143e3f0651b50638ff5da732e Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Thu, 24 Apr 2025 17:25:10 +0200 Subject: [PATCH 05/35] Feat: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 395f3ba52112..80ddd629e918 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -554,7 +554,7 @@ build_memstat: - ./scripts/ci/take_ownership.sh - eval $(opam env) script: - - sleep 5400 # For debug purpose we wait 1h30 before + - dune build memstat artifacts: expire_in: 7 days paths: -- GitLab From 7ec68c784a56bd04ab4955dc22ce3fe4f19723e8 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Fri, 25 Apr 2025 09:43:59 +0200 Subject: [PATCH 06/35] Feat: WIP --- .gitlab/ci/pipelines/before_merging.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 80ddd629e918..80d56b058184 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -574,6 +574,7 @@ tezt: - oc.build_kernels - oc.build_dsn_node - oc.tezt:fetch-records + - build_memstat dependencies: - oc.docker:ci:amd64 - select_tezts @@ -582,7 +583,8 @@ tezt: - oc.build_kernels - oc.build_dsn_node - oc.tezt:fetch-records - timeout: 5 days + - build_memstat + timeout: 7 days before_script: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh -- GitLab From 4a1008b8891ac5fa83645a2a934507d0072b51b0 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Fri, 25 Apr 2025 09:46:45 +0200 Subject: [PATCH 07/35] Feat: WIP --- .gitlab/ci/pipelines/before_merging.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 80d56b058184..8f534534ffc1 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -589,8 +589,8 @@ tezt: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - - cd /builds/tezos/tezos - - tezt_analysis/run_tezt.sh + #- cd /builds/tezos/tezos + #- tezt_analysis/run_tezt.sh - sleep 5400 # For debug purpose we wait 1h30 before #- echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" # CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" -- GitLab From 906c1b49f8b6f4668456e76f103d05b011097e20 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Fri, 25 Apr 2025 14:53:16 +0200 Subject: [PATCH 08/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 37 ++----------------- tezt_analysis/{ => v1}/memory_tracker.sh | 0 tezt_analysis/{ => v1}/run_tezt.sh | 0 tezt_analysis/{ => v1}/run_tezt_sequential.sh | 0 tezt_analysis/v2/run_tezt.sh | 28 ++++++++++++++ 5 files changed, 31 insertions(+), 34 deletions(-) rename tezt_analysis/{ => v1}/memory_tracker.sh (100%) rename tezt_analysis/{ => v1}/run_tezt.sh (100%) rename tezt_analysis/{ => v1}/run_tezt_sequential.sh (100%) create mode 100755 tezt_analysis/v2/run_tezt.sh diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 8f534534ffc1..288ef82e35a0 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -589,39 +589,8 @@ tezt: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - #- cd /builds/tezos/tezos - #- tezt_analysis/run_tezt.sh - - sleep 5400 # For debug purpose we wait 1h30 before - #- echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - # CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - #- ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - # --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - #- ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - # --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - # --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - # tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - # --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - #- ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: "" - TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && - /cloud && /flaky - TEZT_RETRY: "1" - TEZT_PARALLEL: "3" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ + - tezt_analysis/v2/run_tezt.sh artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 3 days + expire_in: 7 days paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 1 + - tezt_analysis/memory_stats.csv diff --git a/tezt_analysis/memory_tracker.sh b/tezt_analysis/v1/memory_tracker.sh similarity index 100% rename from tezt_analysis/memory_tracker.sh rename to tezt_analysis/v1/memory_tracker.sh diff --git a/tezt_analysis/run_tezt.sh b/tezt_analysis/v1/run_tezt.sh similarity index 100% rename from tezt_analysis/run_tezt.sh rename to tezt_analysis/v1/run_tezt.sh diff --git a/tezt_analysis/run_tezt_sequential.sh b/tezt_analysis/v1/run_tezt_sequential.sh similarity index 100% rename from tezt_analysis/run_tezt_sequential.sh rename to tezt_analysis/v1/run_tezt_sequential.sh diff --git a/tezt_analysis/v2/run_tezt.sh b/tezt_analysis/v2/run_tezt.sh new file mode 100755 index 000000000000..97c6a1e788e8 --- /dev/null +++ b/tezt_analysis/v2/run_tezt.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +REPORT_OUTPUT="tezt_analysis/memory_stats.csv" + +# List tezt tests and filter for the ones that are not disabled +tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) + +# Process each test +echo "--------------------------------------------------" +echo " Starting tezt memory peak analysis:" +echo "--------------------------------------------------" +index=1 +echo "${tezt_output}" | while IFS=$'\t' read -r file title rest; do + if [ -n "${title}" ]; then # Skip empty lines + echo -e "\nšŸ”„ Processing test #${index}: $title ..." + memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) + index=$((index + 1)) + echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} + echo -e "Memory peak: ${memory_peak}\n" + fi +done + +echo "āœ… Tezt memory peak analysis completed." +echo "šŸ“‘ Below is the report of the memory peak for each test:" +cat ${REPORT_OUTPUT} +echo "--------------------------------------------------" +echo "Report saved to ${REPORT_OUTPUT}" +echo "--------------------------------------------------" -- GitLab From e65824457a9add878f51eb6282fa235baa3cdf9e Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Fri, 25 Apr 2025 15:49:44 +0200 Subject: [PATCH 09/35] CI: WIP --- tezt_analysis/v2/run_tezt.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tezt_analysis/v2/run_tezt.sh b/tezt_analysis/v2/run_tezt.sh index 97c6a1e788e8..acef18b78205 100755 --- a/tezt_analysis/v2/run_tezt.sh +++ b/tezt_analysis/v2/run_tezt.sh @@ -3,16 +3,23 @@ REPORT_OUTPUT="tezt_analysis/memory_stats.csv" # List tezt tests and filter for the ones that are not disabled -tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) +#tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) +tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f /ci_disabled) # Process each test echo "--------------------------------------------------" echo " Starting tezt memory peak analysis:" echo "--------------------------------------------------" + +# Display total number of tests found +total_tests=$(echo "${tezt_output}" | grep -v '^$' | wc -l) +echo "Found ${total_tests} tests to analyze" + index=1 echo "${tezt_output}" | while IFS=$'\t' read -r file title rest; do if [ -n "${title}" ]; then # Skip empty lines - echo -e "\nšŸ”„ Processing test #${index}: $title ..." + percentage=$((index * 100 / total_tests)) + echo -e "\nšŸ”„ Processing test #${index}/${total_tests} (${percentage}%): $title ..." memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) index=$((index + 1)) echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} -- GitLab From 21788a338d956433d405d44e651623b68c896502 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Fri, 25 Apr 2025 16:12:23 +0200 Subject: [PATCH 10/35] CI: WIP --- tezt_analysis/v2/run_tezt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tezt_analysis/v2/run_tezt.sh b/tezt_analysis/v2/run_tezt.sh index acef18b78205..a0fd25ae85d8 100755 --- a/tezt_analysis/v2/run_tezt.sh +++ b/tezt_analysis/v2/run_tezt.sh @@ -4,7 +4,7 @@ REPORT_OUTPUT="tezt_analysis/memory_stats.csv" # List tezt tests and filter for the ones that are not disabled #tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) -tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f /ci_disabled) +tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv /ci_disabled) # Process each test echo "--------------------------------------------------" -- GitLab From 8ce9315521504a937250b4cbe3cbc20957fd2aa8 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 09:39:54 +0200 Subject: [PATCH 11/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 6 +- tezt_analysis/v2/run_tezt_by_group_index.sh | 74 +++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100755 tezt_analysis/v2/run_tezt_by_group_index.sh diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 288ef82e35a0..1ef35f9d358c 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -589,8 +589,10 @@ tezt: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - - tezt_analysis/v2/run_tezt.sh + #- tezt_analysis/v2/run_tezt.sh + - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} artifacts: expire_in: 7 days paths: - - tezt_analysis/memory_stats.csv + - tezt_analysis/reports/*.csv + parallel: 100 diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh new file mode 100755 index 000000000000..43fc2ed3aa12 --- /dev/null +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -0,0 +1,74 @@ +#!/bin/bash + +# Check if PARALLEL_INDEX and PARALLEL_TOTAL are provided +PARALLEL_INDEX=${1:-1} +PARALLEL_TOTAL=${2:-1} + +# Validate input parameters +if ! [[ "$PARALLEL_INDEX" =~ ^[0-9]+$ ]] || ! [[ "$PARALLEL_TOTAL" =~ ^[0-9]+$ ]]; then + echo "Error: PARALLEL_INDEX and PARALLEL_TOTAL must be positive integers" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL]" + exit 1 +fi + +if [ "$PARALLEL_INDEX" -lt 1 ] || [ "$PARALLEL_INDEX" -gt "$PARALLEL_TOTAL" ]; then + echo "Error: PARALLEL_INDEX must be between 1 and PARALLEL_TOTAL" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL]" + exit 1 +fi + +echo "Running in parallel mode: Processing group $PARALLEL_INDEX of $PARALLEL_TOTAL" + +REPORT_OUTPUT="tezt_analysis/reports/memory_stats_part_${PARALLEL_INDEX}_of_${PARALLEL_TOTAL}.csv" + +# Create report directory if it doesn't exist +mkdir -p "$(dirname "$REPORT_OUTPUT")" + +# List tezt tests and filter for the ones that are not disabled +#tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv /ci_disabled) +tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) + +# Compute the total number of tests and the range for this group +total_tests=$(echo "${tezt_output}" | grep -v '^$' | wc -l) +tests_per_group=$((total_tests / PARALLEL_TOTAL + (total_tests % PARALLEL_TOTAL > 0))) +start_index=$(((PARALLEL_INDEX - 1) * tests_per_group + 1)) +end_index=$((PARALLEL_INDEX * tests_per_group)) + +# Ensure end_index doesn't exceed total_tests +if [ $end_index -gt $total_tests ]; then + end_index=$total_tests +fi + +my_test_count=$((end_index - start_index + 1)) + +echo "--------------------------------------------------" +echo " Starting tezt memory peak analysis:" +echo " Group: $PARALLEL_INDEX of $PARALLEL_TOTAL" +echo " Processing tests $start_index to $end_index of $total_tests" +echo " ($my_test_count tests in this group)" +echo "--------------------------------------------------" + +# Process only the tests assigned to this group +index=1 +group_index=1 +echo "${tezt_output}" | while IFS=$'\t' read -r file title rest; do + if [ -n "${title}" ]; then # Skip empty lines + # Process only tests that belong to our group + if [ $index -ge $start_index ] && [ $index -le $end_index ]; then + percentage=$((group_index * 100 / my_test_count)) + echo -e "\nšŸ”„ Processing test #${index}/${total_tests} (${percentage}% of this group): $title ..." + memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) + echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} + echo -e "Memory peak: ${memory_peak}\n" + group_index=$((group_index + 1)) + fi + index=$((index + 1)) + fi +done + +echo "āœ… Tezt memory peak analysis completed for group $PARALLEL_INDEX of $PARALLEL_TOTAL." +echo "šŸ“‘ Below is the report of the memory peak for tests in this group:" +cat ${REPORT_OUTPUT} +echo "--------------------------------------------------" +echo "Report saved to ${REPORT_OUTPUT}" +echo "--------------------------------------------------" -- GitLab From ab172e538d468c226654a7242e2b68a6d6d1d7c5 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 09:40:03 +0200 Subject: [PATCH 12/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 1ef35f9d358c..7f4ef89287c7 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -595,4 +595,4 @@ tezt: expire_in: 7 days paths: - tezt_analysis/reports/*.csv - parallel: 100 + parallel: 3 -- GitLab From 45a1cbe8c8839caac48e1169408b30a849757bbb Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 10:15:52 +0200 Subject: [PATCH 13/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 30 +++++++++- tezt_analysis/v2/consolidate_tezt_reports.sh | 62 ++++++++++++++++++++ tezt_analysis/v2/run_tezt_by_group_index.sh | 13 +++- 3 files changed, 101 insertions(+), 4 deletions(-) create mode 100755 tezt_analysis/v2/consolidate_tezt_reports.sh diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 7f4ef89287c7..36f3d48c1dea 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -10,6 +10,7 @@ stages: - test_coverage - doc - manual +- consolidate # Keep oc.docker:ci:amd64: @@ -590,9 +591,36 @@ tezt: - . ./scripts/version.sh script: #- tezt_analysis/v2/run_tezt.sh - - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} + - sleep 10800 # 3 hours + - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} + variables: + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv artifacts: expire_in: 7 days paths: - tezt_analysis/reports/*.csv parallel: 3 + +consolidate_tezt_reports: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: consolidate + tags: + - gcp_dev + needs: + - tezt + dependencies: + - tezt + timeout: 60 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - tezt_analysis/v2/consolidate_tezt_reports.sh ${REPORT_OUTPUT} + variables: + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv + artifacts: + expire_in: 7 days + paths: + - tezt_analysis/reports/memory_stats_merged.csv + - tezt_analysis/reports/memory_stats_sorted.csv + parallel: 3 \ No newline at end of file diff --git a/tezt_analysis/v2/consolidate_tezt_reports.sh b/tezt_analysis/v2/consolidate_tezt_reports.sh new file mode 100755 index 000000000000..97e8d55ec36f --- /dev/null +++ b/tezt_analysis/v2/consolidate_tezt_reports.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Check if REPORT_OUTPUT is provided +if [ -z "$1" ]; then + echo "Error: REPORT_OUTPUT parameter is required" + echo "Usage: $0 " + exit 1 +fi + +REPORT_OUTPUT="$1" +REPORT_DIR=$(dirname "$REPORT_OUTPUT") +GLOBAL_REPORT="${REPORT_DIR}/memory_stats_merged.csv" + +echo "Merging all CSV files in ${REPORT_DIR} into ${GLOBAL_REPORT} ..." + +# Check if there are any CSV files in the directory +if [ ! "$(ls -A ${REPORT_DIR}/*.csv 2>/dev/null)" ]; then + echo "Error: No CSV files found in ${REPORT_DIR}" + exit 1 +fi + +# Clear the global report +> "$GLOBAL_REPORT" + +# Merge all CSV files tezt reports +for csv_file in "${REPORT_DIR}"/*.csv; do + # Skip the global report itself and sorted variant if it exists + if [ "$csv_file" == "$GLOBAL_REPORT" ]; then + continue + fi + + if [ "$csv_file" == "${REPORT_DIR}/memory_stats_sorted.csv" ]; then + continue + fi + + echo "Processing ${csv_file}..." + cat "$csv_file" >> "$GLOBAL_REPORT" +done + +# Count total tests in the merged report +TOTAL_TESTS=$(wc -l < "$GLOBAL_REPORT") + +echo "--------------------------------------------------" +echo "āœ… Merged report created successfully at ${GLOBAL_REPORT}" +echo "šŸ“Š Total tests analyzed: ${TOTAL_TESTS}" +echo "--------------------------------------------------" + +# Sort the merged report by memory usage (descending) +SORTED_REPORT="${REPORT_DIR}/memory_stats_sorted.csv" + +if [ -f "$GLOBAL_REPORT" ] && [ -s "$GLOBAL_REPORT" ]; then + echo "Creating sorted report (by memory usage)..." + + # Sort by memory usage (2nd field) in descending order + # Format is: test_title;memory_value + sort -t ';' -k 2 -n -r "$GLOBAL_REPORT" > "$SORTED_REPORT" + + echo "āœ… Sorted report created at ${SORTED_REPORT}" + +fi + +exit 0 \ No newline at end of file diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index 43fc2ed3aa12..b0bea87db112 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -3,23 +3,30 @@ # Check if PARALLEL_INDEX and PARALLEL_TOTAL are provided PARALLEL_INDEX=${1:-1} PARALLEL_TOTAL=${2:-1} +REPORT_OUTPUT=$3 # Validate input parameters if ! [[ "$PARALLEL_INDEX" =~ ^[0-9]+$ ]] || ! [[ "$PARALLEL_TOTAL" =~ ^[0-9]+$ ]]; then echo "Error: PARALLEL_INDEX and PARALLEL_TOTAL must be positive integers" - echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL]" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" exit 1 fi if [ "$PARALLEL_INDEX" -lt 1 ] || [ "$PARALLEL_INDEX" -gt "$PARALLEL_TOTAL" ]; then echo "Error: PARALLEL_INDEX must be between 1 and PARALLEL_TOTAL" - echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL]" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" + exit 1 +fi + +if [ "$#" -ge 3 ] && [ -z "$REPORT_OUTPUT" ]; then + echo "Error: REPORT_OUTPUT parameter was specified but is empty" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" exit 1 fi echo "Running in parallel mode: Processing group $PARALLEL_INDEX of $PARALLEL_TOTAL" -REPORT_OUTPUT="tezt_analysis/reports/memory_stats_part_${PARALLEL_INDEX}_of_${PARALLEL_TOTAL}.csv" +echo "Report will be saved to: $REPORT_OUTPUT" # Create report directory if it doesn't exist mkdir -p "$(dirname "$REPORT_OUTPUT")" -- GitLab From 918d46f03a8e4cebdbae0a51b461a4540479f259 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 10:17:55 +0200 Subject: [PATCH 14/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 1 - tezt_analysis/v2/run_tezt_by_group_index.sh | 2 -- 2 files changed, 3 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 36f3d48c1dea..0571cf708e8e 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -623,4 +623,3 @@ consolidate_tezt_reports: paths: - tezt_analysis/reports/memory_stats_merged.csv - tezt_analysis/reports/memory_stats_sorted.csv - parallel: 3 \ No newline at end of file diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index b0bea87db112..c224c0902e96 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -1,11 +1,9 @@ #!/bin/bash -# Check if PARALLEL_INDEX and PARALLEL_TOTAL are provided PARALLEL_INDEX=${1:-1} PARALLEL_TOTAL=${2:-1} REPORT_OUTPUT=$3 -# Validate input parameters if ! [[ "$PARALLEL_INDEX" =~ ^[0-9]+$ ]] || ! [[ "$PARALLEL_TOTAL" =~ ^[0-9]+$ ]]; then echo "Error: PARALLEL_INDEX and PARALLEL_TOTAL must be positive integers" echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" -- GitLab From 23f90148c654fb4ca1dcef5ec535536ea5bbc9bd Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 10:42:07 +0200 Subject: [PATCH 15/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 11 +---------- tezt_analysis/v2/consolidate_tezt_reports.sh | 2 +- tezt_analysis/v2/run_tezt_by_group_index.sh | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 0571cf708e8e..df10de8e5155 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -12,7 +12,6 @@ stages: - manual - consolidate -# Keep oc.docker:ci:amd64: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 stage: images @@ -33,7 +32,6 @@ oc.docker:ci:amd64: reports: dotenv: ci_image_tag.env -# Keep oc.docker:rust-toolchain:amd64: image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 stage: images @@ -53,7 +51,6 @@ oc.docker:rust-toolchain:amd64: reports: dotenv: rust_toolchain_image_tag.env -# Keep trigger: image: datadog/ci:v2.44.0 stage: start @@ -75,8 +72,6 @@ trigger: - DATADOG_SITE=datadoghq.eu datadog-ci tag --level pipeline --tags pipeline_type:$PIPELINE_TYPE --tags mr_number:$CI_MERGE_REQUEST_IID - -# Keep oc.build_x86_64-released: image: ${ci_image_name}/build:${ci_image_tag} stage: build @@ -172,7 +167,6 @@ oc.build_x86_64-released: - stuck_or_timeout_failure - runner_system_failure -# Keep oc.build_dsn_node: image: ${rust_toolchain_image_name}:${rust_toolchain_image_tag} stage: build @@ -247,7 +241,6 @@ oc.build_dsn_node: - octez-dsn-node when: on_success -# Keep oc.tezt:fetch-records: image: ${ci_image_name}/build:${ci_image_tag} stage: build @@ -303,7 +296,6 @@ oc.tezt:fetch-records: - tezt/records/*.json.broken when: always -# Keep select_tezts: image: ${ci_image_name}/prebuild:${ci_image_tag} stage: build @@ -542,7 +534,6 @@ oc.build_kernels: - src/riscv/riscv-dummy.elf when: on_success -# Keep build_memstat: image: ${ci_image_name}/build:${ci_image_tag} stage: build @@ -591,7 +582,7 @@ tezt: - . ./scripts/version.sh script: #- tezt_analysis/v2/run_tezt.sh - - sleep 10800 # 3 hours + #- sleep 10800 # 3 hours - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} variables: REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv diff --git a/tezt_analysis/v2/consolidate_tezt_reports.sh b/tezt_analysis/v2/consolidate_tezt_reports.sh index 97e8d55ec36f..93df970d3dd8 100755 --- a/tezt_analysis/v2/consolidate_tezt_reports.sh +++ b/tezt_analysis/v2/consolidate_tezt_reports.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Check if REPORT_OUTPUT is provided if [ -z "$1" ]; then diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index c224c0902e96..18ec4e052edb 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh PARALLEL_INDEX=${1:-1} PARALLEL_TOTAL=${2:-1} -- GitLab From 32fd71557c930fc906c04bbe11d73c3c9ff17556 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 13:26:40 +0200 Subject: [PATCH 16/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index df10de8e5155..b2349e4abfc8 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -597,9 +597,10 @@ consolidate_tezt_reports: stage: consolidate tags: - gcp_dev - needs: - - tezt dependencies: + - oc.docker:ci:amd64 + - tezt + needs: - tezt timeout: 60 minutes before_script: -- GitLab From 83232232403d9d338cb817945231223ec9884dad Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 13:28:55 +0200 Subject: [PATCH 17/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index b2349e4abfc8..eb25ad64880a 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -597,11 +597,11 @@ consolidate_tezt_reports: stage: consolidate tags: - gcp_dev + needs: + - tezt dependencies: - oc.docker:ci:amd64 - tezt - needs: - - tezt timeout: 60 minutes before_script: - . ./scripts/ci/datadog_send_job_info.sh -- GitLab From 0941e22d113fddec9d95cc70ea07cf81d9f99939 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 13:29:16 +0200 Subject: [PATCH 18/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index eb25ad64880a..829b85f59c63 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -598,6 +598,7 @@ consolidate_tezt_reports: tags: - gcp_dev needs: + - oc.docker:ci:amd64 - tezt dependencies: - oc.docker:ci:amd64 -- GitLab From 07d07d9dcc2b1d378930f9d6d76e9df66c40dfd3 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 16:49:50 +0200 Subject: [PATCH 19/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- tezt_analysis/v2/run_tezt_by_group_index.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 829b85f59c63..ba5bfd667223 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -590,7 +590,7 @@ tezt: expire_in: 7 days paths: - tezt_analysis/reports/*.csv - parallel: 3 + parallel: 100 consolidate_tezt_reports: image: ${ci_image_name}/e2etest:${ci_image_tag} diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index 18ec4e052edb..6f4d9fd38980 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -30,8 +30,8 @@ echo "Report will be saved to: $REPORT_OUTPUT" mkdir -p "$(dirname "$REPORT_OUTPUT")" # List tezt tests and filter for the ones that are not disabled -#tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv /ci_disabled) -tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) +tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv /ci_disabled) +#tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) # Compute the total number of tests and the range for this group total_tests=$(echo "${tezt_output}" | grep -v '^$' | wc -l) -- GitLab From 0aad5fa94214b9d470c654119159159ad47fa36c Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 16:50:54 +0200 Subject: [PATCH 20/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index ba5bfd667223..e159dd06d78e 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -590,7 +590,7 @@ tezt: expire_in: 7 days paths: - tezt_analysis/reports/*.csv - parallel: 100 + parallel: 50 consolidate_tezt_reports: image: ${ci_image_name}/e2etest:${ci_image_tag} -- GitLab From c17359c9e73d3a3b1f9936ea3e78e3933972f360 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Sat, 26 Apr 2025 16:51:26 +0200 Subject: [PATCH 21/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index e159dd06d78e..9880eaae6c42 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -590,7 +590,7 @@ tezt: expire_in: 7 days paths: - tezt_analysis/reports/*.csv - parallel: 50 + parallel: 49 consolidate_tezt_reports: image: ${ci_image_name}/e2etest:${ci_image_tag} -- GitLab From edbef0a1d71eec9c7bf24387f619f3eaf898b8c1 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Mon, 28 Apr 2025 12:35:46 +0200 Subject: [PATCH 22/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 50 +++++++++++++++++++-- tezt_analysis/v2/input_tests/tests.txt | 21 +++++++++ tezt_analysis/v2/run_tezt_by_group_index.sh | 41 ++++++++++++++--- 3 files changed, 101 insertions(+), 11 deletions(-) create mode 100644 tezt_analysis/v2/input_tests/tests.txt diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 9880eaae6c42..c30ab1882ec2 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -553,11 +553,53 @@ build_memstat: - _build/default/memstat/main.exe when: always -tezt: +tezt_fixed_list: image: ${ci_image_name}/e2etest:${ci_image_tag} stage: test tags: - gcp_very_high_cpu_dev + rules: + - when: manual + needs: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + dependencies: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + timeout: 7 days + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - sleep 10800 # 3 hours + - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt + variables: + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv + artifacts: + expire_in: 7 days + paths: + - tezt_analysis/reports/*.csv + - tezt_analysis/reports/*.log + +tezt_full: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test + tags: + - gcp_very_high_cpu_dev + rules: + - when: manual needs: - oc.docker:ci:amd64 - select_tezts @@ -581,9 +623,9 @@ tezt: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - #- tezt_analysis/v2/run_tezt.sh #- sleep 10800 # 3 hours - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} + #- tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt variables: REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv artifacts: @@ -599,10 +641,10 @@ consolidate_tezt_reports: - gcp_dev needs: - oc.docker:ci:amd64 - - tezt + - tezt_full dependencies: - oc.docker:ci:amd64 - - tezt + - tezt_full timeout: 60 minutes before_script: - . ./scripts/ci/datadog_send_job_info.sh diff --git a/tezt_analysis/v2/input_tests/tests.txt b/tezt_analysis/v2/input_tests/tests.txt new file mode 100644 index 000000000000..5fecaa87ddfc --- /dev/null +++ b/tezt_analysis/v2/input_tests/tests.txt @@ -0,0 +1,21 @@ +Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (mainnet -> ghostnet) (sequencer, mainnet, without dal, single chain) +Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (mainnet -> ghostnet) (sequencer, mainnet, without dal, multichain) +Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (ghostnet -> latest) (sequencer, ghostnet, without dal, single chain) +Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (ghostnet -> latest) (sequencer, ghostnet, without dal, multichain) +Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, without dal, single chain); +Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, without dal, multichain) +Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, with dal, single chain) +Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, with dal, multichain) +Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s). (mainnet -> ghostnet); +Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s) (mainnet -> latest). +Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s) (ghostnet -> latest). +Alpha: Agnostic baker --keep-alive +Alpha: After kernel upgrade a legacy deposit from delayed inbox can be decoded and processed. (mainnet -> latest) (sequencer, mainnet, without dal, single chain) +Alpha: After kernel upgrade a legacy deposit from delayed inbox can be decoded and processed. (mainnet -> latest) (sequencer, mainnet, without dal, multichain) +Alpha: After kernel upgrade a legacy deposit from delayed inbox can be decoded and processed. (ghostnet -> latest) (sequencer, ghostnet, without dal, single chain) +Alpha: After kernel upgrade a legacy deposit from delayed inbox can be decoded and processed. (ghostnet -> latest) (sequencer, ghostnet, without dal, multichain) +Alpha: --finalized-view returns the latest final block of the sequencer (sequencer, latest, without dal, single chain) +Alpha: --finalized-view returns the latest final block of the sequencer (sequencer, latest, without dal, multichain) +Alpha: --finalized-view forwards transactions to the sequencer without waiting (sequencer, latest, without dal, single chain) +Alpha: --finalized-view forwards transactions to the sequencer without waiting (sequencer, latest, without dal, multichain) +(R022 -> Alpha) constant migration; diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index 6f4d9fd38980..f4f39b79d0f6 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -3,24 +3,26 @@ PARALLEL_INDEX=${1:-1} PARALLEL_TOTAL=${2:-1} REPORT_OUTPUT=$3 +INPUT_TESTS=$4 if ! [[ "$PARALLEL_INDEX" =~ ^[0-9]+$ ]] || ! [[ "$PARALLEL_TOTAL" =~ ^[0-9]+$ ]]; then echo "Error: PARALLEL_INDEX and PARALLEL_TOTAL must be positive integers" - echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT] [INPUT_TESTS]" exit 1 fi if [ "$PARALLEL_INDEX" -lt 1 ] || [ "$PARALLEL_INDEX" -gt "$PARALLEL_TOTAL" ]; then echo "Error: PARALLEL_INDEX must be between 1 and PARALLEL_TOTAL" - echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT] [INPUT_TESTS]" exit 1 fi if [ "$#" -ge 3 ] && [ -z "$REPORT_OUTPUT" ]; then echo "Error: REPORT_OUTPUT parameter was specified but is empty" - echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT]" + echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT] [INPUT_TESTS]" exit 1 fi +fi echo "Running in parallel mode: Processing group $PARALLEL_INDEX of $PARALLEL_TOTAL" @@ -29,9 +31,28 @@ echo "Report will be saved to: $REPORT_OUTPUT" # Create report directory if it doesn't exist mkdir -p "$(dirname "$REPORT_OUTPUT")" -# List tezt tests and filter for the ones that are not disabled -tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv /ci_disabled) -#tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) +# Create report directory if it doesn't exist +mkdir -p "$(dirname "$REPORT_OUTPUT")" + +# Check if INPUT_TESTS is provided and the file exists +full_mode="false" +tezt_output="" +if [ -n "$INPUT_TESTS" ]; then + if [ -f "$INPUT_TESTS" ]; then + echo "Using test list from file: $INPUT_TESTS" + tezt_output=$(cat "$INPUT_TESTS") + else + echo "Error: Input tests file '$INPUT_TESTS' does not exist" + exit 1 + fi +else + # List tezt tests and filter for the ones that are not disabled + echo "Getting test list from tezt command..." + full_mode="true" + # List tezt tests and filter for the ones that are not disabled + tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv /ci_disabled) + #tezt_output=$(_build/default/tezt/tests/main.exe --list-tsv -f basic.ml /ci_disabled) +fi # Compute the total number of tests and the range for this group total_tests=$(echo "${tezt_output}" | grep -v '^$' | wc -l) @@ -62,7 +83,13 @@ echo "${tezt_output}" | while IFS=$'\t' read -r file title rest; do if [ $index -ge $start_index ] && [ $index -le $end_index ]; then percentage=$((group_index * 100 / my_test_count)) echo -e "\nšŸ”„ Processing test #${index}/${total_tests} (${percentage}% of this group): $title ..." - memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) + if [ "$full_mode" = "true" ]; then + memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) + else + report_dir=$(dirname "$REPORT_OUTPUT") + valid_title_as_filename=$(echo "$title" | tr ' ' '_' | tr -d '()/:,."'"'"'\''<>?*|;=' | tr -s '_') + memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) \\--log-file ${report_dir}/${valid_title_as_filename}.log + fi echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} echo -e "Memory peak: ${memory_peak}\n" group_index=$((group_index + 1)) -- GitLab From 6b9c268746cca51a3f6ac2f2e5a90da47032e20a Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Mon, 28 Apr 2025 14:50:10 +0200 Subject: [PATCH 23/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 4 +- tezt_analysis/v2/input_tests/tests.txt | 6 +-- tezt_analysis/v2/run_tezt_by_group_index.sh | 47 ++++++++++++--------- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index c30ab1882ec2..502612a46fb1 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -583,10 +583,10 @@ tezt_fixed_list: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - - sleep 10800 # 3 hours + #- sleep 10800 # 3 hours - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt variables: - REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv artifacts: expire_in: 7 days paths: diff --git a/tezt_analysis/v2/input_tests/tests.txt b/tezt_analysis/v2/input_tests/tests.txt index 5fecaa87ddfc..53e249edd2f1 100644 --- a/tezt_analysis/v2/input_tests/tests.txt +++ b/tezt_analysis/v2/input_tests/tests.txt @@ -2,11 +2,11 @@ Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (mainnet -> Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (mainnet -> ghostnet) (sequencer, mainnet, without dal, multichain) Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (ghostnet -> latest) (sequencer, ghostnet, without dal, single chain) Alpha: Rollup-node kernel upgrade is applied to the sequencer state. (ghostnet -> latest) (sequencer, ghostnet, without dal, multichain) -Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, without dal, single chain); +Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, without dal, single chain) Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, without dal, multichain) Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, with dal, single chain) Alpha: Force kernel upgrade fail too early (latest -> ghostnet) (sequencer, latest, with dal, multichain) -Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s). (mainnet -> ghostnet); +Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s). (mainnet -> ghostnet) Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s) (mainnet -> latest). Alpha: Ensures EVM kernel's upgrade succeeds with potential migration(s) (ghostnet -> latest). Alpha: Agnostic baker --keep-alive @@ -18,4 +18,4 @@ Alpha: --finalized-view returns the latest final block of the sequencer (sequenc Alpha: --finalized-view returns the latest final block of the sequencer (sequencer, latest, without dal, multichain) Alpha: --finalized-view forwards transactions to the sequencer without waiting (sequencer, latest, without dal, single chain) Alpha: --finalized-view forwards transactions to the sequencer without waiting (sequencer, latest, without dal, multichain) -(R022 -> Alpha) constant migration; +(R022 -> Alpha) constant migration diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index f4f39b79d0f6..77fe41b7787f 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -22,7 +22,6 @@ if [ "$#" -ge 3 ] && [ -z "$REPORT_OUTPUT" ]; then echo "Usage: $0 [PARALLEL_INDEX] [PARALLEL_TOTAL] [REPORT_OUTPUT] [INPUT_TESTS]" exit 1 fi -fi echo "Running in parallel mode: Processing group $PARALLEL_INDEX of $PARALLEL_TOTAL" @@ -74,29 +73,37 @@ echo " Processing tests $start_index to $end_index of $total_tests" echo " ($my_test_count tests in this group)" echo "--------------------------------------------------" -# Process only the tests assigned to this group -index=1 -group_index=1 -echo "${tezt_output}" | while IFS=$'\t' read -r file title rest; do - if [ -n "${title}" ]; then # Skip empty lines - # Process only tests that belong to our group - if [ $index -ge $start_index ] && [ $index -le $end_index ]; then - percentage=$((group_index * 100 / my_test_count)) - echo -e "\nšŸ”„ Processing test #${index}/${total_tests} (${percentage}% of this group): $title ..." - if [ "$full_mode" = "true" ]; then +if [ "$full_mode" = "true" ]; then + echo "Running in full mode: All tests will be processed." + index=1 + group_index=1 + echo "${tezt_output}" | while IFS=$'\t' read -r file title rest; do + if [ -n "${title}" ]; then # Skip empty lines + # Process only tests that belong to our group + if [ $index -ge $start_index ] && [ $index -le $end_index ]; then + percentage=$((group_index * 100 / my_test_count)) + echo -e "\nšŸ”„ Processing test #${index}/${total_tests} (${percentage}% of this group): $title ..." memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) - else - report_dir=$(dirname "$REPORT_OUTPUT") - valid_title_as_filename=$(echo "$title" | tr ' ' '_' | tr -d '()/:,."'"'"'\''<>?*|;=' | tr -s '_') - memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) \\--log-file ${report_dir}/${valid_title_as_filename}.log + echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} + echo -e "Memory peak: ${memory_peak}\n" + group_index=$((group_index + 1)) fi - echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} - echo -e "Memory peak: ${memory_peak}\n" - group_index=$((group_index + 1)) + index=$((index + 1)) fi + done +else + echo "Running in partial mode: Only tests from the input file will be processed." + report_dir=$(dirname "$REPORT_OUTPUT") + index=1 + echo "${tezt_output}" | while IFS=$'\t' read -r title; do + valid_title_as_filename=$(echo "$title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') + echo -e "\nšŸ”„ Processing test #${index}: $title ..." + memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${title}" \\--log-file "${report_dir}/${valid_title_as_filename}.log") + echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} + echo -e "Memory peak: ${memory_peak}\n" index=$((index + 1)) - fi -done + done +fi echo "āœ… Tezt memory peak analysis completed for group $PARALLEL_INDEX of $PARALLEL_TOTAL." echo "šŸ“‘ Below is the report of the memory peak for tests in this group:" -- GitLab From 1e9050532476f503d3416580a52849aee2526b27 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Mon, 28 Apr 2025 15:03:49 +0200 Subject: [PATCH 24/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 502612a46fb1..349824c8e52e 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -583,7 +583,7 @@ tezt_fixed_list: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - #- sleep 10800 # 3 hours + - sleep 10800 # 3 hours - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt variables: REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv -- GitLab From 15e5171966932476aa06438d85cfabb280974adb Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Mon, 28 Apr 2025 15:38:21 +0200 Subject: [PATCH 25/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 90 +++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 349824c8e52e..629743dde47a 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -553,6 +553,96 @@ build_memstat: - _build/default/memstat/main.exe when: always +tezt_official: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test + tags: + - gcp_tezt_dev + rules: + - changes: + - .gitlab-ci.yml + - .gitlab/**/* + - CHANGES.rst + - LICENSES/**/* + - Makefile + - brassaia-eio/**/* + - brassaia/**/* + - cohttp/**/* + - data-encoding/**/* + - dune + - dune-project + - dune-workspace + - etherlink/**/* + - irmin/**/* + - michelson_test_scripts/**/* + - opam/**/* + - opentelemetry/**/* + - prometheus/**/* + - resto/**/* + - rust-toolchain + - script-inputs/**/* + - scripts/**/* + - sdk/**/* + - src/**/* + - tezt/**/* + - tzt_reference_test_suite/**/* + when: on_success + needs: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + dependencies: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + timeout: 40 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" + CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" + - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records + --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv + - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit + --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log + --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record + tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json + --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} + - ./scripts/ci/merge_coverage.sh + variables: + JUNIT: tezt-junit.xml + TEZT_VARIANT: "" + TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && + /cloud && /flaky + TEZT_RETRY: "1" + TEZT_PARALLEL: "3" + TEZT_NO_NPX: "true" + BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ + artifacts: + name: coverage-files-$CI_JOB_ID + expire_in: 7 days + paths: + - selected_tezts.tsv + - tezt.log + - tezt-*.log + - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json + - $JUNIT + - $BISECT_FILE/$CI_JOB_NAME_SLUG.* + reports: + junit: $JUNIT + when: always + retry: 2 + parallel: 100 + tezt_fixed_list: image: ${ci_image_name}/e2etest:${ci_image_tag} stage: test -- GitLab From 37f8f65a1687d72413603ff320c4774154edb640 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 29 Apr 2025 12:12:01 +0200 Subject: [PATCH 26/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 42 ++++++++++++++++++++++++- tezt_analysis/v2/run_experimental.sh | 21 +++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100755 tezt_analysis/v2/run_experimental.sh diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 629743dde47a..e14a00560408 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -673,7 +673,6 @@ tezt_fixed_list: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - - sleep 10800 # 3 hours - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt variables: REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv @@ -683,6 +682,47 @@ tezt_fixed_list: - tezt_analysis/reports/*.csv - tezt_analysis/reports/*.log +tezt_experimental: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test + tags: + - gcp_tezt_dev + rules: + - when: manual + needs: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + dependencies: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + timeout: 7 days + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - sleep 10800 # 3 hours + - tezt_analysis/v2/run_experimental.sh + variables: + REPORT_FOLDER: tezt_analysis/reports + artifacts: + expire_in: 7 days + paths: + - tezt_analysis/reports/*.csv + - tezt_analysis/reports/*.log + + tezt_full: image: ${ci_image_name}/e2etest:${ci_image_tag} stage: test diff --git a/tezt_analysis/v2/run_experimental.sh b/tezt_analysis/v2/run_experimental.sh new file mode 100755 index 000000000000..74ee507eb44a --- /dev/null +++ b/tezt_analysis/v2/run_experimental.sh @@ -0,0 +1,21 @@ +#!/bin/sh + + +if [ -z "${REPORT_FOLDER}" ]; then + echo "Error: REPORT_FOLDER environment variable is not set or is empty" + echo "Usage: REPORT_FOLDER=path/to/folder $0" + exit 1 +fi + +mkdir -p ${REPORT_FOLDER} + +test_title='Alpha: Sequencer produces an empty block in case of upgrade. (sequencer, latest, without dal, single chain)' + +# without log_file +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) +echo -e "Memory peak (Without log_file): ${memory_peak}\n" + +# with log_file +valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") +echo -e "Memory peak (With log_file): ${memory_peak}\n" \ No newline at end of file -- GitLab From b6974096022e6303dc371f60742a680822f2ef6b Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 29 Apr 2025 14:06:10 +0200 Subject: [PATCH 27/35] CI: WIP --- tezt_analysis/v2/run_experimental.sh | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tezt_analysis/v2/run_experimental.sh b/tezt_analysis/v2/run_experimental.sh index 74ee507eb44a..6fb92fddb4b0 100755 --- a/tezt_analysis/v2/run_experimental.sh +++ b/tezt_analysis/v2/run_experimental.sh @@ -15,6 +15,51 @@ test_title='Alpha: Sequencer produces an empty block in case of upgrade. (sequen memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) echo -e "Memory peak (Without log_file): ${memory_peak}\n" +# with log_file +valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") +echo -e "Memory peak (With log_file): ${memory_peak}\n" + +# with log_file +valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") +echo -e "Memory peak (With log_file): ${memory_peak}\n" + +# without log_file +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) +echo -e "Memory peak (Without log_file): ${memory_peak}\n" + +# without log_file +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) +echo -e "Memory peak (Without log_file): ${memory_peak}\n" + +# with log_file +valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") +echo -e "Memory peak (With log_file): ${memory_peak}\n" + +# without log_file +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) +echo -e "Memory peak (Without log_file): ${memory_peak}\n" + +# with log_file +valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") +echo -e "Memory peak (With log_file): ${memory_peak}\n" + +# with log_file +valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") +echo -e "Memory peak (With log_file): ${memory_peak}\n" + +# without log_file +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) +echo -e "Memory peak (Without log_file): ${memory_peak}\n" + +# without log_file +memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) +echo -e "Memory peak (Without log_file): ${memory_peak}\n" + # with log_file valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -- GitLab From 48e33cd0873d8ebc9807dbe9508cbb1986b10b97 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 29 Apr 2025 14:07:12 +0200 Subject: [PATCH 28/35] Feat: WIP --- .gitlab/ci/pipelines/before_merging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index e14a00560408..aec6dbf12065 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -712,7 +712,7 @@ tezt_experimental: - . ./scripts/ci/datadog_send_job_info.sh - . ./scripts/version.sh script: - - sleep 10800 # 3 hours + #- sleep 10800 # 3 hours - tezt_analysis/v2/run_experimental.sh variables: REPORT_FOLDER: tezt_analysis/reports -- GitLab From 2ecf00547ebbcfc095ef20ea5c93dfaa1ceb7406 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 29 Apr 2025 14:51:24 +0200 Subject: [PATCH 29/35] memstat -rv to see the details --- tezt_analysis/v2/run_experimental.sh | 55 +++------------------------- 1 file changed, 6 insertions(+), 49 deletions(-) diff --git a/tezt_analysis/v2/run_experimental.sh b/tezt_analysis/v2/run_experimental.sh index 6fb92fddb4b0..2cee8b701fcc 100755 --- a/tezt_analysis/v2/run_experimental.sh +++ b/tezt_analysis/v2/run_experimental.sh @@ -12,55 +12,12 @@ mkdir -p ${REPORT_FOLDER} test_title='Alpha: Sequencer produces an empty block in case of upgrade. (sequencer, latest, without dal, single chain)' # without log_file -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) -echo -e "Memory peak (Without log_file): ${memory_peak}\n" +echo "------------- WITHOUT --log-file ---------------" +_build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t \\${test_title}) # with log_file +echo "------------- WITH --log-file ---------------" valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -echo -e "Memory peak (With log_file): ${memory_peak}\n" - -# with log_file -valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -echo -e "Memory peak (With log_file): ${memory_peak}\n" - -# without log_file -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) -echo -e "Memory peak (Without log_file): ${memory_peak}\n" - -# without log_file -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) -echo -e "Memory peak (Without log_file): ${memory_peak}\n" - -# with log_file -valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -echo -e "Memory peak (With log_file): ${memory_peak}\n" - -# without log_file -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) -echo -e "Memory peak (Without log_file): ${memory_peak}\n" - -# with log_file -valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -echo -e "Memory peak (With log_file): ${memory_peak}\n" - -# with log_file -valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -echo -e "Memory peak (With log_file): ${memory_peak}\n" - -# without log_file -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) -echo -e "Memory peak (Without log_file): ${memory_peak}\n" - -# without log_file -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${test_title}) -echo -e "Memory peak (Without log_file): ${memory_peak}\n" - -# with log_file -valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log") -echo -e "Memory peak (With log_file): ${memory_peak}\n" \ No newline at end of file +_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log" +echo "-------------- cat $valid_title_as_filename -------------" +cat "$valid_title_as_filename" -- GitLab From 1798361e504d0259790081ac517f4870f005f747 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 29 Apr 2025 15:05:20 +0200 Subject: [PATCH 30/35] fix second test --- tezt_analysis/v2/run_experimental.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tezt_analysis/v2/run_experimental.sh b/tezt_analysis/v2/run_experimental.sh index 2cee8b701fcc..26df7a89c6bb 100755 --- a/tezt_analysis/v2/run_experimental.sh +++ b/tezt_analysis/v2/run_experimental.sh @@ -18,6 +18,7 @@ _build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t # with log_file echo "------------- WITH --log-file ---------------" valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') -_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "${REPORT_FOLDER}/${valid_title_as_filename}.log" -echo "-------------- cat $valid_title_as_filename -------------" -cat "$valid_title_as_filename" +log_file="${REPORT_FOLDER}/${valid_title_as_filename}.log" +_build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "$log_file" +echo "-------------- cat $log_file -------------" +cat "$log_file" -- GitLab From 2e75c9344ea888a505511d0ef067ef23f7fc0962 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 29 Apr 2025 15:09:37 +0200 Subject: [PATCH 31/35] disable tezt jobs other than tezt-experimental --- .gitlab/ci/pipelines/before_merging.yml | 382 ++++++++++++------------ 1 file changed, 191 insertions(+), 191 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index aec6dbf12065..80327215d051 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -553,134 +553,134 @@ build_memstat: - _build/default/memstat/main.exe when: always -tezt_official: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_tezt_dev - rules: - - changes: - - .gitlab-ci.yml - - .gitlab/**/* - - CHANGES.rst - - LICENSES/**/* - - Makefile - - brassaia-eio/**/* - - brassaia/**/* - - cohttp/**/* - - data-encoding/**/* - - dune - - dune-project - - dune-workspace - - etherlink/**/* - - irmin/**/* - - michelson_test_scripts/**/* - - opam/**/* - - opentelemetry/**/* - - prometheus/**/* - - resto/**/* - - rust-toolchain - - script-inputs/**/* - - scripts/**/* - - sdk/**/* - - src/**/* - - tezt/**/* - - tzt_reference_test_suite/**/* - when: on_success - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - timeout: 40 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" - CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" - - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records - --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv - - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit - --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log - --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record - tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} - - ./scripts/ci/merge_coverage.sh - variables: - JUNIT: tezt-junit.xml - TEZT_VARIANT: "" - TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && - /cloud && /flaky - TEZT_RETRY: "1" - TEZT_PARALLEL: "3" - TEZT_NO_NPX: "true" - BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ - artifacts: - name: coverage-files-$CI_JOB_ID - expire_in: 7 days - paths: - - selected_tezts.tsv - - tezt.log - - tezt-*.log - - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json - - $JUNIT - - $BISECT_FILE/$CI_JOB_NAME_SLUG.* - reports: - junit: $JUNIT - when: always - retry: 2 - parallel: 100 +# tezt_official: +# image: ${ci_image_name}/e2etest:${ci_image_tag} +# stage: test +# tags: +# - gcp_tezt_dev +# rules: +# - changes: +# - .gitlab-ci.yml +# - .gitlab/**/* +# - CHANGES.rst +# - LICENSES/**/* +# - Makefile +# - brassaia-eio/**/* +# - brassaia/**/* +# - cohttp/**/* +# - data-encoding/**/* +# - dune +# - dune-project +# - dune-workspace +# - etherlink/**/* +# - irmin/**/* +# - michelson_test_scripts/**/* +# - opam/**/* +# - opentelemetry/**/* +# - prometheus/**/* +# - resto/**/* +# - rust-toolchain +# - script-inputs/**/* +# - scripts/**/* +# - sdk/**/* +# - src/**/* +# - tezt/**/* +# - tzt_reference_test_suite/**/* +# when: on_success +# needs: +# - oc.docker:ci:amd64 +# - select_tezts +# - oc.build_x86_64-released +# - oc.build_x86_64-exp-dev-extra +# - oc.build_kernels +# - oc.build_dsn_node +# - oc.tezt:fetch-records +# dependencies: +# - oc.docker:ci:amd64 +# - select_tezts +# - oc.build_x86_64-released +# - oc.build_x86_64-exp-dev-extra +# - oc.build_kernels +# - oc.build_dsn_node +# - oc.tezt:fetch-records +# timeout: 40 minutes +# before_script: +# - . ./scripts/ci/datadog_send_job_info.sh +# - . ./scripts/version.sh +# script: +# - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" +# CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" +# - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records +# --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv +# - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit +# --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log +# --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record +# tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json +# --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} +# - ./scripts/ci/merge_coverage.sh +# variables: +# JUNIT: tezt-junit.xml +# TEZT_VARIANT: "" +# TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && +# /cloud && /flaky +# TEZT_RETRY: "1" +# TEZT_PARALLEL: "3" +# TEZT_NO_NPX: "true" +# BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ +# artifacts: +# name: coverage-files-$CI_JOB_ID +# expire_in: 7 days +# paths: +# - selected_tezts.tsv +# - tezt.log +# - tezt-*.log +# - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json +# - $JUNIT +# - $BISECT_FILE/$CI_JOB_NAME_SLUG.* +# reports: +# junit: $JUNIT +# when: always +# retry: 2 +# parallel: 100 -tezt_fixed_list: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_very_high_cpu_dev - rules: - - when: manual - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - - build_memstat - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - - build_memstat - timeout: 7 days - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt - variables: - REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv - artifacts: - expire_in: 7 days - paths: - - tezt_analysis/reports/*.csv - - tezt_analysis/reports/*.log +# tezt_fixed_list: +# image: ${ci_image_name}/e2etest:${ci_image_tag} +# stage: test +# tags: +# - gcp_very_high_cpu_dev +# rules: +# - when: manual +# needs: +# - oc.docker:ci:amd64 +# - select_tezts +# - oc.build_x86_64-released +# - oc.build_x86_64-exp-dev-extra +# - oc.build_kernels +# - oc.build_dsn_node +# - oc.tezt:fetch-records +# - build_memstat +# dependencies: +# - oc.docker:ci:amd64 +# - select_tezts +# - oc.build_x86_64-released +# - oc.build_x86_64-exp-dev-extra +# - oc.build_kernels +# - oc.build_dsn_node +# - oc.tezt:fetch-records +# - build_memstat +# timeout: 7 days +# before_script: +# - . ./scripts/ci/datadog_send_job_info.sh +# - . ./scripts/version.sh +# script: +# - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt +# variables: +# REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv +# artifacts: +# expire_in: 7 days +# paths: +# - tezt_analysis/reports/*.csv +# - tezt_analysis/reports/*.log tezt_experimental: image: ${ci_image_name}/e2etest:${ci_image_tag} @@ -723,68 +723,68 @@ tezt_experimental: - tezt_analysis/reports/*.log -tezt_full: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: test - tags: - - gcp_very_high_cpu_dev - rules: - - when: manual - needs: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - - build_memstat - dependencies: - - oc.docker:ci:amd64 - - select_tezts - - oc.build_x86_64-released - - oc.build_x86_64-exp-dev-extra - - oc.build_kernels - - oc.build_dsn_node - - oc.tezt:fetch-records - - build_memstat - timeout: 7 days - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - #- sleep 10800 # 3 hours - - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} - #- tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt - variables: - REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv - artifacts: - expire_in: 7 days - paths: - - tezt_analysis/reports/*.csv - parallel: 49 +# tezt_full: +# image: ${ci_image_name}/e2etest:${ci_image_tag} +# stage: test +# tags: +# - gcp_very_high_cpu_dev +# rules: +# - when: manual +# needs: +# - oc.docker:ci:amd64 +# - select_tezts +# - oc.build_x86_64-released +# - oc.build_x86_64-exp-dev-extra +# - oc.build_kernels +# - oc.build_dsn_node +# - oc.tezt:fetch-records +# - build_memstat +# dependencies: +# - oc.docker:ci:amd64 +# - select_tezts +# - oc.build_x86_64-released +# - oc.build_x86_64-exp-dev-extra +# - oc.build_kernels +# - oc.build_dsn_node +# - oc.tezt:fetch-records +# - build_memstat +# timeout: 7 days +# before_script: +# - . ./scripts/ci/datadog_send_job_info.sh +# - . ./scripts/version.sh +# script: +# #- sleep 10800 # 3 hours +# - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} +# #- tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt +# variables: +# REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv +# artifacts: +# expire_in: 7 days +# paths: +# - tezt_analysis/reports/*.csv +# parallel: 49 -consolidate_tezt_reports: - image: ${ci_image_name}/e2etest:${ci_image_tag} - stage: consolidate - tags: - - gcp_dev - needs: - - oc.docker:ci:amd64 - - tezt_full - dependencies: - - oc.docker:ci:amd64 - - tezt_full - timeout: 60 minutes - before_script: - - . ./scripts/ci/datadog_send_job_info.sh - - . ./scripts/version.sh - script: - - tezt_analysis/v2/consolidate_tezt_reports.sh ${REPORT_OUTPUT} - variables: - REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv - artifacts: - expire_in: 7 days - paths: - - tezt_analysis/reports/memory_stats_merged.csv - - tezt_analysis/reports/memory_stats_sorted.csv +# consolidate_tezt_reports: +# image: ${ci_image_name}/e2etest:${ci_image_tag} +# stage: consolidate +# tags: +# - gcp_dev +# needs: +# - oc.docker:ci:amd64 +# - tezt_full +# dependencies: +# - oc.docker:ci:amd64 +# - tezt_full +# timeout: 60 minutes +# before_script: +# - . ./scripts/ci/datadog_send_job_info.sh +# - . ./scripts/version.sh +# script: +# - tezt_analysis/v2/consolidate_tezt_reports.sh ${REPORT_OUTPUT} +# variables: +# REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv +# artifacts: +# expire_in: 7 days +# paths: +# - tezt_analysis/reports/memory_stats_merged.csv +# - tezt_analysis/reports/memory_stats_sorted.csv -- GitLab From 0f21a0e41686a6a6df966da8f6e8816625543c50 Mon Sep 17 00:00:00 2001 From: Romain Date: Tue, 29 Apr 2025 15:11:28 +0200 Subject: [PATCH 32/35] fix parenthesis --- tezt_analysis/v2/run_experimental.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tezt_analysis/v2/run_experimental.sh b/tezt_analysis/v2/run_experimental.sh index 26df7a89c6bb..2d51287f6b0e 100755 --- a/tezt_analysis/v2/run_experimental.sh +++ b/tezt_analysis/v2/run_experimental.sh @@ -13,12 +13,12 @@ test_title='Alpha: Sequencer produces an empty block in case of upgrade. (sequen # without log_file echo "------------- WITHOUT --log-file ---------------" -_build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t \\${test_title}) +_build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t \\"${test_title}" # with log_file echo "------------- WITH --log-file ---------------" valid_title_as_filename=$(echo "$test_title" | tr -c 'a-zA-Z0-9_' '_' | tr -s '_') log_file="${REPORT_FOLDER}/${valid_title_as_filename}.log" -_build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t "${test_title}" \\--log-file "$log_file" +_build/default/memstat/main.exe run -rv _build/default/tezt/tests/main.exe \\-t \\"${test_title}" \\--log-file "$log_file" echo "-------------- cat $log_file -------------" cat "$log_file" -- GitLab From 6638780d202d6dfb81f510d4557e2a4b30fa50f5 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 29 Apr 2025 15:57:41 +0200 Subject: [PATCH 33/35] Revert "disable tezt jobs other than tezt-experimental" This reverts commit 2e75c9344ea888a505511d0ef067ef23f7fc0962. --- .gitlab/ci/pipelines/before_merging.yml | 382 ++++++++++++------------ 1 file changed, 191 insertions(+), 191 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 80327215d051..aec6dbf12065 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -553,134 +553,134 @@ build_memstat: - _build/default/memstat/main.exe when: always -# tezt_official: -# image: ${ci_image_name}/e2etest:${ci_image_tag} -# stage: test -# tags: -# - gcp_tezt_dev -# rules: -# - changes: -# - .gitlab-ci.yml -# - .gitlab/**/* -# - CHANGES.rst -# - LICENSES/**/* -# - Makefile -# - brassaia-eio/**/* -# - brassaia/**/* -# - cohttp/**/* -# - data-encoding/**/* -# - dune -# - dune-project -# - dune-workspace -# - etherlink/**/* -# - irmin/**/* -# - michelson_test_scripts/**/* -# - opam/**/* -# - opentelemetry/**/* -# - prometheus/**/* -# - resto/**/* -# - rust-toolchain -# - script-inputs/**/* -# - scripts/**/* -# - sdk/**/* -# - src/**/* -# - tezt/**/* -# - tzt_reference_test_suite/**/* -# when: on_success -# needs: -# - oc.docker:ci:amd64 -# - select_tezts -# - oc.build_x86_64-released -# - oc.build_x86_64-exp-dev-extra -# - oc.build_kernels -# - oc.build_dsn_node -# - oc.tezt:fetch-records -# dependencies: -# - oc.docker:ci:amd64 -# - select_tezts -# - oc.build_x86_64-released -# - oc.build_x86_64-exp-dev-extra -# - oc.build_kernels -# - oc.build_dsn_node -# - oc.tezt:fetch-records -# timeout: 40 minutes -# before_script: -# - . ./scripts/ci/datadog_send_job_info.sh -# - . ./scripts/version.sh -# script: -# - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" -# CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" -# - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records -# --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv -# - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit -# --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log -# --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record -# tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json -# --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} -# - ./scripts/ci/merge_coverage.sh -# variables: -# JUNIT: tezt-junit.xml -# TEZT_VARIANT: "" -# TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && -# /cloud && /flaky -# TEZT_RETRY: "1" -# TEZT_PARALLEL: "3" -# TEZT_NO_NPX: "true" -# BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ -# artifacts: -# name: coverage-files-$CI_JOB_ID -# expire_in: 7 days -# paths: -# - selected_tezts.tsv -# - tezt.log -# - tezt-*.log -# - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json -# - $JUNIT -# - $BISECT_FILE/$CI_JOB_NAME_SLUG.* -# reports: -# junit: $JUNIT -# when: always -# retry: 2 -# parallel: 100 +tezt_official: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test + tags: + - gcp_tezt_dev + rules: + - changes: + - .gitlab-ci.yml + - .gitlab/**/* + - CHANGES.rst + - LICENSES/**/* + - Makefile + - brassaia-eio/**/* + - brassaia/**/* + - cohttp/**/* + - data-encoding/**/* + - dune + - dune-project + - dune-workspace + - etherlink/**/* + - irmin/**/* + - michelson_test_scripts/**/* + - opam/**/* + - opentelemetry/**/* + - prometheus/**/* + - resto/**/* + - rust-toolchain + - script-inputs/**/* + - scripts/**/* + - sdk/**/* + - src/**/* + - tezt/**/* + - tzt_reference_test_suite/**/* + when: on_success + needs: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + dependencies: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + timeout: 40 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - echo "TESTS=\"${TESTS}\" JUNIT=\"${JUNIT}\" CI_NODE_INDEX=\"${CI_NODE_INDEX}\" + CI_NODE_TOTAL=\"${CI_NODE_TOTAL}\" TEZT_PARALLEL=\"${TEZT_PARALLEL}\" TEZT_VARIANT=\"${TEZT_VARIANT}\"" + - ./scripts/ci/tezt.sh --with-select-tezts "${TESTS}" --from-record tezt/records + --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --list-tsv > selected_tezts.tsv + - ./scripts/ci/exit_code.sh timeout -k 60 1860 ./scripts/ci/tezt.sh --send-junit + --with-select-tezts "${TESTS}" --color --log-buffer-size 5000 --log-file tezt.log + --global-timeout 1800 --on-unknown-regression-files fail --junit ${JUNIT} --from-record + tezt/records --job ${CI_NODE_INDEX:-1}/${CI_NODE_TOTAL:-1} --record tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json + --job-count ${TEZT_PARALLEL} --retry ${TEZT_RETRY} + - ./scripts/ci/merge_coverage.sh + variables: + JUNIT: tezt-junit.xml + TEZT_VARIANT: "" + TESTS: /ci_disabled && /memory_3k && /memory_4k && /time_sensitive && /slow && + /cloud && /flaky + TEZT_RETRY: "1" + TEZT_PARALLEL: "3" + TEZT_NO_NPX: "true" + BISECT_FILE: $CI_PROJECT_DIR/_coverage_output/ + artifacts: + name: coverage-files-$CI_JOB_ID + expire_in: 7 days + paths: + - selected_tezts.tsv + - tezt.log + - tezt-*.log + - tezt-results-${CI_NODE_INDEX:-1}${TEZT_VARIANT}.json + - $JUNIT + - $BISECT_FILE/$CI_JOB_NAME_SLUG.* + reports: + junit: $JUNIT + when: always + retry: 2 + parallel: 100 -# tezt_fixed_list: -# image: ${ci_image_name}/e2etest:${ci_image_tag} -# stage: test -# tags: -# - gcp_very_high_cpu_dev -# rules: -# - when: manual -# needs: -# - oc.docker:ci:amd64 -# - select_tezts -# - oc.build_x86_64-released -# - oc.build_x86_64-exp-dev-extra -# - oc.build_kernels -# - oc.build_dsn_node -# - oc.tezt:fetch-records -# - build_memstat -# dependencies: -# - oc.docker:ci:amd64 -# - select_tezts -# - oc.build_x86_64-released -# - oc.build_x86_64-exp-dev-extra -# - oc.build_kernels -# - oc.build_dsn_node -# - oc.tezt:fetch-records -# - build_memstat -# timeout: 7 days -# before_script: -# - . ./scripts/ci/datadog_send_job_info.sh -# - . ./scripts/version.sh -# script: -# - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt -# variables: -# REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv -# artifacts: -# expire_in: 7 days -# paths: -# - tezt_analysis/reports/*.csv -# - tezt_analysis/reports/*.log +tezt_fixed_list: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test + tags: + - gcp_very_high_cpu_dev + rules: + - when: manual + needs: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + dependencies: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + timeout: 7 days + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - tezt_analysis/v2/run_tezt_by_group_index.sh 1 1 ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt + variables: + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_fixed.csv + artifacts: + expire_in: 7 days + paths: + - tezt_analysis/reports/*.csv + - tezt_analysis/reports/*.log tezt_experimental: image: ${ci_image_name}/e2etest:${ci_image_tag} @@ -723,68 +723,68 @@ tezt_experimental: - tezt_analysis/reports/*.log -# tezt_full: -# image: ${ci_image_name}/e2etest:${ci_image_tag} -# stage: test -# tags: -# - gcp_very_high_cpu_dev -# rules: -# - when: manual -# needs: -# - oc.docker:ci:amd64 -# - select_tezts -# - oc.build_x86_64-released -# - oc.build_x86_64-exp-dev-extra -# - oc.build_kernels -# - oc.build_dsn_node -# - oc.tezt:fetch-records -# - build_memstat -# dependencies: -# - oc.docker:ci:amd64 -# - select_tezts -# - oc.build_x86_64-released -# - oc.build_x86_64-exp-dev-extra -# - oc.build_kernels -# - oc.build_dsn_node -# - oc.tezt:fetch-records -# - build_memstat -# timeout: 7 days -# before_script: -# - . ./scripts/ci/datadog_send_job_info.sh -# - . ./scripts/version.sh -# script: -# #- sleep 10800 # 3 hours -# - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} -# #- tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt -# variables: -# REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv -# artifacts: -# expire_in: 7 days -# paths: -# - tezt_analysis/reports/*.csv -# parallel: 49 +tezt_full: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: test + tags: + - gcp_very_high_cpu_dev + rules: + - when: manual + needs: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + dependencies: + - oc.docker:ci:amd64 + - select_tezts + - oc.build_x86_64-released + - oc.build_x86_64-exp-dev-extra + - oc.build_kernels + - oc.build_dsn_node + - oc.tezt:fetch-records + - build_memstat + timeout: 7 days + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + #- sleep 10800 # 3 hours + - tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} + #- tezt_analysis/v2/run_tezt_by_group_index.sh ${CI_NODE_INDEX} ${CI_NODE_TOTAL} ${REPORT_OUTPUT} tezt_analysis/v2/input_tests/tests.txt + variables: + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv + artifacts: + expire_in: 7 days + paths: + - tezt_analysis/reports/*.csv + parallel: 49 -# consolidate_tezt_reports: -# image: ${ci_image_name}/e2etest:${ci_image_tag} -# stage: consolidate -# tags: -# - gcp_dev -# needs: -# - oc.docker:ci:amd64 -# - tezt_full -# dependencies: -# - oc.docker:ci:amd64 -# - tezt_full -# timeout: 60 minutes -# before_script: -# - . ./scripts/ci/datadog_send_job_info.sh -# - . ./scripts/version.sh -# script: -# - tezt_analysis/v2/consolidate_tezt_reports.sh ${REPORT_OUTPUT} -# variables: -# REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv -# artifacts: -# expire_in: 7 days -# paths: -# - tezt_analysis/reports/memory_stats_merged.csv -# - tezt_analysis/reports/memory_stats_sorted.csv +consolidate_tezt_reports: + image: ${ci_image_name}/e2etest:${ci_image_tag} + stage: consolidate + tags: + - gcp_dev + needs: + - oc.docker:ci:amd64 + - tezt_full + dependencies: + - oc.docker:ci:amd64 + - tezt_full + timeout: 60 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - . ./scripts/version.sh + script: + - tezt_analysis/v2/consolidate_tezt_reports.sh ${REPORT_OUTPUT} + variables: + REPORT_OUTPUT: tezt_analysis/reports/memory_stats_part_${CI_NODE_INDEX}_of_${CI_NODE_TOTAL}.csv + artifacts: + expire_in: 7 days + paths: + - tezt_analysis/reports/memory_stats_merged.csv + - tezt_analysis/reports/memory_stats_sorted.csv -- GitLab From 701a8f335ca4e8bb9e7de2a460d4637b66d270a2 Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 29 Apr 2025 16:21:34 +0200 Subject: [PATCH 34/35] CI: WIP --- tezt_analysis/v2/run_tezt_by_group_index.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tezt_analysis/v2/run_tezt_by_group_index.sh b/tezt_analysis/v2/run_tezt_by_group_index.sh index 77fe41b7787f..42019e4d5547 100755 --- a/tezt_analysis/v2/run_tezt_by_group_index.sh +++ b/tezt_analysis/v2/run_tezt_by_group_index.sh @@ -83,7 +83,7 @@ if [ "$full_mode" = "true" ]; then if [ $index -ge $start_index ] && [ $index -le $end_index ]; then percentage=$((group_index * 100 / my_test_count)) echo -e "\nšŸ”„ Processing test #${index}/${total_tests} (${percentage}% of this group): $title ..." - memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\${title}) + memory_peak=$(_build/default/memstat/main.exe run -r --bytes --only-peak _build/default/tezt/tests/main.exe \\-t \\"${title}") echo "${title};${memory_peak}" >> ${REPORT_OUTPUT} echo -e "Memory peak: ${memory_peak}\n" group_index=$((group_index + 1)) -- GitLab From 79b0253ce83b73a65c9c89375591831f9fd2493f Mon Sep 17 00:00:00 2001 From: Neo <11726174-neo.nomadic@users.noreply.gitlab.com> Date: Tue, 29 Apr 2025 16:39:56 +0200 Subject: [PATCH 35/35] CI: WIP --- .gitlab/ci/pipelines/before_merging.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index aec6dbf12065..3860b660ed2c 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -728,8 +728,8 @@ tezt_full: stage: test tags: - gcp_very_high_cpu_dev - rules: - - when: manual + #rules: + #- when: manual needs: - oc.docker:ci:amd64 - select_tezts -- GitLab