gh-actions: interchange: use commit sha as cache key

Signed-off-by: Alessandro Comodi <acomodi@antmicro.com>
This commit is contained in:
Alessandro Comodi 2021-05-20 19:57:03 +02:00
parent 6e22a9ea97
commit 9dce00a4e7

View File

@ -22,14 +22,17 @@ jobs:
uses: hendrikmuhs/ccache-action@v1 uses: hendrikmuhs/ccache-action@v1
- name: Get yosys - name: Get yosys
run: git clone https://github.com/YosysHQ/yosys.git run: |
git clone https://github.com/YosysHQ/yosys.git
cd yosys
echo "YOSYS_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Cache yosys installation - name: Cache yosys installation
uses: actions/cache@v2 uses: actions/cache@v2
id: cache-yosys id: cache-yosys
with: with:
path: .yosys path: .yosys
key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }} key: cache-yosys-${{ env.YOSYS_SHA }}
- name: Build yosys - name: Build yosys
run: | run: |
@ -88,14 +91,17 @@ jobs:
uses: hendrikmuhs/ccache-action@v1 uses: hendrikmuhs/ccache-action@v1
- name: Get yosys - name: Get yosys
run: git clone https://github.com/YosysHQ/yosys.git run: |
git clone https://github.com/YosysHQ/yosys.git
cd yosys
echo "YOSYS_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
- name: Cache yosys installation - name: Cache yosys installation
uses: actions/cache@v2 uses: actions/cache@v2
id: cache-yosys id: cache-yosys
with: with:
path: .yosys path: .yosys
key: cache-yosys-${{ hashFiles('**/yosys/.git/HEAD') }} key: cache-yosys-${{ env.YOSYS_SHA }}
- name: Build yosys - name: Build yosys
run: | run: |