Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xmake-io/github-action-setup-xmake
Set up your GitHub Actions workflow with a specific version of xmake
https://github.com/xmake-io/github-action-setup-xmake
ci github-action setup-xmake xmake
Last synced: 1 day ago
JSON representation
Set up your GitHub Actions workflow with a specific version of xmake
- Host: GitHub
- URL: https://github.com/xmake-io/github-action-setup-xmake
- Owner: xmake-io
- License: gpl-3.0
- Created: 2019-09-30T03:50:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-01-17T13:00:46.000Z (about 1 month ago)
- Last Synced: 2025-02-10T02:09:34.296Z (10 days ago)
- Topics: ci, github-action, setup-xmake, xmake
- Language: TypeScript
- Homepage: https://xmake.io
- Size: 2.63 MB
- Stars: 30
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-xmake - github-action-setup-xmake
README
# GitHub Action - Setup xmake
[](https://github.com/xmake-io/github-action-setup-xmake/actions)
[](https://github.com/marketplace/actions/setup-xmake)Set up your GitHub Actions workflow with a specific version of xmake
## Usage
See [action.yml](./action.yml).
## Example
### Use latest version
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
```### Use specified version
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.5.3'
```### Use specified branch
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
```### Use semver
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '>=2.2.6 <=2.5.3'
```### Cache xmake
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.9.7'
actions-cache-folder: '.xmake-cache'
```### Cache xmake with cachekey
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
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: true
package-cache-key: 'archlinux-ci'
project-path: 'myproject' # we need to compute packages hashkey for project
```### Cache build
By default, xmake disables build cache when building on ci, so we need to enable it first.
```bash
$ xmake f --policies=build.ccache:y
```And xmake v2.9.8 will enable it by default if action/build-cache is enabled.
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.9.7'
build-cache: true
build-cache-key: 'archlinux-ci'
```Cache build with the specific project path.
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.9.7'
build-cache: true
project-path: 'myproject' # we can get the build cache path from project.
```Cache build with the specific build path.
```yml
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '2.9.7'
build-cache: true
build-cache-path: 'build/.build_cache'
```## Contributing
### Prepare development environment
```bash
pnpm install
```### Draft a new release
```bash
pnpm release
git add .
git commit -m "build: release"
pnpm version [new-version]# for a minor version or patch of v1
git tag --delete v1
git tag v1git push origin master
git push --tags --force
```### Development and debug
```bash
git branch test
git checkout test
pnpm build
pnpm release
git-commit -a -m "..."
git push origin test
```