From 6b9cfe4862409fd6172bb59d5851b304af3d8608 Mon Sep 17 00:00:00 2001 From: Thomas Letan Date: Sat, 30 Nov 2024 17:16:12 +0100 Subject: [PATCH] CI: Build using `OCTEZ_RUST_DEPS_TARGET_DIR` --- .gitlab/ci/pipelines/before_merging.yml | 25 +++++++++++++++++++ .gitlab/ci/pipelines/master_branch.yml | 20 +++++++++++++++ .gitlab/ci/pipelines/merge_train.yml | 25 +++++++++++++++++++ .gitlab/ci/pipelines/non_release_tag.yml | 10 ++++++++ .gitlab/ci/pipelines/non_release_tag_test.yml | 10 ++++++++ .../ci/pipelines/octez_beta_release_tag.yml | 10 ++++++++ .../pipelines/octez_evm_node_release_tag.yml | 10 ++++++++ .gitlab/ci/pipelines/octez_release_tag.yml | 10 ++++++++ .../ci/pipelines/octez_release_tag_test.yml | 10 ++++++++ .../pipelines/schedule_extended_rpc_test.yml | 10 ++++++++ .../ci/pipelines/schedule_extended_test.yml | 25 +++++++++++++++++++ .../schedule_extended_validation_test.yml | 10 ++++++++ .../schedule_master_test_release.yml | 10 ++++++++ ci/bin/common.ml | 16 ++++++++++-- 14 files changed, 199 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/pipelines/before_merging.yml b/.gitlab/ci/pipelines/before_merging.yml index 14526299232f..7ec335ee317a 100644 --- a/.gitlab/ci/pipelines/before_merging.yml +++ b/.gitlab/ci/pipelines/before_merging.yml @@ -398,6 +398,10 @@ oc.build_arm64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -413,6 +417,7 @@ oc.build_arm64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -448,6 +453,10 @@ oc.build_arm64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -465,6 +474,7 @@ oc.build_arm64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -545,6 +555,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -559,6 +573,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: paths: - octez-binaries/$ARCH/* @@ -630,6 +645,10 @@ oc.build_x86_64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -645,6 +664,7 @@ oc.build_x86_64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG @@ -726,6 +746,10 @@ oc.build_x86_64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push - key: dune-build-cache-$CI_PIPELINE_ID paths: - $CI_PROJECT_DIR/_dune_cache @@ -749,6 +773,7 @@ oc.build_x86_64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx DUNE_CACHE: enabled DUNE_CACHE_STORAGE_MODE: hardlink diff --git a/.gitlab/ci/pipelines/master_branch.yml b/.gitlab/ci/pipelines/master_branch.yml index 26a744142bc9..de5e0137add8 100644 --- a/.gitlab/ci/pipelines/master_branch.yml +++ b/.gitlab/ci/pipelines/master_branch.yml @@ -92,6 +92,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -106,6 +110,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: paths: - octez-binaries/$ARCH/* @@ -129,6 +134,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -143,6 +152,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: paths: - octez-binaries/$ARCH/* @@ -167,6 +177,10 @@ oc.build_arm64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -182,6 +196,7 @@ oc.build_arm64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -215,6 +230,10 @@ oc.build_arm64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -232,6 +251,7 @@ oc.build_arm64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day diff --git a/.gitlab/ci/pipelines/merge_train.yml b/.gitlab/ci/pipelines/merge_train.yml index 580c1620d69f..a9c8f73b4dc7 100644 --- a/.gitlab/ci/pipelines/merge_train.yml +++ b/.gitlab/ci/pipelines/merge_train.yml @@ -397,6 +397,10 @@ oc.build_arm64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -412,6 +416,7 @@ oc.build_arm64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -447,6 +452,10 @@ oc.build_arm64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -464,6 +473,7 @@ oc.build_arm64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -544,6 +554,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -558,6 +572,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: paths: - octez-binaries/$ARCH/* @@ -629,6 +644,10 @@ oc.build_x86_64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh @@ -644,6 +663,7 @@ oc.build_x86_64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG @@ -725,6 +745,10 @@ oc.build_x86_64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push - key: dune-build-cache-$CI_PIPELINE_ID paths: - $CI_PROJECT_DIR/_dune_cache @@ -748,6 +772,7 @@ oc.build_x86_64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx DUNE_CACHE: enabled DUNE_CACHE_STORAGE_MODE: hardlink diff --git a/.gitlab/ci/pipelines/non_release_tag.yml b/.gitlab/ci/pipelines/non_release_tag.yml index 9fe864cb824f..147f84c47869 100644 --- a/.gitlab/ci/pipelines/non_release_tag.yml +++ b/.gitlab/ci/pipelines/non_release_tag.yml @@ -85,6 +85,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -99,6 +103,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -123,6 +128,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -137,6 +146,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/.gitlab/ci/pipelines/non_release_tag_test.yml b/.gitlab/ci/pipelines/non_release_tag_test.yml index dff611b121ce..a0e0d87d95e7 100644 --- a/.gitlab/ci/pipelines/non_release_tag_test.yml +++ b/.gitlab/ci/pipelines/non_release_tag_test.yml @@ -85,6 +85,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -99,6 +103,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -123,6 +128,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -137,6 +146,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/.gitlab/ci/pipelines/octez_beta_release_tag.yml b/.gitlab/ci/pipelines/octez_beta_release_tag.yml index 631c5ab4a8ca..64db2abfd64b 100644 --- a/.gitlab/ci/pipelines/octez_beta_release_tag.yml +++ b/.gitlab/ci/pipelines/octez_beta_release_tag.yml @@ -85,6 +85,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -99,6 +103,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -123,6 +128,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -137,6 +146,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/.gitlab/ci/pipelines/octez_evm_node_release_tag.yml b/.gitlab/ci/pipelines/octez_evm_node_release_tag.yml index 72161cadbf9e..e00e0b5d490b 100644 --- a/.gitlab/ci/pipelines/octez_evm_node_release_tag.yml +++ b/.gitlab/ci/pipelines/octez_evm_node_release_tag.yml @@ -82,6 +82,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -97,6 +101,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -119,6 +124,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -134,6 +143,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/.gitlab/ci/pipelines/octez_release_tag.yml b/.gitlab/ci/pipelines/octez_release_tag.yml index ebe1edf0073e..8c5c242c709d 100644 --- a/.gitlab/ci/pipelines/octez_release_tag.yml +++ b/.gitlab/ci/pipelines/octez_release_tag.yml @@ -86,6 +86,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -100,6 +104,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -124,6 +129,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -138,6 +147,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/.gitlab/ci/pipelines/octez_release_tag_test.yml b/.gitlab/ci/pipelines/octez_release_tag_test.yml index 79da0f0833b4..dc35f6d3dd12 100644 --- a/.gitlab/ci/pipelines/octez_release_tag_test.yml +++ b/.gitlab/ci/pipelines/octez_release_tag_test.yml @@ -86,6 +86,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -100,6 +104,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -124,6 +129,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -138,6 +147,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/.gitlab/ci/pipelines/schedule_extended_rpc_test.yml b/.gitlab/ci/pipelines/schedule_extended_rpc_test.yml index db4e71d35a14..0e28d2b3d574 100644 --- a/.gitlab/ci/pipelines/schedule_extended_rpc_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_rpc_test.yml @@ -380,6 +380,10 @@ oc.build_x86_64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -396,6 +400,7 @@ oc.build_x86_64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG @@ -427,6 +432,10 @@ oc.build_x86_64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -445,6 +454,7 @@ oc.build_x86_64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG diff --git a/.gitlab/ci/pipelines/schedule_extended_test.yml b/.gitlab/ci/pipelines/schedule_extended_test.yml index d200512223c0..19f5cb1ace2d 100644 --- a/.gitlab/ci/pipelines/schedule_extended_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_test.yml @@ -293,6 +293,10 @@ oc.build_arm64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -309,6 +313,7 @@ oc.build_arm64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -341,6 +346,10 @@ oc.build_arm64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -359,6 +368,7 @@ oc.build_arm64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG expire_in: 1 day @@ -391,6 +401,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -406,6 +420,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: paths: - octez-binaries/$ARCH/* @@ -429,6 +444,10 @@ oc.build_x86_64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -445,6 +464,7 @@ oc.build_x86_64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG @@ -478,6 +498,10 @@ oc.build_x86_64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push - key: dune-build-cache-$CI_PIPELINE_ID paths: - $CI_PROJECT_DIR/_dune_cache @@ -502,6 +526,7 @@ oc.build_x86_64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx DUNE_CACHE: enabled DUNE_CACHE_STORAGE_MODE: hardlink diff --git a/.gitlab/ci/pipelines/schedule_extended_validation_test.yml b/.gitlab/ci/pipelines/schedule_extended_validation_test.yml index db4e71d35a14..0e28d2b3d574 100644 --- a/.gitlab/ci/pipelines/schedule_extended_validation_test.yml +++ b/.gitlab/ci/pipelines/schedule_extended_validation_test.yml @@ -380,6 +380,10 @@ oc.build_x86_64-released: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -396,6 +400,7 @@ oc.build_x86_64-released: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG @@ -427,6 +432,10 @@ oc.build_x86_64-exp-dev-extra: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push interruptible: false before_script: - ./scripts/ci/take_ownership.sh @@ -445,6 +454,7 @@ oc.build_x86_64-exp-dev-extra: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target COVERAGE_OPTIONS: --instrument-with bisect_ppx artifacts: name: build-$ARCH-$CI_COMMIT_REF_SLUG diff --git a/.gitlab/ci/pipelines/schedule_master_test_release.yml b/.gitlab/ci/pipelines/schedule_master_test_release.yml index ad0ae898753b..9bba7e42b125 100644 --- a/.gitlab/ci/pipelines/schedule_master_test_release.yml +++ b/.gitlab/ci/pipelines/schedule_master_test_release.yml @@ -85,6 +85,10 @@ oc.build:static-x86_64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -99,6 +103,7 @@ oc.build:static-x86_64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: @@ -123,6 +128,10 @@ oc.build:static-arm64-linux-binaries: paths: - $CI_PROJECT_DIR/_sccache policy: pull-push + - key: rust-deps-target-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_target + policy: pull-push before_script: - ./scripts/ci/take_ownership.sh - eval $(opam env) @@ -137,6 +146,7 @@ oc.build:static-arm64-linux-binaries: CARGO_NET_OFFLINE: "false" SCCACHE_DIR: $CI_PROJECT_DIR/_sccache SCCACHE_CACHE_SIZE: 5G + OCTEZ_RUST_DEPS_TARGET_DIR: $CI_PROJECT_DIR/_target artifacts: expire_in: 90 days paths: diff --git a/ci/bin/common.ml b/ci/bin/common.ml index 10c161d31497..ff683c9d90cd 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -285,6 +285,18 @@ let enable_sccache ?key ?error_log ?idle_timeout ?log |> append_before_script [". ./scripts/ci/sccache-start.sh"] |> append_after_script ["./scripts/ci/sccache-stop.sh"] +let enable_octez_rust_deps_target_dir ?key job = + let key = + Option.value + ~default: + ("rust-deps-target-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) + key + in + let path = "$CI_PROJECT_DIR/_target" in + job + |> append_variables [("OCTEZ_RUST_DEPS_TARGET_DIR", path)] + |> append_cache (cache ~key [path]) + (** Allow cargo to access the network by setting [CARGO_NET_OFFLINE=false]. This function should only be applied to jobs that have a GitLab CI @@ -939,7 +951,7 @@ let job_build_static_binaries ~__POS__ ~arch @ version_executable) ~artifacts ["./scripts/ci/build_static_binaries.sh"] - |> enable_cargo_cache |> enable_sccache + |> enable_cargo_cache |> enable_sccache |> enable_octez_rust_deps_target_dir (** Type of Docker build jobs. @@ -1205,7 +1217,7 @@ let job_build_dynamic_binaries ?rules ~__POS__ ~arch ?(release = false) ~variables ~artifacts ["./scripts/ci/build_full_unreleased.sh"] - |> enable_cargo_cache |> enable_sccache + |> enable_cargo_cache |> enable_sccache |> enable_octez_rust_deps_target_dir in (* Disable coverage for arm64 *) if arch = Amd64 then enable_coverage_instrumentation job else job -- GitLab