From 3bfe297c21876fa265f73e1040db563f55f3282f Mon Sep 17 00:00:00 2001 From: mujx Date: Sun, 18 Sep 2022 21:47:44 +0300 Subject: [PATCH] ci: Use dedicated runners for the build jobs The runners are configured to use the dune cache, which is a directory mounted on the docker container during the build time. Note that the executing jobs on the dedicated runners is controller by the `dedicated` tag and is only allocated for the build related jobs. Update tag name --- .gitlab/ci/jobs/build/docker_amd64_release.yml | 4 +++- .gitlab/ci/jobs/build/get_contracts.yml | 4 +++- .gitlab/ci/jobs/build/static_x86_64_linux_binaries.yml | 2 ++ .gitlab/ci/jobs/build/x86_64.yml | 2 ++ scripts/build_and_install_static_binaries.sh | 3 +++ scripts/ci/build_full_unreleased.sh | 4 ++-- 6 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/jobs/build/docker_amd64_release.yml b/.gitlab/ci/jobs/build/docker_amd64_release.yml index 150e956c66f8..f3a5fe66e3ef 100644 --- a/.gitlab/ci/jobs/build/docker_amd64_release.yml +++ b/.gitlab/ci/jobs/build/docker_amd64_release.yml @@ -6,4 +6,6 @@ docker:amd64: variables: IMAGE_ARCH_PREFIX: "amd64_" CI_DOCKER_HUB: "true" - stage: build \ No newline at end of file + stage: build + tags: + - build_dedicated diff --git a/.gitlab/ci/jobs/build/get_contracts.yml b/.gitlab/ci/jobs/build/get_contracts.yml index ec505d8d83af..2350e417e8d8 100644 --- a/.gitlab/ci/jobs/build/get_contracts.yml +++ b/.gitlab/ci/jobs/build/get_contracts.yml @@ -4,4 +4,6 @@ build_get_contracts: extends: - .build_template script: - - dune build @devtools/get_contracts/check \ No newline at end of file + - dune build @devtools/get_contracts/check + tags: + - build_dedicated diff --git a/.gitlab/ci/jobs/build/static_x86_64_linux_binaries.yml b/.gitlab/ci/jobs/build/static_x86_64_linux_binaries.yml index 255cf05d7b1d..1d0ba5f2f3c9 100644 --- a/.gitlab/ci/jobs/build/static_x86_64_linux_binaries.yml +++ b/.gitlab/ci/jobs/build/static_x86_64_linux_binaries.yml @@ -13,3 +13,5 @@ build:static-x86_64-linux-binaries: needs: [trigger] variables: ARCH: "x86_64" + tags: + - build_dedicated diff --git a/.gitlab/ci/jobs/build/x86_64.yml b/.gitlab/ci/jobs/build/x86_64.yml index 70918fd9280d..d472507c88a4 100644 --- a/.gitlab/ci/jobs/build/x86_64.yml +++ b/.gitlab/ci/jobs/build/x86_64.yml @@ -8,3 +8,5 @@ build_x86_64: needs: [trigger] variables: ARCH: "x86_64" + tags: + - build_dedicated diff --git a/scripts/build_and_install_static_binaries.sh b/scripts/build_and_install_static_binaries.sh index 53587eedf1ce..82fa483d460b 100755 --- a/scripts/build_and_install_static_binaries.sh +++ b/scripts/build_and_install_static_binaries.sh @@ -38,3 +38,6 @@ if [ "$SHA" != "$client_version" ]; then exit 1 fi echo "octez-client --version returned the expected commit hash: $SHA" + +# Trim the dune cache, if used. +dune cache trim --size=250GB diff --git a/scripts/ci/build_full_unreleased.sh b/scripts/ci/build_full_unreleased.sh index 0cc81049a494..f67e4d5a7a56 100755 --- a/scripts/ci/build_full_unreleased.sh +++ b/scripts/ci/build_full_unreleased.sh @@ -27,5 +27,5 @@ make build-unreleased # shellcheck disable=SC2086 dune build ${COVERAGE_OPTIONS} src/bin_tps_evaluation -# 4. clean-up caches before uploading the cache -opam clean \ No newline at end of file +# Trim the dune cache, if used. +dune cache trim --size=250GB -- GitLab