Fix load attr keys version rebased #1950
Workflow file for this run
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: CI | |
| on: [push, pull_request] | |
| jobs: | |
| run_tests: | |
| name: Run Tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Don't let test failures on one platform block other platforms. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] | |
| # Test against multiple patch versions as CinderX references internal | |
| # CPython functions and structures which can lead to ABI problems. See | |
| # cinderx/UpstreamBorrow for more details. | |
| python-version: ['3.14.3', '3.14.4', '3.14.5', '3.14.6'] | |
| include: | |
| - os: ubuntu-latest | |
| python-version: '3.14t' | |
| - os: ubuntu-latest | |
| python-version: '3.15.0-beta.3' | |
| steps: | |
| - name: Checkout CinderX | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| # Ubuntu's default GCC 13.3 hits an internal compiler error on | |
| # SwapLockGuard's std::atomic_ref::compare_exchange_weak in | |
| # cinderx/Jit/code_patcher.cpp, which is only compiled under | |
| # Py_GIL_DISABLED. GCC 14 (which is also what manylinux_2_28 | |
| # ships via gcc-toolset-14) compiles it cleanly. | |
| - name: Install GCC 14 | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-14 g++-14 | |
| echo "CC=gcc-14" >> "$GITHUB_ENV" | |
| echo "CXX=g++-14" >> "$GITHUB_ENV" | |
| - name: Create venv | |
| run: uv venv --python ${{ matrix.python-version }} | |
| - name: Build CinderX | |
| # RuntimeTests do not support Windows or free-threaded builds yet. | |
| env: | |
| CINDERX_BUILD_RUNTIME_TESTS: ${{ runner.os != 'Windows' && matrix.python-version != '3.14t' && '1' || '' }} | |
| CINDERX_RUNTIME_TESTS_OUTPUT_DIR: ${{ github.workspace }}/build/runtime-tests | |
| run: uv build --wheel --python ${{ matrix.python-version }} | |
| - name: Install CinderX | |
| run: uv pip install cinderx --find-links dist --no-index | |
| - name: Check CinderX loads successfully | |
| run: | | |
| uv run python -c 'import cinderx ; print(cinderx.get_import_error()) ; assert cinderx.is_initialized()' | |
| - name: Install pytest | |
| run: uv pip install pytest | |
| - name: Run Tests | |
| # Free-threaded builds aren't stable yet, so don't run the test suite | |
| # against them. | |
| if: matrix.python-version != '3.14t' | |
| run: uv run pytest cinderx/PythonLib/test_cinderx/ | |
| - name: Run native tests | |
| if: runner.os != 'Windows' && matrix.python-version != '3.14t' | |
| # Skip known OSS-only failures. Keep these narrow so RuntimeTests still | |
| # provide useful signal. | |
| # TODO(T275133043): burn these down as the underlying issues are fixed. | |
| # Particularly the segfaults. | |
| run: | | |
| set -euo pipefail | |
| common='AllPassesTest.*:AllPassesStaticTest.*:CmdLineTest.ExplicitJITDisable:UtilTest.SymbolizerResolvesDynamicSymbol' | |
| arm64='LIRGeneratorTest.ParserTest:BackendTest.MoveSequenceOpt2Test:CodePatcherTest.DeoptPatch:BranchRelaxationTest.*' | |
| macos='BackendTest.CastTest:BackendTest.InlineJITRTCastTest:SimplifyTest.BinaryOpWithObjSpecLeftAndRightFloatExactTurnsIntoLoadConst:NativeCallsTest.NativeInvokeBasic:SimplifyStaticTest.UnboxOfRandMaxIsEliminated:DeadCodeEliminationAndSimplifyTest.UnboxOfStaticGlobalIsOptimized:HIRBuilderStaticTest.CIntTypeEmitsConvertPrimitive:CodePatcherTest.DeoptPatch' | |
| filter="-${common}" | |
| if [[ "$RUNNER_ARCH" == "ARM64" ]]; then | |
| filter="${filter}:${arm64}" | |
| fi | |
| if [[ "$RUNNER_OS" == "macOS" ]]; then | |
| filter="${filter}:${macos}" | |
| fi | |
| package_parent="$(uv run python -c 'import pathlib, cinderx; print(pathlib.Path(cinderx.__file__).resolve().parent.parent)')" | |
| export PYTHONPATH="$package_parent" | |
| export GTEST_FILTER="$filter" | |
| (cd cinderx && ../build/runtime-tests/RuntimeTests) | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Don't let build failures on one platform block other platforms. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] | |
| steps: | |
| - name: Checkout CinderX | |
| uses: actions/checkout@v6 | |
| # cibuildwheel uses Python from a docker container. The Python version is | |
| # controlled by selecting the docker image version in pyproject.toml. | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel | |
| - name: Build wheels | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout CinderX | |
| uses: actions/checkout@v6 | |
| # An sdist is just source code and doesn't contain compiled artifacts, it | |
| # doesn't need to be built per patch version. | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| - name: Install build tools | |
| run: python -m pip install build | |
| - name: Build sdist | |
| run: python -m build --sdist |