mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
ci: shared cache key
This commit is contained in:
parent
4ebd4e75ad
commit
7d578aefe7
14
.github/workflows/build_all_targets.yml
vendored
14
.github/workflows/build_all_targets.yml
vendored
@ -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: |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user