diff --git a/.gitlab/ci/jobs/build/arm64.yml b/.gitlab/ci/jobs/build/arm64.yml index 0d0fec8fbe881a60241f0cc0d121e555365b2fbf..2fca58a047f1d62abd63dc565079710673666929 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" @@ -14,24 +14,29 @@ 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 # 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 ef120db513d0a3b07163317878e7c8d45c8c76b6..d3ba7233939033deb3518fd1e603f61b7508a7c2 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 b8401cf7579a0e632e7dafb91173621540c3a24b..4c7afeacedf9247add04d9d861f179b4eb866c91 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 840fa7827c8845669a7aa6bdf682cbcc1d2d6b1b..9cb6519f1120ff3cbbd9f1e069cc23ab49f24c16 100644 --- a/.gitlab/ci/jobs/build/check.yml +++ b/.gitlab/ci/jobs/build/check.yml @@ -1,7 +1,16 @@ ocaml-check: extends: - .tags_template__build - - .build + - .oc.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 4547fda685ed47dca6e14db7d633987369789557..15197ad0589564f4b3690f34c7dd6d0890c5daee 100644 --- a/.gitlab/ci/jobs/build/common.yml +++ b/.gitlab/ci/jobs/build/common.yml @@ -1,5 +1,7 @@ -.build: - extends: .build_template +.oc.build: + extends: + - .oc.build_template + - .rules__octez_changes variables: ARCH: "" # We fix the value of GIT_{SHORTREF,DATETIME,VERSION} (these are @@ -24,10 +26,11 @@ # 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 + - .rules__octez_changes stage: build variables: ARCH: "" @@ -38,12 +41,32 @@ paths: - "octez-binaries/$ARCH/*" -.build_docker_release_template: +.oc.build_docker_release_template: extends: - .image_template__docker - .docker_auth_template 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_experimental.yml b/.gitlab/ci/jobs/build/docker_amd64_experimental.yml index f5c9d9e7216e3cd280d504040cf79f9a4fd19ea1..b8ad0be0dd01e19ddbebf6d420d57a6c608957b8 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 e9cca0712e3499fb0f170c3ce07791b5109e1bd1..284f5c8cb5c8fec3761dcef01a6a5721fa66ef9b 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 419eba73803e5d6b4e7d70f401c8aa0a85787a50..751c79152fe7fbcdda0b18e8f90ffd53ce2886c9 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 4d844c0230dbcae99aa3d98066eebbe6ec6dbf01..92a44cedb987baab20082390437966d26e56824f 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_test_manual.yml @@ -1,11 +1,13 @@ 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: [] - when: manual + # override the rules inherited from .oc.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_experimental.yml b/.gitlab/ci/jobs/build/docker_arm64_experimental.yml index 8cddd3b79a51696ce14e93d47736cf98be35e408..ee9ad82773dc27f1b2c619c484ef54b6a38df666 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 01edd73fb9874fd0634defa2428ca0da06912b4a..a9087c401b8669e5225dfa87251a5f0fbd06f07a 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 7bcd51c272a772c4db39e1ded8f2de047e78c4b0..bcf4f4610e73ab12b03a538128d75461e588cd2e 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 be95b9701f2f0a3077b4f092b5184c7ef5211f61..da8dfd9529a67bb45b9bb1b1be18efc649cff6d8 100644 --- a/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml +++ b/.gitlab/ci/jobs/build/docker_arm64_test_manual.yml @@ -1,12 +1,14 @@ 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: [] - when: manual + # override the rules inherited from .oc.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 2d1ea6497ca753a639bdd5e68688dd776e2e0551..904de9f76988b9181dbc7061a1f3de503aeb4da0 100644 --- a/.gitlab/ci/jobs/build/get_contracts.yml +++ b/.gitlab/ci/jobs/build/get_contracts.yml @@ -3,6 +3,14 @@ include: .gitlab/ci/jobs/build/common.yml build_get_contracts: extends: - .tags_template__build - - .build_template + - .oc.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/kernels.yml b/.gitlab/ci/jobs/build/kernels.yml index 8959fb175f25fbafc35817dc1fde14cbf8b28997..e9dacd0b6c2ed80c2429f9378ff23e6d7db9e7db 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 534f6bec07554d9f98776ef68623ad91a53f5596..740e3ed7da831cada563fcd097fb40cd9cc290c6 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 29d09786baabf89134d9debe823d0ed124399b9c..720e54bc6cd7807fa16080dd7121b794191df15d 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 22f36ea956919c23ba73beb9df6c3151a48d0957..e92c95acd368131987949631a287bd553c716f03 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 e1289205b869999f627ed5b388fba11dea56fb96..4b0cbb445742b83234017f6d126c6f8aef28d8a7 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 9c5c85c8893460691ff6c385c29f31ef1cd69b1f..35710723056f77ff811e8a331c711d0c28867ccc 100644 --- a/.gitlab/ci/jobs/build/tezt_fetch_records.yml +++ b/.gitlab/ci/jobs/build/tezt_fetch_records.yml @@ -1,10 +1,11 @@ # 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: - 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 d43baf90ff45ba965219dd735bda2db3e3983994..d8e96fb2a08452f3249e3993c69532552f90180d 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,21 +11,31 @@ 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 + # this job everytime when pipeline is by Marge Bot. + - .rules__octez_changes_or_margebot 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 + # 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/common.yml b/.gitlab/ci/jobs/coverage/common.yml index df2dea1d14e9eb6b8303920d5587f81db582cd12..99bc3ae528c773540223f98f2b88b61881c2f7ca 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 a9de87a87d6f4204966cb954556fe5079a502d51..8e1c739ace060bc63d4864976b87792fb6a51c75 100644 --- a/.gitlab/ci/jobs/coverage/coverage.yml +++ b/.gitlab/ci/jobs/coverage/coverage.yml @@ -4,18 +4,24 @@ 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 # 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. @@ -93,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 2bd931ce627f066e69e79b67fba3710cc9552381..add1b3622a5460a23312a86f6bd1493830214112 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/build_all.yml b/.gitlab/ci/jobs/doc/build_all.yml index 4fe3f926f22615aa3a104cff8314096f0d706a69..f9c64ec028c1577e70189651dbe40626176be786 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 6397888c059afc4921e35e7f5a7ee3bd2e8772d0..b3f3e0324ee890e98b14b02fd2b9908dc644a210 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/doc/test_install_python.yml b/.gitlab/ci/jobs/doc/test_install_python.yml index a5cfadcdb55c7b998737a478cb9d664f7cd3dfe7..0cbcb033ae05d7a67dbbf2e5dd4e048ec48f9319 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 c5596a9a272f8e674837b21d2e77297d7d19b1fe..d8a8fa57aabe1e914272fc629f88fb4136eec0f8 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: + - 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 4e8e6280f6143dfbe78752da5da252402b633c46..37f70b7c661cb62e7b0a40dab3fa5580ce3cf868 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: + - 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 82dcd11659b415f48016fd3dae2129d081128e59..d358968424153b3a89552bf4a5132242573a34af 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 4e7e5c4cc493b7153a5353b6c2513a91590c1d2e..1e26d3830153c6d787f7195fcfbe548847cc3663 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 4e560383436fe1d2f7e01023459dda849c14e89b..80b288359ca784eaffcebc5eaf3662a4b09d14d2 100644 --- a/.gitlab/ci/jobs/shared/templates.yml +++ b/.gitlab/ci/jobs/shared/templates.yml @@ -25,28 +25,71 @@ .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: +.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 + - .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 48ed9f93141a42bb7f37440da58e801322b8a689..9d0502c4c981544b4367f0cd7edbd9aac96754c0 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 232b587737e3dd50e139bb7b63b1696a83e40ae5..bba6b698ed11246cf5fa3d2366ea0637318965b0 100644 --- a/.gitlab/ci/jobs/test/check_scripts.yml +++ b/.gitlab/ci/jobs/test/check_scripts.yml @@ -2,9 +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. -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 @@ -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: "oc.build_x86_64-released" + optional: true + - job: "oc.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 @@ -29,10 +35,11 @@ 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 + - .rules__octez_changes stage: test needs: [trigger] before_script: @@ -40,20 +47,28 @@ 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: - .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 8e2d7ac5401d6a972754f4371255aac4f6f78662..d68cf93783c9291fb8fdde4d55f8195eebec97fd 100644 --- a/.gitlab/ci/jobs/test/common.yml +++ b/.gitlab/ci/jobs/test/common.yml @@ -2,18 +2,21 @@ 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: - extends: .template__coverage +.oc.template__coverage_files: + extends: + - .oc.template__coverage + - .rules__octez_changes artifacts: name: "coverage-files-$CI_JOB_ID" paths: @@ -91,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. @@ -99,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 fa84f1ecb8febd190324ac3591acd2f23bc17b71..c82b60ea4e9ad5db16080373770653c197e58bfc 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 29fb07aaeeabe5ac4a8c0936a8cdf6bd534f870c..812136a6682216eec424590b8bd446330f0bc41f 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 d3edc596f13af1c9b3e25d34c348bc4f3a286346..f712c401edbb94214a93cb568ecfc85bf9ada454 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: [] @@ -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 3204e91fdf0f96fe33418f5d214d7a0584280e3b..15459d19a5923cbdbc69cd5e74081d6814aeb31c 100644 --- a/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml +++ b/.gitlab/ci/jobs/test/liquidity_baking_scripts-integrity.yml @@ -1,8 +1,17 @@ include: .gitlab/ci/jobs/test/common.yml -test-liquidity-baking-scripts: +oc.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" + - "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 37dbb4bec79a0bbc6b9fc2213a92dc90749dc246..44103cc672919303df9d96baa2123ca3ff0cd7d9 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 @@ -9,19 +9,38 @@ 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] needs: - - "build_x86_64-released" + - "oc.build_x86_64-released" before_script: - . ./scripts/version.sh script: @@ -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 @@ -48,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 @@ -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 6532232b7193e2abf6377ab90e649c756e21fd61..f85a7c09ae5c653543510cce901d9b0dce2d7211 100644 --- a/.gitlab/ci/jobs/test/semgrep.yml +++ b/.gitlab/ci/jobs/test/semgrep.yml @@ -1,6 +1,16 @@ -semgrep: +oc.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 97198e6d0696fd0922fa5cb47460de35e39bb7e4..1d0cc93adafc4c733df9468a236069855ab0381c 100644 --- a/.gitlab/ci/jobs/test/tezt.yml +++ b/.gitlab/ci/jobs/test/tezt.yml @@ -46,17 +46,18 @@ 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 - - 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 63474064d297de8d8ad0f622d9f6112443bf0507..37131369c2da860bab9f1359ce54ed33e9cab757 100644 --- a/.gitlab/ci/jobs/test/tezt_build_long.yml +++ b/.gitlab/ci/jobs/test/tezt_build_long.yml @@ -2,11 +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 fab2c99f13293901a79343e4d9111b7025a499f0..2e7504b66e288ab846e0b8f3a8af877d2d109d43 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 +.oc.unit_test_template: + extends: + - .test_template + - .rules__octez_changes variables: ARCH: "" MAKE_TARGETS: "" @@ -14,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 @@ -32,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: @@ -77,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` @@ -97,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