From 004ff1bd93eeb57b9578c1e506cb402bbac7dba1 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Thu, 2 May 2019 15:16:52 +0300 Subject: [PATCH] CI: refactor configuration file Cache instructions will query system to check if existing cache is available. While cache will unlikely to be available in build task, it is better to make it queried before build so if cache folder appear, it will be deleted by `rm -rf "debs-${TERMUX_ARCH}"`. --- .cirrus.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 7ae2851ed..dc2d5e773 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -31,6 +31,23 @@ build_task: git reset --hard "$CIRRUS_CHANGE_IN_REPO" fi + # Setup cache to make built packages available for the next tasks. + share_aarch64_packages_cache: + folder: "./cached-debs-aarch64" + fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-aarch64" + + share_arm_packages_cache: + folder: "./cached-debs-arm" + fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-arm" + + share_i686_packages_cache: + folder: "./cached-debs-i686" + fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-i686" + + share_x86_64_packages_cache: + folder: "./cached-debs-x86_64" + fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-x86_64" + # Determine changes in repository and build modified packages. build_script: | for package in $(./scripts/build/ci/determine_git_changes.sh); do @@ -48,23 +65,6 @@ build_task: cp -a "cached-debs-${TERMUX_ARCH}" ./debs fi - # Make built packages available for the next tasks. - share_aarch64_packages_cache: - folder: "./cached-debs-aarch64" - fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-aarch64" - - share_arm_packages_cache: - folder: "./cached-debs-arm" - fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-arm" - - share_i686_packages_cache: - folder: "./cached-debs-i686" - fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-i686" - - share_x86_64_packages_cache: - folder: "./cached-debs-x86_64" - fingerprint_script: echo "${CIRRUS_CHANGE_IN_REPO}-x86_64" - # Also make them downloadable from the UI. store_packages_artifacts: path: "./debs/*.deb"