xmake-io / github-action-setup-xmake

Set up your GitHub Actions workflow with a specific version of xmake

Home Page:https://xmake.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

actions-cache-folder should take commit into account

SirLynix opened this issue · comments

Is your feature request related to a problem? Please describe.

When using actions-cache-folder and dev branch, we don't get last changes.

For example:

Run xmake-io/github-action-setup-xmake@v1
  with:
    xmake-version: branch@dev
    actions-cache-folder: .xmake-cache-W48
  env:
    XMAKE_GLOBALDIR: /home/runner/work/NazaraEngine/xmake-global
Selected xmake branch dev (commit: 4771f4df)
Received 1386865 of 1386865 (100.0%), 10.3 MBs/sec
Cache Size: ~1 MB (1386865 B)
/usr/bin/tar --use-compress-program unzstd -xf /home/runner/work/_temp/e7946da8-0438-4c5c-8[2](https://github.com/NazaraEngine/NazaraEngine/actions/runs/3562719326/jobs/5985834520#step:6:2)9[3](https://github.com/NazaraEngine/NazaraEngine/actions/runs/3562719326/jobs/5985834520#step:6:3)-f3cea2edd1ec/cache.tzst -P -C /home/runner/work/NazaraEngine/NazaraEngine
Cache restored successfully
/home/runner/work/NazaraEngine/NazaraEngine/.xmake-cache-W[4](https://github.com/NazaraEngine/NazaraEngine/actions/runs/3562719326/jobs/5985834520#step:6:4)[8](https://github.com/NazaraEngine/NazaraEngine/actions/runs/3562719326/jobs/5985834520#step:6:9)/bin/xmake --version
/home/runner/work/NazaraEngine/NazaraEngine/.xmake-cache-W48/bin/xmake --version
xmake v2.7.3+HEAD.d784affbf, A cross-platform build utility based on Lua
Run xmake-io/github-action-setup-xmake@v1
  with:
    xmake-version: branch@dev
    actions-cache-folder: .xmake-cache-W48
  env:
    XMAKE_GLOBALDIR: /home/runner/work/NazaraEngine/xmake-global
Selected xmake branch dev (commit: d784affb)
Received 1386865 of 1386865 (100.0%), 4.4 MBs/sec
Cache Size: ~1 MB (1386865 B)
/usr/bin/tar --use-compress-program unzstd -xf /home/runner/work/_temp/907c0153-bae3-4c64-9e7e-b18b77[2](https://github.com/NazaraEngine/NazaraEngine/actions/runs/3562719326/jobs/5984701245#step:6:2)[8](https://github.com/NazaraEngine/NazaraEngine/actions/runs/3562719326/jobs/5984701245#step:6:9)20b0/cache.tzst -P -C /home/runner/work/NazaraEngine/NazaraEngine
Cache restored successfully
/home/runner/work/NazaraEngine/NazaraEngine/.xmake-cache-W48/bin/xmake --version
xmake v2.7.3+HEAD.d784affbf, A cross-platform build utility based on Lua

Here the xmake dev commit is different (4771f4df and d784affb) but it gets the same version (d784affb).

Describe the solution you'd like

This could be avoided if the actions cache folder appended the dev commit hash.

Also, does it append the xmake version?

Describe alternatives you've considered

No response

Additional context

No response

commented

cache folder only support the given xmake version, does not support branch now.

commented

I have supported it, try it again. But I have not tested it.

commented

It should work, I tested it.

I can confirm it works, thank you.