Skip to content

CI: macOS-latest demo tests fail with exit 1 due to unnecessary Python setup #585

@luoliwoshang

Description

@luoliwoshang

Problem

The "Test demos" step in the macOS-latest CI workflow fails with exit code 1, but only shows the error without detailed output:

Error: Process completed with exit code 1.

Root Cause

The failure occurs in .github/workflows/go.yml at the "Test demos" step when trying to set up Python 3.12:

libdir=$(pkg-config --variable=libdir python-3.12-embed)

This command fails because:

  1. Python 3.12 is not installed in the macOS-latest CI environment
  2. The script uses set -e, so any command failure causes immediate exit
  3. Most importantly: The project doesn't actually need Python at all - there is no _pydemo directory

Analysis

The Python setup code was originally added for PyTorch compatibility (see TODO comment), but:

  • The project currently has no _pydemo directory
  • Only _demo/cjsondemo exists, which doesn't require Python
  • All the Python 3.12 symlink workaround is unnecessary

Solution

Remove all unnecessary Python-related setup:

  1. Remove python@3.12 installation from .github/actions/setup-llcppg/action.yml
  2. Remove the entire Python symlink setup block from .github/workflows/go.yml
  3. Simplify the "Test demos" step to just run the test script directly

Impact

  • ✅ Fixes macOS CI failures
  • ✅ Simplifies CI configuration
  • ✅ Reduces build time (no Python installation needed)
  • ✅ Removes maintenance burden for unused dependencies

Related Files

  • .github/workflows/go.yml (lines 77-88)
  • .github/actions/setup-llcppg/action.yml (lines 27-36)
  • .github/workflows/test_demo.sh (scans for _demo/* and _pydemo/*)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions