From 3f9fea7d907ee404e31ab7d1aff7c91449c87e9d Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Wed, 16 Oct 2024 10:32:31 +0100 Subject: [PATCH] build-yocto: cleanup sstate-cache Signed-off-by: Jose Quaresma --- .github/workflows/build-yocto.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-yocto.yml b/.github/workflows/build-yocto.yml index eaa99d3c..86fe4c92 100644 --- a/.github/workflows/build-yocto.yml +++ b/.github/workflows/build-yocto.yml @@ -42,7 +42,13 @@ jobs: compile: needs: kas-lock + env: + CACHE_DIR: /srv/gh-runners/quic-yocto + DL_DIR: ${{ env.CACHE_DIR }}/downloads + SSTATE_DIR: ${{ env.CACHE_DIR }}/sstate-cache + KAS_WORK_DIR: ${{ env.GITHUB_WORKSPACE }}/../kas strategy: + max-parallel: 1 fail-fast: true matrix: machine: @@ -63,9 +69,12 @@ jobs: - name: Kas build run: | - export CACHE_DIR=/srv/gh-runners/quic-yocto - export DL_DIR=${CACHE_DIR}/downloads - export SSTATE_DIR=${CACHE_DIR}/sstate-cache - export KAS_WORK_DIR=$PWD/../kas mkdir $KAS_WORK_DIR kas build ci/mirror.yml:ci/${{ matrix.machine }}.yml + + - name: Cleanup sstate-cache + run: | + SSTATE_CACHE_MANAGEMENT="${PWD}/poky/scripts/sstate-cache-management.py --cache-dir ${{ env.SSTATE_DIR }} --remove-duplicated --remove-orphans --debug" + #FIXME: only to check, when done remove the "echo no" and add the "--yes" arg + SSTATE_CACHE_MANAGEMENT="echo no | $SSTATE_CACHE_MANAGEMENT" + kas shell ci/${{ matrix.machine }}.yml --command "$SSTATE_CACHE_MANAGEMENT"