45 lines
1.0 KiB
YAML
45 lines
1.0 KiB
YAML
name: Windows
|
|
|
|
on:
|
|
repository_dispatch:
|
|
types: [create-pull-request]
|
|
pull_request:
|
|
push:
|
|
paths-ignore:
|
|
- '.gitignore'
|
|
- 'LICENSE'
|
|
- 'README.md'
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-x86_64, macos-x86_64, ubuntu-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
if: "!contains(github.event.head_commit.message, 'ci skip')"
|
|
|
|
steps:
|
|
- name: Get current date as package key
|
|
id: cache_key
|
|
run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set xmake env
|
|
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" >> $GITHUB_ENV
|
|
|
|
- name: Setup xmake
|
|
uses: xmake-io/github-action-setup-xmake@v1
|
|
with:
|
|
xmake-version: branch@master
|
|
actions-cache-folder: .xmake-cache-W${{ steps.cache_key.outputs.key }}
|
|
|
|
- name: Update xmake repository
|
|
run: xmake repo --root --update
|
|
|
|
- name: Build test
|
|
run: xmake --yes --root
|