diff --git a/.github/workflows/poetry_install.yml b/.github/workflows/poetry_install.yml new file mode 100644 index 00000000..47747b2c --- /dev/null +++ b/.github/workflows/poetry_install.yml @@ -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 \ No newline at end of file