Add cache

This commit is contained in:
Andrzej Janik 2024-04-27 23:57:08 +02:00
commit 7ec6bd0f16

View file

@ -28,6 +28,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build
# We use tar to unpack .tar.gz we've created because Github actions/upload-artifact
# is broken and will _always_ zip your artifact (even if it is a single file).
@ -38,7 +39,7 @@ jobs:
tar -xzf target/release/zluda.tar.gz -C target/release
# https://stackoverflow.com/a/64195658
- name: Set revision hash
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Upload
uses: actions/upload-artifact@v4
with:
@ -51,6 +52,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: Swatinem/rust-cache@v2
- name: Build
run: |
cargo xtask zip -r
@ -61,5 +63,5 @@ jobs:
- name: Upload
uses: actions/upload-artifact@v4
with:
name: zluda-linux-${{ env.SHORT_SHA }}
name: zluda-windows-${{ env.SHORT_SHA }}
path: target/release/zluda