add cache status

This commit is contained in:
ruki
2025-01-14 00:54:38 +08:00
Unverified
parent 4bb9c40bd5
commit a72e3cb041
4 changed files with 33 additions and 1 deletions
+1 -1
View File
@@ -32,5 +32,5 @@ jobs:
cd test
echo 'add_requires("libpng", {system = false})' >> xmake.lua
echo 'add_packages("libpng")' >> xmake.lua
xmake -v -y
xmake -vD -y
xmake run
+20
View File
@@ -70,6 +70,16 @@ with:
xmake-version: '2.9.7'
package-cache-folder: '.xmake-package-cache'
package-cache-key: 'archlinux-ci'
package-cache-status: 'load'
- install packages
...
uses: xmake-io/github-action-setup-xmake@v1
with:
package-cache-folder: '.xmake-package-cache'
package-cache-key: 'archlinux-ci'
package-cache-status: 'save'
```
### Cache build
@@ -80,6 +90,16 @@ with:
xmake-version: '2.9.7'
build-cache-folder: '.xmake-build-cache'
build-cache-key: 'archlinux-ci'
build-cache-status: 'load'
- build project
...
uses: xmake-io/github-action-setup-xmake@v1
with:
build-cache-folder: '.xmake-build-cache'
build-cache-key: 'archlinux-ci'
build-cache-status: 'save'
```
## Contributing
+6
View File
@@ -22,12 +22,18 @@ inputs:
package-cache-key:
description: The packages cache key.
default: ''
package-cache-status:
description: The packages cache status, e.g. load/save.
default: ''
build-cache-folder:
description: 'Directory to cache build artifacts in. This folder will go under $GITHUB_HOME (I.e. build dir) and be cached using @actions/cache.'
default: ''
build-cache-key:
description: The build cache key.
default: ''
build-cache-status:
description: The build cache status, e.g. load/save.
default: ''
runs:
using: 'node20'
+6
View File
@@ -5,6 +5,12 @@ import { selectVersion } from './versions';
import { winInstall } from './win-install';
import { unixInstall } from './unix-install';
async function cacheBuild(): Promise<void> {
}
async function cachePackages(): Promise<void> {
}
async function run(): Promise<void> {
try {
const version = await selectVersion();