ci: shared cache key

This commit is contained in:
Ramon Roche 2024-08-09 10:17:40 -07:00
parent 4ebd4e75ad
commit 7d578aefe7
No known key found for this signature in database
GPG Key ID: 275988FAE5821713

View File

@ -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: |