update readme and tests

This commit is contained in:
ruki
2025-01-14 00:49:43 +08:00
Unverified
parent ceb318e60a
commit 4bb9c40bd5
3 changed files with 49 additions and 11 deletions
+8 -3
View File
@@ -22,10 +22,15 @@ jobs:
with:
xmake-version: ${{ matrix.version }}
actions-cache-folder: '.xmake-cache'
build-cache-folder: '.xmake-build-cache'
package-cache-folder: '.xmake-package-cache'
- name: Run tests
run: |
xmake --version
xmake create -P test
xmake build -P test
xmake run -P test
xmake create test
cd test
echo 'add_requires("libpng", {system = false})' >> xmake.lua
echo 'add_packages("libpng")' >> xmake.lua
xmake -v -y
xmake run
+28 -8
View File
@@ -11,7 +11,7 @@ See [action.yml](./action.yml).
## Example
Use latest version:
### Use latest version
```yml
uses: xmake-io/github-action-setup-xmake@v1
@@ -19,7 +19,7 @@ with:
xmake-version: latest
```
Use specified version:
### Use specified version
```yml
uses: xmake-io/github-action-setup-xmake@v1
@@ -27,7 +27,7 @@ with:
xmake-version: '2.5.3'
```
Use specified branch:
### Use specified branch
```yml
uses: xmake-io/github-action-setup-xmake@v1
@@ -35,7 +35,7 @@ with:
xmake-version: branch@master
```
Use semver:
### Use semver
```yml
uses: xmake-io/github-action-setup-xmake@v1
@@ -43,25 +43,45 @@ with:
xmake-version: '>=2.2.6 <=2.5.3'
```
Use action cache:
### Cache xmake
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.7.2'
xmake-version: '2.9.7'
actions-cache-folder: '.xmake-cache'
```
Use action cache with cachekey:
### Cache xmake with cachekey
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.7.2'
xmake-version: '2.9.7'
actions-cache-folder: '.xmake-cache'
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
### Prepare development environment
+13
View File
@@ -16,6 +16,19 @@ inputs:
actions-cache-key:
description: The actions cache key.
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:
using: 'node20'
main: 'dist/index.js'