58 lines
1.7 KiB
YAML
58 lines
1.7 KiB
YAML
name: test
|
|
|
|
on:
|
|
- push
|
|
|
|
jobs:
|
|
build:
|
|
concurrency:
|
|
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.version }}-test
|
|
cancel-in-progress: true
|
|
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, windows-11-arm, macOS-latest]
|
|
version: [latest, branch@master, branch@dev]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: xmake-io/github-action-setup-xmake@master
|
|
with:
|
|
xmake-version: ${{ matrix.version }}
|
|
actions-cache-folder: '.xmake-cache'
|
|
actions-cache-key: ${{ matrix.version }}-relative
|
|
build-cache: true
|
|
build-cache-key: ${{ matrix.version }}-relative
|
|
package-cache: true
|
|
package-cache-key: ${{ matrix.version }}-relative
|
|
project-path: 'tests/sample'
|
|
|
|
- name: Run tests with relative cache path
|
|
run: |
|
|
xmake --version
|
|
cd tests/sample
|
|
xmake -y -vD
|
|
xmake run
|
|
xmake clean
|
|
|
|
- uses: xmake-io/github-action-setup-xmake@master
|
|
with:
|
|
xmake-version: ${{ matrix.version }}
|
|
actions-cache-folder: '${{ runner.temp }}/xmake-cache'
|
|
actions-cache-key: ${{ matrix.version }}-absolute
|
|
build-cache: true
|
|
build-cache-key: ${{ matrix.version }}-absolute
|
|
package-cache: true
|
|
package-cache-key: ${{ matrix.version }}-absolute
|
|
project-path: 'tests/sample'
|
|
|
|
- name: Run tests with absolute cache path
|
|
run: |
|
|
xmake --version
|
|
cd tests/sample
|
|
xmake -y -vD
|
|
xmake run
|
|
xmake clean
|