bug: another fix attempt for the cross-platform tests (#9259)
This commit is contained in:
parent
8358dec09e
commit
04e8cbe4a1
2 changed files with 50 additions and 4 deletions
34
.github/workflows/cross-platform-test.md
vendored
34
.github/workflows/cross-platform-test.md
vendored
|
|
@ -160,6 +160,40 @@ test-installation:
|
|||
if: steps.install-method.outputs.method == 'wheel'
|
||||
```
|
||||
|
||||
## Known Issues
|
||||
|
||||
### macOS AMD64 Python 3.13 Compilation Failures
|
||||
|
||||
**Issue**: Nightly/release builds may fail on macOS AMD64 with Python 3.13 due to `chroma-hnswlib` compilation errors:
|
||||
```
|
||||
clang: error: unsupported argument 'native' to option '-march='
|
||||
error: command '/usr/bin/clang++' failed with exit code 1
|
||||
```
|
||||
|
||||
**Root Cause**: Systematic difference in dependency resolution between workspace builds vs published packages:
|
||||
|
||||
| Build Type | Package Source | Dependencies | chromadb | Result |
|
||||
|------------|----------------|--------------|----------|---------|
|
||||
| **Manual/Source** | Workspace (`langflow-base = { workspace = true }`) | 162 packages | ❌ Not included | ✅ Success |
|
||||
| **Nightly/Release** | Published (`langflow-base-nightly==0.5.0.dev21`) | 420 packages | ✅ Included | ❌ Compilation fails |
|
||||
|
||||
**Technical Details**:
|
||||
1. **Workspace builds** use local `src/backend/base/pyproject.toml` which excludes `chromadb`
|
||||
2. **Nightly builds** modify dependencies via `scripts/ci/update_uv_dependency.py`:
|
||||
- Changes: `langflow-base~=0.5.0` → `langflow-base-nightly==0.5.0.dev21`
|
||||
- Uses published PyPI package with full dependency tree including `chromadb==0.5.23`
|
||||
3. **macOS clang** doesn't support `-march=native` flag used by `chroma-hnswlib` compilation
|
||||
|
||||
**Workarounds**:
|
||||
- Manual testing (source builds) works consistently
|
||||
- Issue only affects nightly/release automated builds
|
||||
- Some runs may succeed if compatible `chroma-hnswlib` wheels are available on PyPI
|
||||
|
||||
**Files Involved**:
|
||||
- `scripts/ci/update_uv_dependency.py` - Modifies dependency resolution
|
||||
- `scripts/ci/update_pyproject_combined.py` - Orchestrates nightly build changes
|
||||
- `pyproject.toml` vs `src/backend/base/pyproject.toml` - Different dependency trees
|
||||
|
||||
## Results
|
||||
|
||||
- ✅ **Success**: All platforms pass installation and basic functionality
|
||||
|
|
|
|||
20
.github/workflows/cross-platform-test.yml
vendored
20
.github/workflows/cross-platform-test.yml
vendored
|
|
@ -217,6 +217,12 @@ jobs:
|
|||
|
||||
- name: Install main package from wheel (Unix)
|
||||
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows'
|
||||
env:
|
||||
# Fix chroma-hnswlib compilation on macOS by overriding problematic compiler flags
|
||||
CFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64' || '' }}
|
||||
CXXFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64 -stdlib=libc++' || '' }}
|
||||
# Alternative: Force use of compatible architecture flags
|
||||
ARCHFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-arch x86_64' || '' }}
|
||||
run: |
|
||||
ls -la ./main-dist/
|
||||
find ./main-dist -name "*.whl" -type f
|
||||
|
|
@ -242,6 +248,12 @@ jobs:
|
|||
|
||||
- name: Install langflow from PyPI (Unix)
|
||||
if: steps.install-method.outputs.method == 'pypi' && matrix.os != 'windows'
|
||||
env:
|
||||
# Fix chroma-hnswlib compilation on macOS by overriding problematic compiler flags
|
||||
CFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64' || '' }}
|
||||
CXXFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-O3 -mmacosx-version-min=10.7 -march=x86-64 -stdlib=libc++' || '' }}
|
||||
# Alternative: Force use of compatible architecture flags
|
||||
ARCHFLAGS: ${{ matrix.os == 'macos' && matrix.python-version == '3.13' && '-arch x86_64' || '' }}
|
||||
run: |
|
||||
if [ -n "${{ inputs.langflow-version }}" ]; then
|
||||
uv pip install --python ./test-env/bin/python langflow==${{ inputs.langflow-version }}
|
||||
|
|
@ -278,9 +290,9 @@ jobs:
|
|||
|
||||
- name: Test server startup (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
timeout-minutes: ${{ inputs.test-timeout }}
|
||||
timeout-minutes: ${{ inputs.test-timeout || 5 }}
|
||||
env:
|
||||
TIMEOUT_MINUTES: ${{ inputs.test-timeout }}
|
||||
TIMEOUT_MINUTES: ${{ inputs.test-timeout || 5 }}
|
||||
run: |
|
||||
# Start server in background
|
||||
$serverProcess = Start-Process -FilePath ".\test-env\Scripts\python.exe" -ArgumentList "-m", "langflow", "run", "--host", "localhost", "--port", "7860", "--backend-only" -PassThru -WindowStyle Hidden
|
||||
|
|
@ -312,9 +324,9 @@ jobs:
|
|||
|
||||
- name: Test server startup (Unix)
|
||||
if: matrix.os != 'windows'
|
||||
timeout-minutes: ${{ inputs.test-timeout }}
|
||||
timeout-minutes: ${{ inputs.test-timeout || 5 }}
|
||||
env:
|
||||
TIMEOUT_MINUTES: ${{ inputs.test-timeout }}
|
||||
TIMEOUT_MINUTES: ${{ inputs.test-timeout || 5 }}
|
||||
run: |
|
||||
# Start server in background
|
||||
./test-env/bin/python -m langflow run --host localhost --port 7860 --backend-only &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue