Add xmake cache folder

This commit is contained in:
SirLynix
2022-11-18 21:34:36 +01:00
parent 2946fc7f0d
commit 5fb974f24c
5 changed files with 15 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ jobs:
steps:
- name: Get current date as package key
id: pkg_key
id: cache_key
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
- name: Checkout repository
@@ -50,6 +50,7 @@ jobs:
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
# Update xmake repository (in order to have the file that will be cached)
- name: Update xmake repository
@@ -65,7 +66,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: Linux-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.pkg_key.outputs.key }}
key: Linux-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-W${{ steps.cache_key.outputs.key }}
# Setup compilation mode and install project dependencies
- name: Configure xmake and install dependencies