update readme and tests
This commit is contained in:
@@ -22,10 +22,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
xmake-version: ${{ matrix.version }}
|
xmake-version: ${{ matrix.version }}
|
||||||
actions-cache-folder: '.xmake-cache'
|
actions-cache-folder: '.xmake-cache'
|
||||||
|
build-cache-folder: '.xmake-build-cache'
|
||||||
|
package-cache-folder: '.xmake-package-cache'
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
xmake --version
|
xmake --version
|
||||||
xmake create -P test
|
xmake create test
|
||||||
xmake build -P test
|
cd test
|
||||||
xmake run -P test
|
echo 'add_requires("libpng", {system = false})' >> xmake.lua
|
||||||
|
echo 'add_packages("libpng")' >> xmake.lua
|
||||||
|
xmake -v -y
|
||||||
|
xmake run
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ See [action.yml](./action.yml).
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
Use latest version:
|
### Use latest version
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
@@ -19,7 +19,7 @@ with:
|
|||||||
xmake-version: latest
|
xmake-version: latest
|
||||||
```
|
```
|
||||||
|
|
||||||
Use specified version:
|
### Use specified version
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
@@ -27,7 +27,7 @@ with:
|
|||||||
xmake-version: '2.5.3'
|
xmake-version: '2.5.3'
|
||||||
```
|
```
|
||||||
|
|
||||||
Use specified branch:
|
### Use specified branch
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
@@ -35,7 +35,7 @@ with:
|
|||||||
xmake-version: branch@master
|
xmake-version: branch@master
|
||||||
```
|
```
|
||||||
|
|
||||||
Use semver:
|
### Use semver
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
@@ -43,25 +43,45 @@ with:
|
|||||||
xmake-version: '>=2.2.6 <=2.5.3'
|
xmake-version: '>=2.2.6 <=2.5.3'
|
||||||
```
|
```
|
||||||
|
|
||||||
Use action cache:
|
### Cache xmake
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
with:
|
with:
|
||||||
xmake-version: '2.7.2'
|
xmake-version: '2.9.7'
|
||||||
actions-cache-folder: '.xmake-cache'
|
actions-cache-folder: '.xmake-cache'
|
||||||
```
|
```
|
||||||
|
|
||||||
Use action cache with cachekey:
|
### Cache xmake with cachekey
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
uses: xmake-io/github-action-setup-xmake@v1
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
with:
|
with:
|
||||||
xmake-version: '2.7.2'
|
xmake-version: '2.9.7'
|
||||||
actions-cache-folder: '.xmake-cache'
|
actions-cache-folder: '.xmake-cache'
|
||||||
actions-cache-key: 'archlinux-ci'
|
actions-cache-key: 'archlinux-ci'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Cache packages
|
||||||
|
|
||||||
|
```yml
|
||||||
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
with:
|
||||||
|
xmake-version: '2.9.7'
|
||||||
|
package-cache-folder: '.xmake-package-cache'
|
||||||
|
package-cache-key: 'archlinux-ci'
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cache build
|
||||||
|
|
||||||
|
```yml
|
||||||
|
uses: xmake-io/github-action-setup-xmake@v1
|
||||||
|
with:
|
||||||
|
xmake-version: '2.9.7'
|
||||||
|
build-cache-folder: '.xmake-build-cache'
|
||||||
|
build-cache-key: 'archlinux-ci'
|
||||||
|
```
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
### Prepare development environment
|
### Prepare development environment
|
||||||
|
|||||||
+13
@@ -16,6 +16,19 @@ inputs:
|
|||||||
actions-cache-key:
|
actions-cache-key:
|
||||||
description: The actions cache key.
|
description: The actions cache key.
|
||||||
default: ''
|
default: ''
|
||||||
|
package-cache-folder:
|
||||||
|
description: 'Directory to cache package in. This folder will go under $GITHUB_HOME (I.e. build dir) and be cached using @actions/cache.'
|
||||||
|
default: ''
|
||||||
|
package-cache-key:
|
||||||
|
description: The packages cache key.
|
||||||
|
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: ''
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node20'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
Reference in New Issue
Block a user