add cache status
This commit is contained in:
@@ -32,5 +32,5 @@ jobs:
|
|||||||
cd test
|
cd test
|
||||||
echo 'add_requires("libpng", {system = false})' >> xmake.lua
|
echo 'add_requires("libpng", {system = false})' >> xmake.lua
|
||||||
echo 'add_packages("libpng")' >> xmake.lua
|
echo 'add_packages("libpng")' >> xmake.lua
|
||||||
xmake -v -y
|
xmake -vD -y
|
||||||
xmake run
|
xmake run
|
||||||
|
|||||||
@@ -70,6 +70,16 @@ with:
|
|||||||
xmake-version: '2.9.7'
|
xmake-version: '2.9.7'
|
||||||
package-cache-folder: '.xmake-package-cache'
|
package-cache-folder: '.xmake-package-cache'
|
||||||
package-cache-key: 'archlinux-ci'
|
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
|
### Cache build
|
||||||
@@ -80,6 +90,16 @@ with:
|
|||||||
xmake-version: '2.9.7'
|
xmake-version: '2.9.7'
|
||||||
build-cache-folder: '.xmake-build-cache'
|
build-cache-folder: '.xmake-build-cache'
|
||||||
build-cache-key: 'archlinux-ci'
|
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
|
## Contributing
|
||||||
|
|||||||
@@ -22,12 +22,18 @@ inputs:
|
|||||||
package-cache-key:
|
package-cache-key:
|
||||||
description: The packages cache key.
|
description: The packages cache key.
|
||||||
default: ''
|
default: ''
|
||||||
|
package-cache-status:
|
||||||
|
description: The packages cache status, e.g. load/save.
|
||||||
|
default: ''
|
||||||
build-cache-folder:
|
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.'
|
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: ''
|
default: ''
|
||||||
build-cache-key:
|
build-cache-key:
|
||||||
description: The build cache key.
|
description: The build cache key.
|
||||||
default: ''
|
default: ''
|
||||||
|
build-cache-status:
|
||||||
|
description: The build cache status, e.g. load/save.
|
||||||
|
default: ''
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node20'
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ import { selectVersion } from './versions';
|
|||||||
import { winInstall } from './win-install';
|
import { winInstall } from './win-install';
|
||||||
import { unixInstall } from './unix-install';
|
import { unixInstall } from './unix-install';
|
||||||
|
|
||||||
|
async function cacheBuild(): Promise<void> {
|
||||||
|
}
|
||||||
|
|
||||||
|
async function cachePackages(): Promise<void> {
|
||||||
|
}
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const version = await selectVersion();
|
const version = await selectVersion();
|
||||||
|
|||||||
Reference in New Issue
Block a user