-
Notifications
You must be signed in to change notification settings - Fork 7
69 lines (60 loc) · 1.87 KB
/
python.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
name: Python
on:
workflow_dispatch:
push:
# [AK]
branches: [ main, python-housekeeping ]
paths:
- '.github/workflows/python.yml'
- 'binding/python/**'
- '!binding/python/README.md'
- 'lib/linux/**'
- 'lib/mac/**'
- 'lib/raspberry-pi/**'
- 'lib/windows/**'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/python.yml'
- 'binding/python/**'
- '!binding/python/README.md'
- 'lib/linux/**'
- 'lib/mac/**'
- 'lib/raspberry-pi/**'
- 'lib/windows/**'
defaults:
run:
working-directory: .
jobs:
build-self-hosted:
runs-on: ${{ matrix.machine }}
strategy:
fail-fast: false
matrix:
xpu: [ cpu ]
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows ]
include:
- xpu: gpu
machine: pv-linux
- xpu: gpu
machine: pv-windows
steps:
- uses: actions/checkout@v3
- name: Setup Python virtualenv (*nix)
if: ${{ matrix.machine != 'pv-windows' }}
run: |
python3 -m venv binding/python/.venv
. binding/python/.venv/bin/activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Setup Python virtualenv (windows)
if: ${{ matrix.machine == 'pv-windows' }}
run: |
python3 -m venv binding\python\.venv
binding\python\.venv\Scripts\activate
echo PATH=$PATH >> $GITHUB_ENV
- name: Install Python dependencies
run: python3 -m pip install -r binding/python/requirements.txt
- name: Download resource files
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.bin/latest/phi2-290.bin -o phi2-290.bin
- name: Test
run: python3 -m binding.python.test_picollm ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.bin ${{matrix.xpu}}