Merge pull request #631 from chdb-io/docs/readme-wasm-banner #1180
This file contains hidden or 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
| name: Build & Test macOS x86_64 | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| TAG_NAME: | |
| description: 'Release Version Tag' | |
| required: true | |
| release: | |
| types: [created] | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| - '.github/workflows/build_*_wheels*.yml' | |
| - '.github/workflows/external_clickhouse_integration.yaml' | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'docs/**' | |
| - '.github/workflows/build_*_wheels*.yml' | |
| - '.github/workflows/external_clickhouse_integration.yaml' | |
| jobs: | |
| test_datastore: | |
| name: Test DataStore (macOS x86_64) | |
| runs-on: macos-15-intel | |
| if: ${{ !github.event.pull_request.draft }} | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Check machine architecture | |
| run: | | |
| echo "=== Machine Architecture Information ===" | |
| echo "Machine type: $(uname -m)" | |
| echo "Architecture: $(arch)" | |
| echo "System info: $(uname -a)" | |
| - name: Setup pyenv | |
| run: | | |
| curl https://pyenv.run | bash | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| plain_pyenv_version() { | |
| local pattern="${1//./\\.}" | |
| pyenv versions --bare 2>/dev/null | grep -E "^${pattern}\.[0-9]+$" | tail -1 | |
| } | |
| INSTALLED="" | |
| set +e | |
| for v in 3.10 3.11 3.12 3.13 3.14; do | |
| echo "=== Installing Python $v ===" | |
| if pyenv install "$v:latest"; then | |
| installed_version="$(plain_pyenv_version "$v")" | |
| if [ -n "$installed_version" ]; then | |
| INSTALLED="$INSTALLED $installed_version" | |
| else | |
| echo "WARNING: pyenv installed no non-free-threaded Python $v, skipping" | |
| fi | |
| else | |
| echo "Normal install failed, retrying without ensurepip..." | |
| installed_ver=$(pyenv latest "$v" 2>/dev/null) | |
| if [ -n "$installed_ver" ]; then pyenv uninstall -f "$installed_ver" 2>/dev/null; fi | |
| PYTHON_CONFIGURE_OPTS="--without-ensurepip" pyenv install "$v:latest" || true | |
| installed_version="$(plain_pyenv_version "$v")" | |
| if [ -n "$installed_version" ]; then | |
| INSTALLED="$INSTALLED $installed_version" | |
| echo "Python $installed_version binary installed (pip bootstrap deferred)" | |
| else | |
| echo "WARNING: Python $v install failed completely, skipping" | |
| fi | |
| fi | |
| done | |
| set -e | |
| if [ -z "$INSTALLED" ]; then echo "No Python installed!"; exit 1; fi | |
| pyenv global $INSTALLED | |
| echo "Installed versions:" | |
| pyenv versions | |
| - name: Install dependencies for all Python versions | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| plain_pyenv_version() { | |
| local pattern="${1//./\\.}" | |
| pyenv versions --bare 2>/dev/null | grep -E "^${pattern}\.[0-9]+$" | tail -1 | |
| } | |
| for version in 3.10 3.11 3.12 3.13 3.14; do | |
| PYTHON_VERSION="$(plain_pyenv_version "$version")" | |
| if [ -z "$PYTHON_VERSION" ]; then continue; fi | |
| echo "Installing dependencies for Python $PYTHON_VERSION" | |
| pyenv shell "$PYTHON_VERSION" | |
| if ! python -m pip --version 2>/dev/null; then | |
| echo "pip missing, bootstrapping..." | |
| curl -sS https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py | |
| python /tmp/get-pip.py || python -m ensurepip --upgrade || true | |
| fi | |
| python -m pip install --upgrade pip | |
| python -m pip install setuptools tox pandas pyarrow wheel pytest pytest-cov | |
| pyenv shell --unset | |
| done | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build wheel | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| plain_pyenv_version() { | |
| local pattern="${1//./\\.}" | |
| pyenv versions --bare 2>/dev/null | grep -E "^${pattern}\.[0-9]+$" | tail -1 | |
| } | |
| PYTHON_VERSION="$(plain_pyenv_version 3.10)" | |
| if [ -z "$PYTHON_VERSION" ]; then echo "Python 3.10 not available"; exit 1; fi | |
| pyenv shell "$PYTHON_VERSION" | |
| make wheel | |
| - name: Show files | |
| run: | | |
| ls -lh dist | |
| shell: bash | |
| - name: Test DataStore on all Python versions with pandas 2.x and 3.x | |
| run: | | |
| export PATH="$HOME/.pyenv/bin:$PATH" | |
| eval "$(pyenv init -)" | |
| plain_pyenv_version() { | |
| local pattern="${1//./\\.}" | |
| pyenv versions --bare 2>/dev/null | grep -E "^${pattern}\.[0-9]+$" | tail -1 | |
| } | |
| for version in 3.10 3.11 3.12 3.13 3.14; do | |
| PYTHON_VERSION="$(plain_pyenv_version "$version")" | |
| if [ -z "$PYTHON_VERSION" ]; then | |
| echo "Python $version not available, skipping" | |
| continue | |
| fi | |
| # pandas 3.x requires Python >= 3.11 | |
| if [[ "$version" == "3.10" ]]; then | |
| PANDAS_CONSTRAINTS=("pandas<3.0") | |
| else | |
| PANDAS_CONSTRAINTS=("pandas<3.0" "pandas>=3.0") | |
| fi | |
| for PANDAS_CONSTRAINT in "${PANDAS_CONSTRAINTS[@]}"; do | |
| echo "==============================================" | |
| echo "Testing DataStore on Python $PYTHON_VERSION with $PANDAS_CONSTRAINT" | |
| echo "==============================================" | |
| pyenv shell "$PYTHON_VERSION" | |
| python -m pip install dist/*.whl --force-reinstall | |
| python -m pip install pytest pytest-cov hypothesis "$PANDAS_CONSTRAINT" | |
| echo "Installed pandas version:" | |
| python -c "import pandas; print(pandas.__version__)" | |
| echo "Running DataStore tests on Python $PYTHON_VERSION with $PANDAS_CONSTRAINT ..." | |
| cd datastore | |
| python -m pytest tests/ -v --tb=short -x | |
| cd .. | |
| echo "==============================================" | |
| echo "DataStore tests PASSED on Python $PYTHON_VERSION with $PANDAS_CONSTRAINT" | |
| echo "==============================================" | |
| pyenv shell --unset | |
| done | |
| done | |
| continue-on-error: false |