From 7d578aefe7fe8a730aef0c9d6cf2512d5528ce93 Mon Sep 17 00:00:00 2001 From: Ramon Roche Date: Fri, 9 Aug 2024 10:17:40 -0700 Subject: [PATCH] ci: shared cache key --- .github/workflows/build_all_targets.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_all_targets.yml b/.github/workflows/build_all_targets.yml index 33835174b1..b6a25d90aa 100644 --- a/.github/workflows/build_all_targets.yml +++ b/.github/workflows/build_all_targets.yml @@ -13,12 +13,15 @@ jobs: options: --user 1000 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} + timestamp: ${{ steps.set-timestamp.outputs.timestamp }} steps: - uses: actions/checkout@v1 with: token: ${{ secrets.ACCESS_TOKEN }} - id: set-matrix run: echo "::set-output name=matrix::$(./Tools/generate_board_targets_json.py --group)" + - id: set-timestamp + run: echo "::set-output name=timestamp::$(date +"%Y%m%d%H%M%S")" setup: name: ${{ matrix.group }} @@ -37,19 +40,12 @@ jobs: # - name: ownership workaround # run: git config --system --add safe.directory '*' - - name: ccache setup timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: ccache setup keys uses: actions/cache@v2 with: path: ~/.ccache - key: ${{ matrix.arch }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} - restore-keys: ${{ matrix.arch }}-ccache- + key: ${{ matrix.arch }}-ccache-${{ needs.group_targets.outputs.timestamp }} + restore-keys: ${{ matrix.arch }}-ccache-${{ needs.group_targets.outputs.timestamp }} - name: setup ccache run: |