forked from LazyAGI/LazyLLM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Build and Test on macOS and Windows | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- lwj/poetry_install | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
env: | ||
POETRY_VERSION: "1.8.3" | ||
|
||
jobs: | ||
build-test: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macOS-latest, windows-latest] | ||
python-version: ['3.10', 3.11, 3.12] | ||
|
||
steps: | ||
# 检出代码仓库 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 0 | ||
|
||
# 复制 poetry.lock 文件到根目录 | ||
- name: Copy poetry.lock to root directory | ||
run: cp LazyLLM-Env/poetry.lock . | ||
|
||
# 设置 Python 版本 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
# 安装 Poetry | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: ${{ env.POETRY_VERSION }} | ||
|
||
# # 安装依赖 | ||
# - name: Install dependencies | ||
# run: poetry install | ||
|
||
# 构建项目 | ||
- name: Build project with Poetry | ||
run: | | ||
poetry build | ||
# 查看构建文件 | ||
- name: List dist directory | ||
run: ls dist | ||
|
||
# 安装生成的 wheel 文件 | ||
- name: Install the built package | ||
run: | | ||
pip install dist/lazyllm*.whl |