diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f6cb2a0..39355ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/README.md b/README.md index 6c40ad8..5f5f161 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/action.yml b/action.yml index ed962c1..2f584ba 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/src/index.ts b/src/index.ts index c47ea5a..a7bb0ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,6 +5,12 @@ import { selectVersion } from './versions'; import { winInstall } from './win-install'; import { unixInstall } from './unix-install'; +async function cacheBuild(): Promise { +} + +async function cachePackages(): Promise { +} + async function run(): Promise { try { const version = await selectVersion();