From c2d92b01320b7d37a0c7a7fec5c54dafba52a780 Mon Sep 17 00:00:00 2001 From: rudy Date: Fri, 8 Apr 2022 14:50:47 +0200 Subject: [PATCH] feat(ci): pruning keysetcache content --- .github/workflows/continuous-integration.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 944b18a68..ce34a1a14 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -77,6 +77,11 @@ jobs: cd compiler GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make keysetcache_ci_populated + - name: Mark KeySetCache + if: ${{ matrix.compiler == 'gcc7' }} + run: | + touch keysetcache.timestamp + - name: Build and test compiler if: ${{ matrix.compiler == 'gcc7' }} uses: addnab/docker-run-action@v3 @@ -100,6 +105,18 @@ jobs: ccache -s chmod -R ugo+rwx /tmp/KeySetCache + - name: Prune KeySetCache + if: ${{ matrix.compiler == 'gcc7' }} + run: | + TO_CLEAN=$(find KeySetCache/* -maxdepth 1 -mindepth 1 -not -newer keysetcache.timestamp -type d) + if [ -n "$TO_CLEAN" ] + then + echo Cleaning $TO_CLEAN + rm -rf $TO_CLEAN + else + echo Nothing to clean + fi + - name: Upload KeySetCache if: ${{ matrix.compiler == 'gcc7' && github.ref == 'refs/heads/master' }} uses: actions/upload-artifact@v3