优化 github action

This commit is contained in:
fasiondog 2023-10-10 22:38:40 +08:00
parent f9df744090
commit 85b23c6712
4 changed files with 63 additions and 13 deletions

View File

@ -30,7 +30,9 @@ jobs:
env:
cache-name: cache-ubuntu-aarch64-modules
with:
path: ~/.xmake
path: |
~/.xmake
./${{ matrix.cross }}-cross.linux
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
@ -38,6 +40,10 @@ jobs:
${{ runner.os }}-
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
- name: Installation musl
run: |
wget https://github.com/xmake-mirror/musl.cc/releases/download/20210202/${{ matrix.cross }}-cross.linux.tgz

View File

@ -18,7 +18,6 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: xmake-io/github-action-setup-xmake@v1
- name: Cache packages
id: cache-xmake-ubuntu
@ -33,6 +32,11 @@ jobs:
${{ runner.os }}-build-
${{ runner.os }}-
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
- name: configure
run: |
xmake f -y

View File

@ -22,15 +22,37 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Cache windows packages
id: cache-xmake-windows
uses: actions/cache@v3
env:
cache-name: cache-windows-modules
with:
path: ~/.xmake
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: xmake-io/github-action-setup-xmake@v1
- name: checkout
run: |
git clone https://github.com/fasiondog/hikyuu.git --recursive --depth 1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
- name: build
shell: cmd
run: |
cd hikyuu
xmake f --feedback=n -y
- name: build
shell: cmd
run: |
xmake -b small-test
- name: test
shell: cmd
run: |
xmake r small-test

View File

@ -22,14 +22,32 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Cache windows packages
id: cache-xmake-windows
uses: actions/cache@v3
env:
cache-name: cache-windows-modules
with:
path: ~/.xmake
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: xmake-io/github-action-setup-xmake@v1
- name: checkout
run: |
git clone https://github.com/fasiondog/hikyuu.git --recursive --depth 1
with:
xmake-version: branch@master
actions-cache-folder: '.xmake-cache'
- name: configure
shell: cmd
run: |
xmake f -y --pyver=3.11
- name: build
shell: cmd
run: |
cd hikyuu
xmake f -y --pyver=3.11
xmake -b core
xmake -b core