From 0c20f901b8a65680dbd860115109ba9ad91c23c1 Mon Sep 17 00:00:00 2001 From: Philippe Wang Date: Thu, 14 Dec 2023 18:55:21 -0800 Subject: [PATCH 1/2] CI: make octez jobs depend on octez modifications --- .gitlab/ci/jobs/build/arm64.yml | 7 ++- .gitlab/ci/jobs/build/check.yml | 9 ++++ .gitlab/ci/jobs/build/common.yml | 25 ++++++++++- .../jobs/build/docker_amd64_test_manual.yml | 4 +- .../jobs/build/docker_arm64_test_manual.yml | 4 +- .gitlab/ci/jobs/build/get_contracts.yml | 8 ++++ .gitlab/ci/jobs/build/tezt_fetch_records.yml | 1 + .gitlab/ci/jobs/build/x86_64.yml | 10 +++++ .gitlab/ci/jobs/coverage/coverage.yml | 8 +++- .gitlab/ci/jobs/doc/build_all.yml | 1 + .gitlab/ci/jobs/doc/publish.yml | 1 + .../docker_merge_manifests_release.yml | 7 +++ .../docker_merge_manifests_test.yml | 7 +++ .gitlab/ci/jobs/shared/templates.yml | 43 +++++++++++++++++++ .gitlab/ci/jobs/test/check_precommit_hook.yml | 7 +++ .gitlab/ci/jobs/test/check_scripts.yml | 19 +++++++- .gitlab/ci/jobs/test/common.yml | 5 ++- .gitlab/ci/jobs/test/kernels.yml | 2 + .../liquidity_baking_scripts-integrity.yml | 9 ++++ .gitlab/ci/jobs/test/misc_checks.yml | 29 +++++++++++++ .gitlab/ci/jobs/test/semgrep.yml | 10 +++++ .gitlab/ci/jobs/test/tezt.yml | 1 + .gitlab/ci/jobs/test/tezt_build_long.yml | 1 + .gitlab/ci/jobs/test/unit.yml | 4 +- 24 files changed, 213 insertions(+), 9 deletions(-) diff --git a/.gitlab/ci/jobs/build/arm64.yml b/.gitlab/ci/jobs/build/arm64.yml index 0d0fec8fbe88..8bee563d7d46 100644 --- a/.gitlab/ci/jobs/build/arm64.yml +++ b/.gitlab/ci/jobs/build/arm64.yml @@ -14,7 +14,12 @@ include: .gitlab/ci/jobs/build/common.yml # Run when there is label on the merge request - if: '$CI_MERGE_REQUEST_LABELS =~ /(?:^|[,])ci--arm64(?:$|[,])/' when: on_success - - when: manual + - changes: + paths: + - src/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: manual allow_failure: true # The build_arm64 jobs are split in two to keep the artifact size diff --git a/.gitlab/ci/jobs/build/check.yml b/.gitlab/ci/jobs/build/check.yml index 840fa7827c88..8f6b54f6e2a9 100644 --- a/.gitlab/ci/jobs/build/check.yml +++ b/.gitlab/ci/jobs/build/check.yml @@ -3,5 +3,14 @@ ocaml-check: - .tags_template__build - .build needs: [trigger] + rules: + - changes: + paths: + - src/**/* + - tezt/**/* + - .gitlab/**/* + - .gitlab-ci.yml + - devtools/**/* + when: on_success script: - dune build @check diff --git a/.gitlab/ci/jobs/build/common.yml b/.gitlab/ci/jobs/build/common.yml index 4547fda685ed..ab1b19a3a380 100644 --- a/.gitlab/ci/jobs/build/common.yml +++ b/.gitlab/ci/jobs/build/common.yml @@ -1,5 +1,7 @@ .build: - extends: .build_template + extends: + - .build_template + - .rules__octez_changes variables: ARCH: "" # We fix the value of GIT_{SHORTREF,DATETIME,VERSION} (these are @@ -28,6 +30,7 @@ extends: - .default_settings_template - .image_template__runtime_build_dependencies + - .rules__octez_changes stage: build variables: ARCH: "" @@ -45,5 +48,25 @@ variables: DOCKER_BUILD_TARGET: "without-evm-artifacts" IMAGE_ARCH_PREFIX: "" + rules: + - if: '$CI_COMMIT_BRANCH == "master"' + when: on_success + - changes: + - scripts/**/* + - script-inputs/**/* + - src/**/* + - tezt/**/* + - vendors/**/* + - dune + - dune-project + - dune-workspace + - opam + - Makefile + - kernels.mk + - build.Dockerfile + - Dockerfile + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success script: - ./scripts/ci/docker_release.sh diff --git a/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml b/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml index 4d844c0230db..da44b9a3bacf 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml @@ -5,7 +5,9 @@ docker:amd64: - .build_docker_release_template stage: manual needs: [] - when: manual + # override the rules inherited from .build_docker_release_template: + rules: + - when: manual variables: DOCKER_BUILD_TARGET: "with-evm-artifacts" IMAGE_ARCH_PREFIX: "amd64_" diff --git a/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml b/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml index be95b9701f2f..b39367b81a2a 100644 --- a/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml +++ b/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml @@ -6,7 +6,9 @@ docker:arm64: - .tags_template__build_arm64 stage: manual needs: [] - when: manual + # override the rules inherited from .build_docker_release_template: + rules: + - when: manual variables: IMAGE_ARCH_PREFIX: "arm64_" CI_DOCKER_HUB: "false" diff --git a/.gitlab/ci/jobs/build/get_contracts.yml b/.gitlab/ci/jobs/build/get_contracts.yml index 2d1ea6497ca7..434d2b959607 100644 --- a/.gitlab/ci/jobs/build/get_contracts.yml +++ b/.gitlab/ci/jobs/build/get_contracts.yml @@ -4,5 +4,13 @@ build_get_contracts: extends: - .tags_template__build - .build_template + rules: + - changes: + paths: + - src/**/* + - devtools/get_contracts/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success script: - dune build @devtools/get_contracts/check diff --git a/.gitlab/ci/jobs/build/tezt_fetch_records.yml b/.gitlab/ci/jobs/build/tezt_fetch_records.yml index 9c5c85c88934..a082e1a9d9ec 100644 --- a/.gitlab/ci/jobs/build/tezt_fetch_records.yml +++ b/.gitlab/ci/jobs/build/tezt_fetch_records.yml @@ -5,6 +5,7 @@ tezt:fetch-records: extends: - .tags_template__build - .build_template + - .rules__octez_changes stage: build script: - dune exec scripts/ci/update_records/update.exe -- --log-file tezt-fetch-records.log --test-arg from=last-merged-pipeline --info diff --git a/.gitlab/ci/jobs/build/x86_64.yml b/.gitlab/ci/jobs/build/x86_64.yml index d43baf90ff45..5afc49b1962c 100644 --- a/.gitlab/ci/jobs/build/x86_64.yml +++ b/.gitlab/ci/jobs/build/x86_64.yml @@ -16,6 +16,11 @@ build_x86_64-released: extends: - .tags_template__build - .build_x86_64 + # Produced artifacts may be needed later by tools that download + # them to build a specific snapshot of octez (e.g., for + # weeklynets), that's why - at least for the time being - we run + # this job everytime when pipeline is by Marge Bot. + - .rules__octez_changes_or_margebot variables: EXECUTABLE_FILES: "script-inputs/released-executables" @@ -26,6 +31,11 @@ build_x86_64-exp-dev-extra: extends: - .tags_template__build - .build_x86_64 + # Produced artifacts may be needed later by tools that download + # them to build a specific snapshot of octez (e.g., for + # weeklynets), that's why - at least for the time being - we run + # this job everytime when pipeline is by Marge Bot. + - .rules__octez_changes_or_margebot variables: EXECUTABLE_FILES: "script-inputs/experimental-executables script-inputs/dev-executables" # BUILD_EXTRA contains dune targets that should be built in addition to EXECUTABLE_FILES above. diff --git a/.gitlab/ci/jobs/coverage/coverage.yml b/.gitlab/ci/jobs/coverage/coverage.yml index a9de87a87d6f..e5deef48097e 100644 --- a/.gitlab/ci/jobs/coverage/coverage.yml +++ b/.gitlab/ci/jobs/coverage/coverage.yml @@ -15,7 +15,13 @@ unified_coverage: # master pipeline and the report is computed there. - if: '$GITLAB_USER_LOGIN == "nomadic-margebot"' when: never - - when: on_success + - changes: + paths: + - src/**/* + - tezt/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success variables: # This inhibites the Makefile's opam version check, which this # job's opam-less image cannot pass. diff --git a/.gitlab/ci/jobs/doc/build_all.yml b/.gitlab/ci/jobs/doc/build_all.yml index 4fe3f926f226..f9c64ec028c1 100644 --- a/.gitlab/ci/jobs/doc/build_all.yml +++ b/.gitlab/ci/jobs/doc/build_all.yml @@ -7,6 +7,7 @@ documentation:build_all: - .default_settings_template - .image_template__runtime_build_test_dependencies - .tags_template__build + - .rules__octez_docs_changes stage: build needs: [trigger] before_script: diff --git a/.gitlab/ci/jobs/doc/publish.yml b/.gitlab/ci/jobs/doc/publish.yml index 6397888c059a..b3f3e0324ee8 100644 --- a/.gitlab/ci/jobs/doc/publish.yml +++ b/.gitlab/ci/jobs/doc/publish.yml @@ -11,6 +11,7 @@ publish:documentation: extends: - .default_settings_template - .image_template__runtime_build_test_dependencies + - .rules__octez_docs_changes stage: doc # Make the publish_documentation run in the beginning of the master # pipeline to ensure it has time to run before the next merge. diff --git a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml index c5596a9a272f..4dd3020738c1 100644 --- a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml +++ b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml @@ -2,10 +2,17 @@ # Otherwise, $DOCKER_IMAGE_TAG would contain $IMAGE_ARCH_PREFIX too. # $IMAGE_ARCH_PREFIX is only used when building Docker images, # here we handle all architectures so there is no such variable. + docker:merge_manifests: + # This job merges the images produced in the jobs + # docker:{amd64,arm64} into a single multi-architecture image, and + # so must be run after these jobs. extends: - .docker_auth_template - .image_template__docker + needs: + - docker:amd64 + - docker:arm64 stage: prepare_release variables: CI_DOCKER_HUB: "true" diff --git a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml index 4e8e6280f614..0e4fb8524981 100644 --- a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml +++ b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml @@ -2,10 +2,17 @@ # Otherwise, $DOCKER_IMAGE_TAG would contain $IMAGE_ARCH_PREFIX too. # $IMAGE_ARCH_PREFIX is only used when building Docker images, # here we handle all architectures so there is no such variable. + docker:merge_manifests: + # This job merges the images produced in the jobs + # docker:{amd64,arm64} into a single multi-architecture image, and + # so must be run after these jobs. extends: - .docker_auth_template - .image_template__docker + needs: + - docker:amd64 + - docker:arm64 stage: prepare_release variables: CI_DOCKER_HUB: "false" diff --git a/.gitlab/ci/jobs/shared/templates.yml b/.gitlab/ci/jobs/shared/templates.yml index 4e560383436f..ae4cb6134d9d 100644 --- a/.gitlab/ci/jobs/shared/templates.yml +++ b/.gitlab/ci/jobs/shared/templates.yml @@ -25,6 +25,48 @@ .tags_template__no_gcp_arm64: tags: ["arm64"] +# Only if octez source code has changed +.rules__octez_changes: + rules: + - changes: + paths: + - src/**/* + - tezt/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success + +# Only if octez source code has changed or Marge Bot is the trigger +.rules__octez_changes_or_margebot: + rules: + - changes: + paths: + - src/**/* + - tezt/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success + - if: '$GITLAB_USER_LOGIN == "nomadic-margebot"' + when: on_success + +# Only if documentation has changed +.rules__octez_docs_changes: + rules: + - changes: + paths: + - scripts/**/*/ + - script-inputs/**/*/ + - src/**/* + - tezt/**/* + - vendors/**/* + - dune + - dune-project + - dune-workspace + - docs/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success + # Add variables for bisect_ppx instrumentation .template__coverage: variables: @@ -47,6 +89,7 @@ extends: - .default_settings_template - .image_template__rust_toolchain + - .rules__octez_changes stage: build needs: [trigger] variables: diff --git a/.gitlab/ci/jobs/test/check_precommit_hook.yml b/.gitlab/ci/jobs/test/check_precommit_hook.yml index 48ed9f93141a..9d0502c4c981 100644 --- a/.gitlab/ci/jobs/test/check_precommit_hook.yml +++ b/.gitlab/ci/jobs/test/check_precommit_hook.yml @@ -2,6 +2,13 @@ check_precommit_hook: extends: - .default_settings_template - .image_template__runtime_build_test_dependencies + rules: + - changes: + paths: + - scripts/pre_commit/pre_commit.py + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success stage: test needs: [trigger] before_script: diff --git a/.gitlab/ci/jobs/test/check_scripts.yml b/.gitlab/ci/jobs/test/check_scripts.yml index 232b587737e3..e97d61efea8a 100644 --- a/.gitlab/ci/jobs/test/check_scripts.yml +++ b/.gitlab/ci/jobs/test/check_scripts.yml @@ -4,6 +4,7 @@ # Note: this job actually probably doesn't need the build_x86_64 job # to have finished, but we don't want to start before build_x86_64 has finished either. +# However, when build_x86_64-* don't exist, we don't need to wait for them. script:snapshot_alpha_and_link: extends: - .default_settings_template @@ -12,8 +13,11 @@ script:snapshot_alpha_and_link: before_script: - . ./scripts/version.sh needs: - - "build_x86_64-released" - - "build_x86_64-exp-dev-extra" + - job: trigger + - job: "build_x86_64-released" + optional: true + - job: "build_x86_64-exp-dev-extra" + optional: true script: - ./.gitlab/ci/jobs/test/script:snapshot_alpha_and_link.sh rules: @@ -21,6 +25,8 @@ script:snapshot_alpha_and_link: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' changes: - src/proto_alpha/**/* + - .gitlab/**/* + - .gitlab-ci.yml - scripts/snapshot_alpha_and_link.sh - scripts/snapshot_alpha.sh - scripts/user_activated_upgrade.sh @@ -33,6 +39,7 @@ script:test-gen-genesis: extends: - .default_settings_template - .image_template__runtime_build_dependencies + - .rules__octez_changes stage: test needs: [trigger] before_script: @@ -54,6 +61,14 @@ check_scripts_b58_prefix: - .default_settings_template # Requires Python - .image_template__runtime_build_test_dependencies + rules: + - changes: + paths: + - scripts/b58_prefix/b58_prefix.py + - scripts/b58_prefix/test_b58_prefix.py + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success stage: test needs: [trigger] before_script: diff --git a/.gitlab/ci/jobs/test/common.yml b/.gitlab/ci/jobs/test/common.yml index 8e2d7ac5401d..9963a8c7de5a 100644 --- a/.gitlab/ci/jobs/test/common.yml +++ b/.gitlab/ci/jobs/test/common.yml @@ -3,6 +3,7 @@ - .default_settings_template - .image_template__runtime_build_dependencies - .template__coverage + - .rules__octez_changes needs: - "build_x86_64-released" - "build_x86_64-exp-dev-extra" @@ -13,7 +14,9 @@ # Merge coverage files after the execution .template__coverage_files: - extends: .template__coverage + extends: + - .template__coverage + - .rules__octez_changes artifacts: name: "coverage-files-$CI_JOB_ID" paths: diff --git a/.gitlab/ci/jobs/test/kernels.yml b/.gitlab/ci/jobs/test/kernels.yml index d3edc596f13a..830806725b73 100644 --- a/.gitlab/ci/jobs/test/kernels.yml +++ b/.gitlab/ci/jobs/test/kernels.yml @@ -14,3 +14,5 @@ test_kernels: - src/kernel_*/**/* - src/risc_v/**/* - etherlink/kernel_evm/**/* + - .gitlab/**/* + - .gitlab-ci.yml diff --git a/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml b/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml index 3204e91fdf0f..5691ffee28fc 100644 --- a/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml +++ b/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml @@ -2,6 +2,15 @@ include: .gitlab/ci/jobs/test/common.yml test-liquidity-baking-scripts: extends: .test_template + rules: + - changes: + paths: + - src/**/* + - scripts/ci/test_liquidity_baking_scripts.sh + - scripts/check-liquidity-baking-scripts.sh + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success dependencies: - "build_x86_64-released" - "build_x86_64-exp-dev-extra" diff --git a/.gitlab/ci/jobs/test/misc_checks.yml b/.gitlab/ci/jobs/test/misc_checks.yml index 37dbb4bec79a..91a39e638282 100644 --- a/.gitlab/ci/jobs/test/misc_checks.yml +++ b/.gitlab/ci/jobs/test/misc_checks.yml @@ -9,14 +9,33 @@ misc_checks: # Load the environment poetry previously created in the docker image. # Give access to the Python dependencies/executables - . $HOME/.venv/bin/activate + rules: + - changes: + paths: + - src/**/* + - tezt/**/* + - devtools/**/* + - scripts/**/* + - docs/**/* + - .gitlab-ci.yml + - .gitlab/**/* script: - ./scripts/ci/take_ownership.sh - ./scripts/ci/lint_misc_check.sh - scripts/check_wasm_pvm_regressions.sh check +# check that ksy files are still up-to-date with octez kaitai_checks: extends: - .test_template + rules: + - changes: + paths: + - src/**/* + - contrib/*kaitai*/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success # These tests are not flaky at all so we overwrite the retry value retry: 0 needs: [trigger] @@ -34,6 +53,14 @@ kaitai_e2e_checks: # These tests are not flaky at all so we overwrite the retry value retry: 0 needs: [kaitai_checks] + rules: + - changes: + paths: + - src/**/* + - contrib/*kaitai*/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success script: - . ./scripts/version.sh # TODO: https://gitlab.com/tezos/tezos/-/issues/5026 @@ -58,6 +85,8 @@ check_lift_limits_patch: - changes: - src/bin_tps_evaluation/lift_limits.patch - src/proto_alpha/lib_protocol/main.ml + - .gitlab/**/* + - .gitlab-ci.yml when: on_success script: # Check that the patch only modifies the diff --git a/.gitlab/ci/jobs/test/semgrep.yml b/.gitlab/ci/jobs/test/semgrep.yml index 6532232b7193..d94202693429 100644 --- a/.gitlab/ci/jobs/test/semgrep.yml +++ b/.gitlab/ci/jobs/test/semgrep.yml @@ -1,6 +1,16 @@ semgrep: extends: - .default_settings_template + rules: + - changes: + paths: + - src/**/* + - tezt/**/* + - devtools/**/* + - scripts/semgrep/**/* + - .gitlab/**/* + - .gitlab-ci.yml + when: on_success # We specify the image by hash to avoid flakiness. Indeed, if we took the # latest release, then an update in the parser or analyser could result in new # errors being found even if the code doesn't change. This would place the diff --git a/.gitlab/ci/jobs/test/tezt.yml b/.gitlab/ci/jobs/test/tezt.yml index 97198e6d0696..f277589f8252 100644 --- a/.gitlab/ci/jobs/test/tezt.yml +++ b/.gitlab/ci/jobs/test/tezt.yml @@ -46,6 +46,7 @@ tezt:static-binaries: - .default_settings_template - .image_template__runtime_e2etest_dependencies - .tezt_template + - .rules__octez_changes dependencies: # Fetch src/proto_*/parameters/*.json and tezt/tests/main.exe from # build_x86_64-exp-dev-extra diff --git a/.gitlab/ci/jobs/test/tezt_build_long.yml b/.gitlab/ci/jobs/test/tezt_build_long.yml index 63474064d297..ba7218b28214 100644 --- a/.gitlab/ci/jobs/test/tezt_build_long.yml +++ b/.gitlab/ci/jobs/test/tezt_build_long.yml @@ -3,6 +3,7 @@ tezt:build-long: extends: - .build_template + - .rules__octez_changes stage: test # Artificial needs for ordering. needs: diff --git a/.gitlab/ci/jobs/test/unit.yml b/.gitlab/ci/jobs/test/unit.yml index fab2c99f1329..5d111455b7a2 100644 --- a/.gitlab/ci/jobs/test/unit.yml +++ b/.gitlab/ci/jobs/test/unit.yml @@ -1,5 +1,7 @@ .unit_test_template: - extends: .test_template + extends: + - .test_template + - .rules__octez_changes variables: ARCH: "" MAKE_TARGETS: "" -- GitLab From 850f1eb9d3f3953458d14b93252a6d7143a947ca Mon Sep 17 00:00:00 2001 From: Philippe Wang Date: Thu, 14 Dec 2023 18:55:40 -0800 Subject: [PATCH 2/2] CI: prefix octez jobs with `oc` --- .gitlab/ci/jobs/build/arm64.yml | 16 ++--- .gitlab/ci/jobs/build/bin_packages.yml | 4 +- .gitlab/ci/jobs/build/bin_packages_manual.yml | 4 +- .gitlab/ci/jobs/build/check.yml | 2 +- .gitlab/ci/jobs/build/common.yml | 8 +-- .../jobs/build/docker_amd64_experimental.yml | 4 +- .../ci/jobs/build/docker_amd64_release.yml | 4 +- .gitlab/ci/jobs/build/docker_amd64_test.yml | 4 +- .../jobs/build/docker_amd64_test_manual.yml | 6 +- .../jobs/build/docker_arm64_experimental.yml | 4 +- .../ci/jobs/build/docker_arm64_release.yml | 4 +- .gitlab/ci/jobs/build/docker_arm64_test.yml | 4 +- .../jobs/build/docker_arm64_test_manual.yml | 6 +- .gitlab/ci/jobs/build/get_contracts.yml | 2 +- .gitlab/ci/jobs/build/kernels.yml | 4 +- .../jobs/build/static_arm64_experimental.yml | 4 +- .../ci/jobs/build/static_arm64_release.yml | 4 +- .../jobs/build/static_x86_64_experimental.yml | 4 +- .../ci/jobs/build/static_x86_64_release.yml | 4 +- .gitlab/ci/jobs/build/tezt_fetch_records.yml | 4 +- .gitlab/ci/jobs/build/x86_64.yml | 16 ++--- .gitlab/ci/jobs/coverage/common.yml | 4 +- .gitlab/ci/jobs/coverage/coverage.yml | 10 +-- .gitlab/ci/jobs/coverage/coverage_default.yml | 4 +- .gitlab/ci/jobs/doc/test_install_python.yml | 14 ++--- .../docker_merge_manifests_release.yml | 4 +- .../docker_merge_manifests_test.yml | 4 +- .gitlab/ci/jobs/publish/gitlab:publish.yml | 8 +-- .gitlab/ci/jobs/publish/gitlab:release.yml | 8 +-- .gitlab/ci/jobs/shared/templates.yml | 8 +-- .gitlab/ci/jobs/test/check_scripts.yml | 18 +++--- .gitlab/ci/jobs/test/common.yml | 28 ++++----- .gitlab/ci/jobs/test/install_octez.yml | 62 +++++++++---------- .../test/integration_compiler_rejections.yml | 2 +- .gitlab/ci/jobs/test/kernels.yml | 2 +- .../liquidity_baking_scripts-integrity.yml | 6 +- .gitlab/ci/jobs/test/misc_checks.yml | 6 +- .gitlab/ci/jobs/test/semgrep.yml | 2 +- .gitlab/ci/jobs/test/tezt.yml | 14 ++--- .gitlab/ci/jobs/test/tezt_build_long.yml | 6 +- .gitlab/ci/jobs/test/unit.yml | 48 +++++++------- 41 files changed, 185 insertions(+), 185 deletions(-) diff --git a/.gitlab/ci/jobs/build/arm64.yml b/.gitlab/ci/jobs/build/arm64.yml index 8bee563d7d46..2fca58a047f1 100644 --- a/.gitlab/ci/jobs/build/arm64.yml +++ b/.gitlab/ci/jobs/build/arm64.yml @@ -1,8 +1,8 @@ include: .gitlab/ci/jobs/build/common.yml -.build_arm64: +.oc.build_arm64: extends: - - .build + - .oc.build - .tags_template__build_arm64 variables: ARCH: "arm64" @@ -24,19 +24,19 @@ include: .gitlab/ci/jobs/build/common.yml # The build_arm64 jobs are split in two to keep the artifact size # under the 1GB hard limit set by GitLab. -# 'build_arm64-released' builds the released executables. -build_arm64-released: +# 'oc.build_arm64-released' builds the released executables. +oc.build_arm64-released: extends: - - .build_arm64 + - .oc.build_arm64 variables: EXECUTABLE_FILES: "script-inputs/released-executables" -# 'build_arm64-exp-dev-extra' builds the developer and experimental +# 'oc.build_arm64-exp-dev-extra' builds the developer and experimental # executables, as well as the tezt test suite and the TPS evaluation # tool. -build_arm64-exp-dev-extra: +oc.build_arm64-exp-dev-extra: extends: - - .build_arm64 + - .oc.build_arm64 variables: 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" diff --git a/.gitlab/ci/jobs/build/bin_packages.yml b/.gitlab/ci/jobs/build/bin_packages.yml index ef120db513d0..d3ba72339390 100644 --- a/.gitlab/ci/jobs/build/bin_packages.yml +++ b/.gitlab/ci/jobs/build/bin_packages.yml @@ -1,6 +1,6 @@ include: .gitlab/ci/jobs/build/bin_packages_common.yml -build:dpkg:amd64: +oc.build:dpkg:amd64: extends: - .tags_template__build - .bin_packages_common @@ -16,7 +16,7 @@ build:dpkg:amd64: paths: - octez-*.deb -build:rpm:amd64: +oc.build:rpm:amd64: extends: - .tags_template__build - .bin_packages_common diff --git a/.gitlab/ci/jobs/build/bin_packages_manual.yml b/.gitlab/ci/jobs/build/bin_packages_manual.yml index b8401cf7579a..4c7afeacedf9 100644 --- a/.gitlab/ci/jobs/build/bin_packages_manual.yml +++ b/.gitlab/ci/jobs/build/bin_packages_manual.yml @@ -1,6 +1,6 @@ include: .gitlab/ci/jobs/build/bin_packages_common.yml -dpkg:amd64: +oc.dpkg:amd64: extends: - .tags_template__build - .bin_packages_common @@ -18,7 +18,7 @@ dpkg:amd64: paths: - octez-*.deb -rpm:amd64: +oc.rpm:amd64: extends: - .tags_template__build - .bin_packages_common diff --git a/.gitlab/ci/jobs/build/check.yml b/.gitlab/ci/jobs/build/check.yml index 8f6b54f6e2a9..9cb6519f1120 100644 --- a/.gitlab/ci/jobs/build/check.yml +++ b/.gitlab/ci/jobs/build/check.yml @@ -1,7 +1,7 @@ ocaml-check: extends: - .tags_template__build - - .build + - .oc.build needs: [trigger] rules: - changes: diff --git a/.gitlab/ci/jobs/build/common.yml b/.gitlab/ci/jobs/build/common.yml index ab1b19a3a380..15197ad05895 100644 --- a/.gitlab/ci/jobs/build/common.yml +++ b/.gitlab/ci/jobs/build/common.yml @@ -1,6 +1,6 @@ -.build: +.oc.build: extends: - - .build_template + - .oc.build_template - .rules__octez_changes variables: ARCH: "" @@ -26,7 +26,7 @@ # similar to the build template above, this template # compiles all binaries using the static profile. -.build_static_binaries_template: +.oc.build_static_binaries_template: extends: - .default_settings_template - .image_template__runtime_build_dependencies @@ -41,7 +41,7 @@ paths: - "octez-binaries/$ARCH/*" -.build_docker_release_template: +.oc.build_docker_release_template: extends: - .image_template__docker - .docker_auth_template diff --git a/.gitlab/ci/jobs/build/docker_amd64_experimental.yml b/.gitlab/ci/jobs/build/docker_amd64_experimental.yml index f5c9d9e7216e..b8ad0be0dd01 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_experimental.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_experimental.yml @@ -1,9 +1,9 @@ include: .gitlab/ci/jobs/build/common.yml -docker:amd64: +oc.docker:amd64: extends: - .tags_template__build - - .build_docker_release_template + - .oc.build_docker_release_template variables: DOCKER_BUILD_TARGET: "with-evm-artifacts" IMAGE_ARCH_PREFIX: "amd64_" diff --git a/.gitlab/ci/jobs/build/docker_amd64_release.yml b/.gitlab/ci/jobs/build/docker_amd64_release.yml index e9cca0712e34..284f5c8cb5c8 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_release.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_release.yml @@ -1,9 +1,9 @@ include: .gitlab/ci/jobs/build/common.yml -docker:amd64: +oc.docker:amd64: extends: - .tags_template__build - - .build_docker_release_template + - .oc.build_docker_release_template variables: IMAGE_ARCH_PREFIX: "amd64_" CI_DOCKER_HUB: "true" diff --git a/.gitlab/ci/jobs/build/docker_amd64_test.yml b/.gitlab/ci/jobs/build/docker_amd64_test.yml index 419eba73803e..751c79152fe7 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_test.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_test.yml @@ -1,9 +1,9 @@ include: .gitlab/ci/jobs/build/common.yml -docker:amd64: +oc.docker:amd64: extends: - .tags_template__build - - .build_docker_release_template + - .oc.build_docker_release_template variables: IMAGE_ARCH_PREFIX: "amd64_" CI_DOCKER_HUB: "false" diff --git a/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml b/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml index da44b9a3bacf..92a44cedb987 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml @@ -1,11 +1,11 @@ include: .gitlab/ci/jobs/build/common.yml -docker:amd64: +oc.docker:amd64: extends: - - .build_docker_release_template + - .oc.build_docker_release_template stage: manual needs: [] - # override the rules inherited from .build_docker_release_template: + # override the rules inherited from .oc.build_docker_release_template: rules: - when: manual variables: diff --git a/.gitlab/ci/jobs/build/docker_arm64_experimental.yml b/.gitlab/ci/jobs/build/docker_arm64_experimental.yml index 8cddd3b79a51..ee9ad82773dc 100644 --- a/.gitlab/ci/jobs/build/docker_arm64_experimental.yml +++ b/.gitlab/ci/jobs/build/docker_arm64_experimental.yml @@ -1,8 +1,8 @@ include: .gitlab/ci/jobs/build/common.yml -docker:arm64: +oc.docker:arm64: extends: - - .build_docker_release_template + - .oc.build_docker_release_template - .tags_template__build_arm64 stage: build variables: diff --git a/.gitlab/ci/jobs/build/docker_arm64_release.yml b/.gitlab/ci/jobs/build/docker_arm64_release.yml index 01edd73fb987..a9087c401b86 100644 --- a/.gitlab/ci/jobs/build/docker_arm64_release.yml +++ b/.gitlab/ci/jobs/build/docker_arm64_release.yml @@ -1,8 +1,8 @@ include: .gitlab/ci/jobs/build/common.yml -docker:arm64: +oc.docker:arm64: extends: - - .build_docker_release_template + - .oc.build_docker_release_template - .tags_template__build_arm64 stage: build variables: diff --git a/.gitlab/ci/jobs/build/docker_arm64_test.yml b/.gitlab/ci/jobs/build/docker_arm64_test.yml index 7bcd51c272a7..bcf4f4610e73 100644 --- a/.gitlab/ci/jobs/build/docker_arm64_test.yml +++ b/.gitlab/ci/jobs/build/docker_arm64_test.yml @@ -1,8 +1,8 @@ include: .gitlab/ci/jobs/build/common.yml -docker:arm64: +oc.docker:arm64: extends: - - .build_docker_release_template + - .oc.build_docker_release_template - .tags_template__build_arm64 stage: build variables: diff --git a/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml b/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml index b39367b81a2a..da8dfd9529a6 100644 --- a/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml +++ b/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml @@ -1,12 +1,12 @@ include: .gitlab/ci/jobs/build/common.yml -docker:arm64: +oc.docker:arm64: extends: - - .build_docker_release_template + - .oc.build_docker_release_template - .tags_template__build_arm64 stage: manual needs: [] - # override the rules inherited from .build_docker_release_template: + # override the rules inherited from .oc.build_docker_release_template: rules: - when: manual variables: diff --git a/.gitlab/ci/jobs/build/get_contracts.yml b/.gitlab/ci/jobs/build/get_contracts.yml index 434d2b959607..904de9f76988 100644 --- a/.gitlab/ci/jobs/build/get_contracts.yml +++ b/.gitlab/ci/jobs/build/get_contracts.yml @@ -3,7 +3,7 @@ include: .gitlab/ci/jobs/build/common.yml build_get_contracts: extends: - .tags_template__build - - .build_template + - .oc.build_template rules: - changes: paths: diff --git a/.gitlab/ci/jobs/build/kernels.yml b/.gitlab/ci/jobs/build/kernels.yml index 8959fb175f25..e9dacd0b6c2e 100644 --- a/.gitlab/ci/jobs/build/kernels.yml +++ b/.gitlab/ci/jobs/build/kernels.yml @@ -1,7 +1,7 @@ -build_kernels: +oc.build_kernels: extends: - .tags_template__build - - .kernels_template + - .oc.kernels_template stage: build needs: [trigger] script: diff --git a/.gitlab/ci/jobs/build/static_arm64_experimental.yml b/.gitlab/ci/jobs/build/static_arm64_experimental.yml index 534f6bec0755..740e3ed7da83 100644 --- a/.gitlab/ci/jobs/build/static_arm64_experimental.yml +++ b/.gitlab/ci/jobs/build/static_arm64_experimental.yml @@ -1,9 +1,9 @@ include: .gitlab/ci/jobs/build/common.yml # See comments in static_x86_64_experimental.yml. -build:static-arm64-linux-binaries: +oc.build:static-arm64-linux-binaries: extends: - - .build_static_binaries_template + - .oc.build_static_binaries_template - .tags_template__build_arm64 variables: ARCH: "arm64" diff --git a/.gitlab/ci/jobs/build/static_arm64_release.yml b/.gitlab/ci/jobs/build/static_arm64_release.yml index 29d09786baab..720e54bc6cd7 100644 --- a/.gitlab/ci/jobs/build/static_arm64_release.yml +++ b/.gitlab/ci/jobs/build/static_arm64_release.yml @@ -1,9 +1,9 @@ include: .gitlab/ci/jobs/build/common.yml # See comments in static_x86_64_experimental.yml. -build:static-arm64-linux-binaries: +oc.build:static-arm64-linux-binaries: extends: - - .build_static_binaries_template + - .oc.build_static_binaries_template - .tags_template__build_arm64 variables: ARCH: "arm64" diff --git a/.gitlab/ci/jobs/build/static_x86_64_experimental.yml b/.gitlab/ci/jobs/build/static_x86_64_experimental.yml index 22f36ea95691..e92c95acd368 100644 --- a/.gitlab/ci/jobs/build/static_x86_64_experimental.yml +++ b/.gitlab/ci/jobs/build/static_x86_64_experimental.yml @@ -10,10 +10,10 @@ include: .gitlab/ci/jobs/build/common.yml # (no need to test that we pass the -static flag twice) # - released variants exist, that are used in release tag pipelines # (they do not build experimental executables) -build:static-x86_64-linux-binaries: +oc.build:static-x86_64-linux-binaries: extends: - .tags_template__build - - .build_static_binaries_template + - .oc.build_static_binaries_template # Even though not many tests depend on static executables, some of those that do # are limiting factors in the total duration of pipelines. # So we start this job as early as possible, without waiting for sanity_ci. diff --git a/.gitlab/ci/jobs/build/static_x86_64_release.yml b/.gitlab/ci/jobs/build/static_x86_64_release.yml index e1289205b869..4b0cbb445742 100644 --- a/.gitlab/ci/jobs/build/static_x86_64_release.yml +++ b/.gitlab/ci/jobs/build/static_x86_64_release.yml @@ -1,10 +1,10 @@ include: .gitlab/ci/jobs/build/common.yml # See comments in static_x86_64_experimental.yml. -build:static-x86_64-linux-binaries: +oc.build:static-x86_64-linux-binaries: extends: - .tags_template__build - - .build_static_binaries_template + - .oc.build_static_binaries_template needs: [trigger] variables: ARCH: "x86_64" diff --git a/.gitlab/ci/jobs/build/tezt_fetch_records.yml b/.gitlab/ci/jobs/build/tezt_fetch_records.yml index a082e1a9d9ec..35710723056f 100644 --- a/.gitlab/ci/jobs/build/tezt_fetch_records.yml +++ b/.gitlab/ci/jobs/build/tezt_fetch_records.yml @@ -1,10 +1,10 @@ # Fetch records for Tezt generated on the last merge request pipeline # on the most recently merged MR and makes them available in artifacts # for future merge request pipelines. -tezt:fetch-records: +oc.tezt:fetch-records: extends: - .tags_template__build - - .build_template + - .oc.build_template - .rules__octez_changes stage: build script: diff --git a/.gitlab/ci/jobs/build/x86_64.yml b/.gitlab/ci/jobs/build/x86_64.yml index 5afc49b1962c..d8e96fb2a084 100644 --- a/.gitlab/ci/jobs/build/x86_64.yml +++ b/.gitlab/ci/jobs/build/x86_64.yml @@ -1,8 +1,8 @@ include: .gitlab/ci/jobs/build/common.yml -.build_x86_64: +.oc.build_x86_64: extends: - - .build + - .oc.build # These job are the main bottleneck since a lot of tests depend on # them. So we start them even before sanity_ci. needs: [trigger] @@ -11,11 +11,11 @@ include: .gitlab/ci/jobs/build/common.yml # The build_x86_64 jobs are split in two to keep the artifact size # under the 1GB hard limit set by GitLab. -# 'build_x86_64-released' builds the released executables. -build_x86_64-released: +# 'oc.build_x86_64-released' builds the released executables. +oc.build_x86_64-released: extends: - .tags_template__build - - .build_x86_64 + - .oc.build_x86_64 # Produced artifacts may be needed later by tools that download # them to build a specific snapshot of octez (e.g., for # weeklynets), that's why - at least for the time being - we run @@ -24,13 +24,13 @@ build_x86_64-released: variables: EXECUTABLE_FILES: "script-inputs/released-executables" -# 'build_x86_64-exp-dev-extra' builds the developer and experimental +# 'oc.build_x86_64-exp-dev-extra' builds the developer and experimental # executables, as well as the tezt test suite used by the subsequent # 'tezt' jobs and TPS evaluation tool. -build_x86_64-exp-dev-extra: +oc.build_x86_64-exp-dev-extra: extends: - .tags_template__build - - .build_x86_64 + - .oc.build_x86_64 # Produced artifacts may be needed later by tools that download # them to build a specific snapshot of octez (e.g., for # weeklynets), that's why - at least for the time being - we run diff --git a/.gitlab/ci/jobs/coverage/common.yml b/.gitlab/ci/jobs/coverage/common.yml index df2dea1d14e9..99bc3ae528c7 100644 --- a/.gitlab/ci/jobs/coverage/common.yml +++ b/.gitlab/ci/jobs/coverage/common.yml @@ -1,5 +1,5 @@ -.template__coverage_report: - extends: .template__coverage +.oc.template__coverage_report: + extends: .oc.template__coverage stage: test_coverage coverage: '/Coverage: ([^%]+%)/' artifacts: diff --git a/.gitlab/ci/jobs/coverage/coverage.yml b/.gitlab/ci/jobs/coverage/coverage.yml index e5deef48097e..8e1c739ace06 100644 --- a/.gitlab/ci/jobs/coverage/coverage.yml +++ b/.gitlab/ci/jobs/coverage/coverage.yml @@ -4,11 +4,11 @@ include: .gitlab/ci/jobs/coverage/common.yml -unified_coverage: +oc.unified_coverage: extends: - .default_settings_template - .image_template__runtime_e2etest_dependencies - - .template__coverage_report + - .oc.template__coverage_report rules: # We do not run this job when margebot triggers the # pipeline. Instead, the coverage traces are downloaded in the @@ -99,9 +99,9 @@ unified_coverage: - "tezt-memory-4k 4/4" - "tezt-memory-3k 1/1" - "tezt-time-sensitive 1/1" - - "unit:non-proto-x86_64" - - "unit:proto-x86_64" - - "unit:other-x86_64" + - "oc.unit:non-proto-x86_64" + - "oc.unit:proto-x86_64" + - "oc.unit:other-x86_64" script: # On the development branches, we compute coverage. # TODO: https://gitlab.com/tezos/tezos/-/issues/6173 diff --git a/.gitlab/ci/jobs/coverage/coverage_default.yml b/.gitlab/ci/jobs/coverage/coverage_default.yml index 2bd931ce627f..add1b3622a54 100644 --- a/.gitlab/ci/jobs/coverage/coverage_default.yml +++ b/.gitlab/ci/jobs/coverage/coverage_default.yml @@ -4,11 +4,11 @@ include: .gitlab/ci/jobs/coverage/common.yml -unified_coverage: +oc.unified_coverage: extends: - .default_settings_template - .image_template__runtime_build_test_dependencies - - .template__coverage_report + - .oc.template__coverage_report dependencies: [] variables: # The GitLab project to use in the coverage downloader. diff --git a/.gitlab/ci/jobs/doc/test_install_python.yml b/.gitlab/ci/jobs/doc/test_install_python.yml index a5cfadcdb55c..0cbcb033ae05 100644 --- a/.gitlab/ci/jobs/doc/test_install_python.yml +++ b/.gitlab/ci/jobs/doc/test_install_python.yml @@ -1,4 +1,4 @@ -.install_python_debian_ubuntu_template: +.oc.install_python_debian_ubuntu_template: extends: - .default_settings_template stage: doc @@ -18,14 +18,14 @@ script: - ./docs/developer/install-python-debian-ubuntu.sh ${CI_MERGE_REQUEST_SOURCE_PROJECT_PATH:-tezos/tezos} ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master} -install_python_focal: +oc.install_python_focal: image: public.ecr.aws/lts/ubuntu:20.04_stable - extends: .install_python_debian_ubuntu_template + extends: .oc.install_python_debian_ubuntu_template -install_python_jammy: +oc.install_python_jammy: image: public.ecr.aws/lts/ubuntu:22.04_stable - extends: .install_python_debian_ubuntu_template + extends: .oc.install_python_debian_ubuntu_template -install_python_bullseye: +oc.install_python_bullseye: image: debian:bullseye - extends: .install_python_debian_ubuntu_template + extends: .oc.install_python_debian_ubuntu_template diff --git a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml index 4dd3020738c1..d8a8fa57aabe 100644 --- a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml +++ b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_release.yml @@ -11,8 +11,8 @@ docker:merge_manifests: - .docker_auth_template - .image_template__docker needs: - - docker:amd64 - - docker:arm64 + - oc.docker:amd64 + - oc.docker:arm64 stage: prepare_release variables: CI_DOCKER_HUB: "true" diff --git a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml index 0e4fb8524981..37f70b7c661c 100644 --- a/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml +++ b/.gitlab/ci/jobs/prepare_release/docker_merge_manifests_test.yml @@ -11,8 +11,8 @@ docker:merge_manifests: - .docker_auth_template - .image_template__docker needs: - - docker:amd64 - - docker:arm64 + - oc.docker:amd64 + - oc.docker:arm64 stage: prepare_release variables: CI_DOCKER_HUB: "false" diff --git a/.gitlab/ci/jobs/publish/gitlab:publish.yml b/.gitlab/ci/jobs/publish/gitlab:publish.yml index 82dcd11659b4..d35896842415 100644 --- a/.gitlab/ci/jobs/publish/gitlab:publish.yml +++ b/.gitlab/ci/jobs/publish/gitlab:publish.yml @@ -6,9 +6,9 @@ gitlab:publish: # Publish jobs are uninterruptible to avoid publishing partial results. interruptible: false dependencies: - - build:static-x86_64-linux-binaries - - build:static-arm64-linux-binaries - - build:dpkg:amd64 - - build:rpm:amd64 + - oc.build:static-x86_64-linux-binaries + - oc.build:static-arm64-linux-binaries + - oc.build:dpkg:amd64 + - oc.build:rpm:amd64 script: - ${CI_PROJECT_DIR}/scripts/ci/create_gitlab_package.sh diff --git a/.gitlab/ci/jobs/publish/gitlab:release.yml b/.gitlab/ci/jobs/publish/gitlab:release.yml index 4e7e5c4cc493..1e26d3830153 100644 --- a/.gitlab/ci/jobs/publish/gitlab:release.yml +++ b/.gitlab/ci/jobs/publish/gitlab:release.yml @@ -5,10 +5,10 @@ gitlab:release: # Publish jobs are uninterruptible to avoid publishing partial results. interruptible: false dependencies: - - build:static-x86_64-linux-binaries - - build:static-arm64-linux-binaries - - build:dpkg:amd64 - - build:rpm:amd64 + - oc.build:static-x86_64-linux-binaries + - oc.build:static-arm64-linux-binaries + - oc.build:dpkg:amd64 + - oc.build:rpm:amd64 - docker:merge_manifests script: - ./scripts/ci/gitlab-release.sh diff --git a/.gitlab/ci/jobs/shared/templates.yml b/.gitlab/ci/jobs/shared/templates.yml index ae4cb6134d9d..80b288359ca7 100644 --- a/.gitlab/ci/jobs/shared/templates.yml +++ b/.gitlab/ci/jobs/shared/templates.yml @@ -68,24 +68,24 @@ when: on_success # Add variables for bisect_ppx instrumentation -.template__coverage: +.oc.template__coverage: variables: COVERAGE_OPTIONS: "--instrument-with bisect_ppx" BISECT_FILE: "$CI_PROJECT_DIR/_coverage_output/" SLACK_COVERAGE_CHANNEL: "C02PHBE7W73" -.build_template: +.oc.build_template: extends: - .default_settings_template - .image_template__runtime_build_dependencies - - .template__coverage + - .oc.template__coverage stage: build before_script: # FIXME: https://gitlab.com/tezos/tezos/-/issues/2865 - sudo chown -R $(id -u):$(id -g) $CI_PROJECT_DIR - . ./scripts/version.sh -.kernels_template: +.oc.kernels_template: extends: - .default_settings_template - .image_template__rust_toolchain diff --git a/.gitlab/ci/jobs/test/check_scripts.yml b/.gitlab/ci/jobs/test/check_scripts.yml index e97d61efea8a..bba6b698ed11 100644 --- a/.gitlab/ci/jobs/test/check_scripts.yml +++ b/.gitlab/ci/jobs/test/check_scripts.yml @@ -2,10 +2,10 @@ ## Stage: run scripts to check they are working properly ## ############################################################ -# Note: this job actually probably doesn't need the build_x86_64 job -# to have finished, but we don't want to start before build_x86_64 has finished either. -# However, when build_x86_64-* don't exist, we don't need to wait for them. -script:snapshot_alpha_and_link: +# Note: this job actually probably doesn't need the oc.build_x86_64 job +# to have finished, but we don't want to start before oc.build_x86_64 has finished either. +# However, when oc.build_x86_64-* don't exist, we don't need to wait for them. +oc.script:snapshot_alpha_and_link: extends: - .default_settings_template - .image_template__runtime_build_dependencies @@ -14,9 +14,9 @@ script:snapshot_alpha_and_link: - . ./scripts/version.sh needs: - job: trigger - - job: "build_x86_64-released" + - job: "oc.build_x86_64-released" optional: true - - job: "build_x86_64-exp-dev-extra" + - job: "oc.build_x86_64-exp-dev-extra" optional: true script: - ./.gitlab/ci/jobs/test/script:snapshot_alpha_and_link.sh @@ -35,7 +35,7 @@ script:snapshot_alpha_and_link: - if: '$GITLAB_USER_LOGIN == "nomadic-margebot"' when: on_success -script:test-gen-genesis: +oc.script:test-gen-genesis: extends: - .default_settings_template - .image_template__runtime_build_dependencies @@ -47,14 +47,14 @@ script:test-gen-genesis: script: - dune build gen_genesis.exe -script:test_release_versions: +oc.script:test_release_versions: extends: .test_template script: # FIXME: https://gitlab.com/tezos/tezos/-/issues/2865 - sudo chown -R $(id -u):$(id -g) ${CI_PROJECT_DIR} - ./scripts/test_release_version.sh -check_scripts_b58_prefix: +oc.check_scripts_b58_prefix: # Can be changed to a python image, but using the build docker image to keep # in sync with the python version used for the tests extends: diff --git a/.gitlab/ci/jobs/test/common.yml b/.gitlab/ci/jobs/test/common.yml index 9963a8c7de5a..d68cf93783c9 100644 --- a/.gitlab/ci/jobs/test/common.yml +++ b/.gitlab/ci/jobs/test/common.yml @@ -2,20 +2,20 @@ extends: - .default_settings_template - .image_template__runtime_build_dependencies - - .template__coverage + - .oc.template__coverage - .rules__octez_changes needs: - - "build_x86_64-released" - - "build_x86_64-exp-dev-extra" + - "oc.build_x86_64-released" + - "oc.build_x86_64-exp-dev-extra" stage: test before_script: - . ./scripts/version.sh retry: 2 # Merge coverage files after the execution -.template__coverage_files: +.oc.template__coverage_files: extends: - - .template__coverage + - .oc.template__coverage - .rules__octez_changes artifacts: name: "coverage-files-$CI_JOB_ID" @@ -94,7 +94,7 @@ extends: - .test_template - .image_template__runtime_e2etest_dependencies - - .template__coverage_files + - .oc.template__coverage_files - .tezt_template variables: # Certain tests can be blacklisted by modifying the TESTS variable. @@ -102,15 +102,15 @@ # See tezt/lib_tezos/tag.mli for more information. TESTS: "/ci_disabled /flaky" dependencies: - - "build_x86_64-released" - - "build_x86_64-exp-dev-extra" - - "build_kernels" - - "tezt:fetch-records" + - "oc.build_x86_64-released" + - "oc.build_x86_64-exp-dev-extra" + - "oc.build_kernels" + - "oc.tezt:fetch-records" needs: - - "build_x86_64-released" - - "build_x86_64-exp-dev-extra" - - "build_kernels" - - "tezt:fetch-records" + - "oc.build_x86_64-released" + - "oc.build_x86_64-exp-dev-extra" + - "oc.build_kernels" + - "oc.tezt:fetch-records" # WARNING: if you increase the number of parallel jobs, you need to # update test_coverage.yml with the new list of jobs. parallel: 60 diff --git a/.gitlab/ci/jobs/test/install_octez.yml b/.gitlab/ci/jobs/test/install_octez.yml index fa84f1ecb8fe..c82b60ea4e9a 100644 --- a/.gitlab/ci/jobs/test/install_octez.yml +++ b/.gitlab/ci/jobs/test/install_octez.yml @@ -1,4 +1,4 @@ -.base-test-install-scripts-template: +.oc.base-test-install-scripts-template: stage: test needs: [trigger] rules: @@ -14,62 +14,62 @@ allow_failure: true -.install_bin_ubuntu_template: +.oc.install_bin_ubuntu_template: extends: - .default_settings_template - - .base-test-install-scripts-template + - .oc.base-test-install-scripts-template script: - ./docs/introduction/install-bin-ubuntu.sh -install_bin_focal: +oc.install_bin_focal: image: public.ecr.aws/lts/ubuntu:20.04_stable - extends: .install_bin_ubuntu_template + extends: .oc.install_bin_ubuntu_template -install_bin_jammy: +oc.install_bin_jammy: image: public.ecr.aws/lts/ubuntu:22.04_stable - extends: .install_bin_ubuntu_template + extends: .oc.install_bin_ubuntu_template -.install_bin_rc_ubuntu_template: +.oc.install_bin_rc_ubuntu_template: extends: - .default_settings_template - - .base-test-install-scripts-template + - .oc.base-test-install-scripts-template script: - ./docs/introduction/install-bin-ubuntu.sh rc -install_bin_rc_focal: +oc.install_bin_rc_focal: image: public.ecr.aws/lts/ubuntu:20.04_stable - extends: .install_bin_rc_ubuntu_template + extends: .oc.install_bin_rc_ubuntu_template -install_bin_rc_jammy: +oc.install_bin_rc_jammy: image: public.ecr.aws/lts/ubuntu:22.04_stable - extends: .install_bin_rc_ubuntu_template + extends: .oc.install_bin_rc_ubuntu_template -.install_bin_fedora_template: +.oc.install_bin_fedora_template: extends: - .default_settings_template - - .base-test-install-scripts-template + - .oc.base-test-install-scripts-template script: - ./docs/introduction/install-bin-fedora.sh -install_bin_fedora_37: +oc.install_bin_fedora_37: image: fedora:37 - extends: .install_bin_fedora_template + extends: .oc.install_bin_fedora_template -.install_bin_rc_fedora_template: +.oc.install_bin_rc_fedora_template: extends: - .default_settings_template - - .base-test-install-scripts-template + - .oc.base-test-install-scripts-template script: - ./docs/introduction/install-bin-fedora.sh rc -install_bin_rc_fedora_37: +oc.install_bin_rc_fedora_37: image: fedora:37 - extends: .install_bin_rc_fedora_template + extends: .oc.install_bin_rc_fedora_template -.install_opam_ubuntu_template: +.oc.install_opam_ubuntu_template: extends: - .default_settings_template - - .base-test-install-scripts-template + - .oc.base-test-install-scripts-template variables: # The default behavior of opam is to use `nproc` to determine its level of # parallelism. This returns the number of CPU of the "host" CI runner @@ -82,23 +82,23 @@ install_bin_rc_fedora_37: - when: manual allow_failure: true -install_opam_focal: +oc.install_opam_focal: image: ocaml/opam:ubuntu-20.04 - extends: .install_opam_ubuntu_template + extends: .oc.install_opam_ubuntu_template -.compile_sources_template: +.oc.compile_sources_template: extends: - .default_settings_template - - .base-test-install-scripts-template + - .oc.base-test-install-scripts-template -compile_release_sources_bullseye: +oc.compile_release_sources_bullseye: image: ocaml/opam:debian-11 - extends: .compile_sources_template + extends: .oc.compile_sources_template script: - ./docs/introduction/compile-sources.sh tezos/tezos latest-release -compile_sources_bullseye: +oc.compile_sources_bullseye: image: ocaml/opam:debian-11 - extends: .compile_sources_template + extends: .oc.compile_sources_template script: - ./docs/introduction/compile-sources.sh ${CI_MERGE_REQUEST_SOURCE_PROJECT_PATH:-tezos/tezos} ${CI_MERGE_REQUEST_SOURCE_BRANCH_NAME:-master} diff --git a/.gitlab/ci/jobs/test/integration_compiler_rejections.yml b/.gitlab/ci/jobs/test/integration_compiler_rejections.yml index 29fb07aaeeab..812136a66822 100644 --- a/.gitlab/ci/jobs/test/integration_compiler_rejections.yml +++ b/.gitlab/ci/jobs/test/integration_compiler_rejections.yml @@ -1,4 +1,4 @@ -integration:compiler-rejections: +oc.integration:compiler-rejections: extends: .test_template script: - dune build @runtest_rejections diff --git a/.gitlab/ci/jobs/test/kernels.yml b/.gitlab/ci/jobs/test/kernels.yml index 830806725b73..f712c401edbb 100644 --- a/.gitlab/ci/jobs/test/kernels.yml +++ b/.gitlab/ci/jobs/test/kernels.yml @@ -1,6 +1,6 @@ test_kernels: extends: - - .kernels_template + - .oc.kernels_template stage: test needs: [trigger] dependencies: [] diff --git a/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml b/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml index 5691ffee28fc..15459d19a592 100644 --- a/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml +++ b/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml @@ -1,6 +1,6 @@ include: .gitlab/ci/jobs/test/common.yml -test-liquidity-baking-scripts: +oc.test-liquidity-baking-scripts: extends: .test_template rules: - changes: @@ -12,6 +12,6 @@ test-liquidity-baking-scripts: - .gitlab-ci.yml when: on_success dependencies: - - "build_x86_64-released" - - "build_x86_64-exp-dev-extra" + - "oc.build_x86_64-released" + - "oc.build_x86_64-exp-dev-extra" script: ./scripts/ci/test_liquidity_baking_scripts.sh diff --git a/.gitlab/ci/jobs/test/misc_checks.yml b/.gitlab/ci/jobs/test/misc_checks.yml index 91a39e638282..44103cc67291 100644 --- a/.gitlab/ci/jobs/test/misc_checks.yml +++ b/.gitlab/ci/jobs/test/misc_checks.yml @@ -1,4 +1,4 @@ -misc_checks: +oc.misc_checks: extends: - .default_settings_template - .image_template__runtime_build_test_dependencies @@ -40,7 +40,7 @@ kaitai_checks: retry: 0 needs: [trigger] needs: - - "build_x86_64-released" + - "oc.build_x86_64-released" before_script: - . ./scripts/version.sh script: @@ -75,7 +75,7 @@ kaitai_e2e_checks: contrib/kaitai-struct-files/files contrib/kaitai-struct-files/input -check_lift_limits_patch: +oc.check_lift_limits_patch: extends: - .test_template # These tests are not flaky at all so we overwrite the retry value diff --git a/.gitlab/ci/jobs/test/semgrep.yml b/.gitlab/ci/jobs/test/semgrep.yml index d94202693429..f85a7c09ae5c 100644 --- a/.gitlab/ci/jobs/test/semgrep.yml +++ b/.gitlab/ci/jobs/test/semgrep.yml @@ -1,4 +1,4 @@ -semgrep: +oc.semgrep: extends: - .default_settings_template rules: diff --git a/.gitlab/ci/jobs/test/tezt.yml b/.gitlab/ci/jobs/test/tezt.yml index f277589f8252..1d0cc93adafc 100644 --- a/.gitlab/ci/jobs/test/tezt.yml +++ b/.gitlab/ci/jobs/test/tezt.yml @@ -49,15 +49,15 @@ tezt:static-binaries: - .rules__octez_changes dependencies: # Fetch src/proto_*/parameters/*.json and tezt/tests/main.exe from - # build_x86_64-exp-dev-extra - - build_x86_64-exp-dev-extra + # oc.build_x86_64-exp-dev-extra + - oc.build_x86_64-exp-dev-extra # And fetch the static executables from build:static - - build:static-x86_64-linux-binaries - - tezt:fetch-records + - oc.build:static-x86_64-linux-binaries + - oc.tezt:fetch-records needs: - - build_x86_64-exp-dev-extra - - build:static-x86_64-linux-binaries - - tezt:fetch-records + - oc.build_x86_64-exp-dev-extra + - oc.build:static-x86_64-linux-binaries + - oc.tezt:fetch-records variables: TESTS: "cli" # Disable coverage diff --git a/.gitlab/ci/jobs/test/tezt_build_long.yml b/.gitlab/ci/jobs/test/tezt_build_long.yml index ba7218b28214..37131369c2da 100644 --- a/.gitlab/ci/jobs/test/tezt_build_long.yml +++ b/.gitlab/ci/jobs/test/tezt_build_long.yml @@ -2,12 +2,12 @@ # they can be built in the performance regression test framework executors. tezt:build-long: extends: - - .build_template + - .oc.build_template - .rules__octez_changes stage: test # Artificial needs for ordering. needs: - - "build_x86_64-released" - - "build_x86_64-exp-dev-extra" + - "oc.build_x86_64-released" + - "oc.build_x86_64-exp-dev-extra" script: - dune build @tezt/long_tests/check diff --git a/.gitlab/ci/jobs/test/unit.yml b/.gitlab/ci/jobs/test/unit.yml index 5d111455b7a2..2e7504b66e28 100644 --- a/.gitlab/ci/jobs/test/unit.yml +++ b/.gitlab/ci/jobs/test/unit.yml @@ -1,4 +1,4 @@ -.unit_test_template: +.oc.unit_test_template: extends: - .test_template - .rules__octez_changes @@ -16,15 +16,15 @@ expire_in: 1 day when: always -.unit_test_template_x86_64: - extends: .unit_test_template +.oc.unit_test_template_x86_64: + extends: .oc.unit_test_template variables: ARCH: "x86_64" -.unit_test_template_x86_64_coverage: +.oc.unit_test_template_x86_64_coverage: extends: - - .unit_test_template_x86_64 - - .template__coverage_files + - .oc.unit_test_template_x86_64 + - .oc.template__coverage_files script: - make $MAKE_TARGETS - ./scripts/ci/merge_coverage.sh @@ -34,40 +34,40 @@ - $BISECT_FILE - test_results -.unit_test_template_arm64: - extends: .unit_test_template +.oc.unit_test_template_arm64: + extends: .oc.unit_test_template needs: - - "build_arm64-released" - - "build_arm64-exp-dev-extra" + - "oc.build_arm64-released" + - "oc.build_arm64-exp-dev-extra" variables: ARCH: "arm64" tags: - arm64 -unit:non-proto-x86_64: +oc.unit:non-proto-x86_64: extends: - - .unit_test_template_x86_64_coverage + - .oc.unit_test_template_x86_64_coverage - .tags_template__no_gcp # The [lib_benchmark] unit tests require Python - .image_template__runtime_build_test_dependencies variables: MAKE_TARGETS: test-nonproto-unit -unit:other-x86_64: +oc.unit:other-x86_64: extends: - - .unit_test_template_x86_64_coverage + - .oc.unit_test_template_x86_64_coverage variables: MAKE_TARGETS: test-other-unit -unit:proto-x86_64: +oc.unit:proto-x86_64: extends: - - .unit_test_template_x86_64_coverage + - .oc.unit_test_template_x86_64_coverage variables: MAKE_TARGETS: test-proto-unit -unit:webassembly-x86_64: +oc.unit:webassembly-x86_64: extends: - - .unit_test_template_x86_64 + - .oc.unit_test_template_x86_64 # The wasm tests are written in Python - .image_template__runtime_build_test_dependencies variables: @@ -79,18 +79,18 @@ unit:webassembly-x86_64: # unnecessary. timeout: 20 min -unit:non-proto-arm64: +oc.unit:non-proto-arm64: extends: - - .unit_test_template_arm64 + - .oc.unit_test_template_arm64 # The [lib_benchmark] unit tests require Python - .image_template__runtime_build_test_dependencies - .tags_template__no_gcp_arm64 variables: MAKE_TARGETS: test-nonproto-unit test-webassembly -unit:js_components: +oc.unit:js_components: extends: - - .unit_test_template_x86_64 + - .oc.unit_test_template_x86_64 - .image_template__runtime_build_test_dependencies variables: # See `.gitlab-ci.yml` for details on `RUNTEZTALIAS` @@ -99,7 +99,7 @@ unit:js_components: - . ./scripts/install_build_deps.js.sh - make test-js -unit:protocol_compiles: - extends: .unit_test_template_x86_64 +oc.unit:protocol_compiles: + extends: .oc.unit_test_template_x86_64 script: - dune build @runtest_compile_protocol -- GitLab