-
Notifications
You must be signed in to change notification settings - Fork 163
85 lines (81 loc) · 2.14 KB
/
build-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: build-test
on:
push:
branches:
- master
- 'feature/**'
paths:
- 'src/**'
- '.github/workflows/build-test.yml'
pull_request:
branches: [master]
paths:
- 'src/**'
- '.github/workflows/build-test.yml'
jobs:
llm-build:
name: ${{ matrix.os }}-build
env:
PACAGE_DIR: ${{ matrix.os }}-package
PACAGE_FILE: ${{ matrix.os }}-package.zip
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v3
# linux and macos
- name: linux-macos-build-pack
if: matrix.os != 'windows-latest'
run: |
./script/build.sh
./script/package.sh $PACAGE_DIR
zip -r $PACAGE_FILE $PACAGE_DIR
# windows
- name: windows-build-pack
if: matrix.os == 'windows-latest'
run: |
.\script\build.ps1
.\script\package.ps1 windows-package
7z a -r windows-package.zip windows-package
# upload
- name: upload-zip
uses: actions/upload-artifact@v3
with:
path: ./*.zip
model-test:
needs: llm-build
name: ${{ matrix.model }}-${{ matrix.os }}-test
runs-on: ${{ matrix.os }}
env:
PACAGE_DIR: ${{ matrix.os }}-package
PACAGE_FILE: ${{ matrix.os }}-package.zip
strategy:
matrix:
os: [windows-latest]
model: [chatglm-6b]
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: workspace
- name: linux-macos-test
if: matrix.os != 'windows-latest'
run: |
cd workspace
unzip $PACAGE_FILE
cd $PACAGE_DIR
./script/model_test.sh ${{ matrix.model }}
- name: windows-test
if: matrix.os == 'windows-latest'
run: |
cd workspace
7z x windows-package.zip
cd windows-package
ls
echo ${{ matrix.model }}
./script/download_model.ps1 ${{ matrix.model }}
ls
cd build
.\Release\cli_demo -m ..\${{ matrix.model }}
ls