Regression Suite (Python 3.13t) #573
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
| # Regression test suite for Python 3.13 with free-threading enabled (3.13t). | |
| # This tests the parallelization features for selection and projection operations | |
| # that are enabled when Python's free-threading mode is available. | |
| name: Regression Suite (Python 3.13t) | |
| on: | |
| push: | |
| branches-ignore: | |
| - main # Exclude the main branch | |
| - 'refs/tags/*' # Exclude tags (releases) | |
| schedule: | |
| - cron: "0 5 * * *" # Run at 5:00 AM UTC every day (offset from main suite) | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| regression_python_313t: | |
| name: Python 3.13t Free-Threading | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Cache Python 3.13t build | |
| id: cache-python313t | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/python313t | |
| key: python-313t-${{ runner.os }}-${{ hashFiles('.github/workflows/regression_suite_python313t.yaml') }} | |
| - name: Install build dependencies | |
| if: steps.cache-python313t.outputs.cache-hit != 'true' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential gdb lcov pkg-config \ | |
| libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ | |
| libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \ | |
| lzma lzma-dev tk-dev uuid-dev zlib1g-dev | |
| - name: Download and build Python 3.13 with free-threading | |
| if: steps.cache-python313t.outputs.cache-hit != 'true' | |
| run: | | |
| # Download Python 3.13.8 source (latest stable) | |
| cd /tmp | |
| wget https://www.python.org/ftp/python/3.13.8/Python-3.13.8.tar.xz | |
| tar -xf Python-3.13.8.tar.xz | |
| cd Python-3.13.8 | |
| # Configure with --disable-gil for free-threading | |
| ./configure --prefix=$HOME/python313t --enable-optimizations --disable-gil | |
| # Build and install | |
| make -j$(nproc) | |
| make install | |
| - name: Add Python 3.13t to PATH | |
| run: echo "$HOME/python313t/bin" >> $GITHUB_PATH | |
| - name: Verify free-threading is enabled | |
| run: | | |
| python3.13 --version | |
| python3.13 -c "import sys; print('Python version:', sys.version)" | |
| # Check multiple ways to detect free-threading | |
| python3.13 -c "import sys; print('Has _is_gil_disabled:', hasattr(sys, '_is_gil_disabled'))" | |
| python3.13 -c "import sys; print('Has flags.gil:', hasattr(sys.flags, 'gil') if hasattr(sys, 'flags') else False)" | |
| python3.13 -c "import sysconfig; print('Py_GIL_DISABLED:', sysconfig.get_config_var('Py_GIL_DISABLED'))" | |
| # Try to verify GIL is disabled - use sysconfig as primary method | |
| python3.13 -c "import sysconfig; gil_disabled = sysconfig.get_config_var('Py_GIL_DISABLED'); print('GIL disabled:', gil_disabled); assert gil_disabled == 1, f'Free-threading is not enabled! Py_GIL_DISABLED={gil_disabled}'" | |
| - name: Install Requirements | |
| run: | | |
| python3.13 -m pip install --upgrade pip uv | |
| python3.13 -m uv pip install --upgrade numpy cython | |
| python3.13 -m uv pip install --upgrade -r $GITHUB_WORKSPACE/tests/requirements.txt | |
| python3.13 -m uv pip install --upgrade -r $GITHUB_WORKSPACE/pyproject.toml | |
| python3.13 setup.py build_ext --inplace -j 4 | |
| - name: "Start Memcached Instance" | |
| run: | | |
| docker run -d --name my-memcached \ | |
| -p 11211:11211 \ | |
| memcached \ | |
| -m 16 | |
| - name: "Authenticate to Google Cloud" | |
| uses: google-github-actions/auth@v1 | |
| with: | |
| credentials_json: '${{ secrets.GCP_KEY }}' | |
| - name: Decode Astra (DataStax/Cassandra) Secure Connect Bundle | |
| run: | | |
| echo "${{ secrets.ASTRA_SECURE_BUNDLE_BASE64 }}" | base64 -d > secure-connect.zip | |
| - name: Run Regression Tests with Free-Threading | |
| run: python3.13 -m coverage run -m pytest --color=yes | |
| env: | |
| AZURE_STORAGE_CONNECTION_STRING: "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1;" | |
| MINIO_END_POINT: "s3.eu-west-2.amazonaws.com" | |
| GCP_PROJECT_ID: mabeldev | |
| MYSQL_USER: '${{ secrets.MYSQL_USER }}' | |
| MYSQL_PASSWORD: '${{ secrets.MYSQL_PASSWORD }}' | |
| POSTGRES_USER: '${{ secrets.POSTGRES_USER }}' | |
| POSTGRES_PASSWORD: '${{ secrets.POSTGRES_PASSWORD }}' | |
| POSTGRES_HOST: '${{ secrets.POSTGRES_HOST }}' | |
| MONGODB_CONNECTION: '${{ secrets.MONGODB_CONNECTION }}' | |
| MONGODB_DATABASE: opteryx | |
| COCKROACH_USER: '${{ secrets.COCKROACH_USER }}' | |
| COCKROACH_PASSWORD: '${{ secrets.COCKROACH_PASSWORD }}' | |
| REDIS_CONNECTION: '${{ secrets.REDIS_CONNECTION }}' | |
| MEMCACHED_SERVER: 'localhost:11211' | |
| DATASTAX_CLIENT_ID: '${{ secrets.DATASTAX_CLIENT_ID }}' | |
| DATASTAX_CLIENT_SECRET: '${{ secrets.DATASTAX_CLIENT_SECRET }}' | |
| OPTERYX_DEBUG: 1 | |
| MAX_LOCAL_BUFFER_CAPACITY: 100 | |
| MAX_CACHE_EVICTIONS_PER_QUERY: 4 | |
| DATA_CATALOG_CONNECTION: '${{ secrets.DATA_CATALOG_CONNECTION }}' | |
| DATA_CATALOG_STORAGE: '${{ secrets.DATA_CATALOG_STORAGE }}' | |
| VALKEY_CONNECTION: '${{ secrets.VALKEY_CONNECTION }}' | |
| - name: Check Coverage | |
| run: python3.13 -m coverage report -m | |
| - name: "Upload coverage to Codecov" | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| fail_ci_if_error: false | |
| flags: python-313t |