add cache status
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user