Merge pull request #630 from chdb-io/fix/playground-remove-cloud-cred… #1128
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 arm64 | |
| 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 arm64) | |
| runs-on: macos-15-xlarge | |
| 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="" | |
| for v in 3.9 3.10 3.11 3.12 3.13 3.14; do | |
| echo "=== Installing Python $v ===" | |
| pyenv install "$v:latest" | |
| installed_version="$(plain_pyenv_version "$v")" | |
| if [ -z "$installed_version" ]; then | |
| echo "pyenv installed no non-free-threaded Python $v" | |
| exit 1 | |
| fi | |
| INSTALLED="$INSTALLED $installed_version" | |
| done | |
| 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.9 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" | |
| 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.9)" | |
| if [ -z "$PYTHON_VERSION" ]; then echo "Python 3.9 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.9 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.9" || "$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 |