Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit d71760f

Browse files
feat: add ci for python package
1 parent 4d2d236 commit d71760f

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build and Package Python Library
2+
3+
on:
4+
push:
5+
branches: [ feat/python-package-ci ]
6+
workflow_dispatch:
7+
inputs:
8+
model_dir:
9+
description: "Path to model directory in janhq/models repo"
10+
required: true
11+
12+
13+
env:
14+
MODEL_DIR: models/whispervq # ${{ inputs.model_dir }}
15+
16+
jobs:
17+
build-and-test:
18+
runs-on: ${{ matrix.runs-on }}
19+
timeout-minutes: 60
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- os: "linux"
25+
name: "amd64"
26+
runs-on: "ubuntu-20-04-cuda-12-0"
27+
- os: "mac"
28+
name: "amd64"
29+
runs-on: "macos-selfhosted-12"
30+
- os: "mac"
31+
name: "arm64"
32+
runs-on: "macos-silicon"
33+
- os: "windows"
34+
name: "amd64"
35+
runs-on: "windows-cuda-12-0"
36+
steps:
37+
- name: Clone
38+
id: checkout
39+
uses: actions/checkout@v3
40+
with:
41+
submodules: recursive
42+
repository: janhq/models
43+
ref: "feat/ci-python-models"
44+
45+
- name: use python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: "3.11"
49+
50+
- name: prepare python package windows
51+
if : runner.os == 'windows'
52+
run: |
53+
where python
54+
55+
- name: Install dependencies Windows and Linux
56+
if: runner.os == 'windows' || runner.os == 'linux'
57+
run: |
58+
python3 -m pip install --upgrade pip
59+
python3 -m pip install -r ${{MODEL_DIR}}/requirements.cuda.txt
60+
61+
- name: Install dependencies Mac
62+
if: runner.os == 'mac'
63+
run: |
64+
python3 -m pip install --upgrade pip
65+
python3 -m pip install -r ${{MODEL_DIR}}/requirements.txt
66+
67+

0 commit comments

Comments
 (0)