Workflow: use model name for ccache

pull/849/head
Viktor 2023-06-05 17:34:48 +02:00 committed by viktorxda
parent 3d0693ff2f
commit c04c2f1824
1 changed files with 3 additions and 10 deletions

View File

@ -200,30 +200,23 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Determine toolchain
run: |
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
CONFIG=$(make BOARD=${{matrix.platform}}_${{matrix.release}} info)
VENDOR=$(echo ${CONFIG} | grep -oP "VENDOR=\K\w+")
FAMILY=$(echo ${CONFIG} | grep -oP "FAMILY=\K\w+")
echo CCACHE=${VENDOR}-${FAMILY} >> ${GITHUB_ENV}
- name: Setup ccache - name: Setup ccache
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
path: /tmp/ccache path: /tmp/ccache
key: ${{env.CCACHE}} key: ${{matrix.platform}}
- name: Restore ccache - name: Restore ccache
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
uses: actions/cache/restore@v3 uses: actions/cache/restore@v3
with: with:
path: /tmp/ccache path: /tmp/ccache
key: ${{env.CCACHE}} key: ${{matrix.platform}}
- name: Build firmware - name: Build firmware
run: | run: |
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
MODEL=${{matrix.platform}} MODEL=${{matrix.platform}}
RELEASE=${{matrix.release}} RELEASE=${{matrix.release}}
CONFIG=$(find br-ext-chip-* -name ${MODEL}_${RELEASE}_defconfig) CONFIG=$(find br-ext-chip-* -name ${MODEL}_${RELEASE}_defconfig)