Skip to content

no LAZYLLM_DATA

no LAZYLLM_DATA #3

name: Cpp Extension Regression (Temp)
on:
workflow_dispatch:
push:
branches:
- "**"
env:
PYTHON_VERSION: "3.10.9"
jobs:
cpp_build_and_python_regression:
name: C++ Build + Python Regression (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
timeout-minutes: 120
defaults:
run:
shell: bash
env:
PYTHONNOUSERSITE: "1"
PYTHONPATH: ${{ github.workspace }}
LAZYLLM_ENABLE_CPP_OVERRIDE: "1"
LAZYLLM_EXPECTED_LOG_MODULES: "all"
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: false
- name: Setup
uses: ./.github/actions/setup
- name: Install test requirements
run: |
pip install -r tests/requirements.txt
if [[ "${{ runner.os }}" == "Linux" ]]; then
pip install -r tests/requirements_linux.txt
elif [[ "${{ runner.os }}" == "macOS" ]]; then
pip install -r tests/requirements_mac.txt
fi
- name: Prepare empty data path (no LazyLLM-Data clone)
run: |
set -euo pipefail
DATA_DIR="$GITHUB_WORKSPACE/.ci_data"
rm -rf "$DATA_DIR"
mkdir -p "$DATA_DIR"
echo "LAZYLLM_DATA_PATH=$DATA_DIR" >> "$GITHUB_ENV"
- name: Build and run C++ tests
run: |
pip install pybind11
bash csrc/scripts/build_test.sh
- name: Install C++ extension artifacts into workspace
run: |
cmake --install build --prefix . --component lazyllm_cpp
ls -al lazyllm | rg "lazyllm_cpp|cpp_lib" || true
- name: Run basic tests
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
MARKER="not skip_on_linux"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
MARKER="not skip_on_mac"
else
MARKER="not skip_on_win"
fi
pytest -v --reruns=2 --order-scope=class -m "$MARKER" \
tests/basic_tests \
--ignore=tests/basic_tests/RAG
- name: Run advanced tests (without key/data-required suites)
run: |
if [[ "${{ runner.os }}" == "Linux" ]]; then
MARKER="not skip_on_linux"
elif [[ "${{ runner.os }}" == "macOS" ]]; then
MARKER="not skip_on_mac"
else
MARKER="not skip_on_win"
fi
pytest -v --reruns=2 --order-scope=class -m "$MARKER" \
tests/advanced_tests \
--ignore=tests/advanced_tests/RAG \
--ignore=tests/advanced_tests/Deploy/test_deploy.py \
--ignore=tests/advanced_tests/Deploy/test_deploy_full.py \
--ignore=tests/advanced_tests/Finetune/test_finetune.py \
--ignore=tests/advanced_tests/Tools/test_mongodb_manager.py \
--ignore=tests/advanced_tests/Tools/test_train_serve.py