diff --git a/.github/workflows/python_wheel_build.yml b/.github/workflows/python_wheel_build.yml index 3cd84480208ad..b7b1822670be5 100644 --- a/.github/workflows/python_wheel_build.yml +++ b/.github/workflows/python_wheel_build.yml @@ -50,35 +50,58 @@ on: - "30" required: true default: "00" + pull_request: + types: [opened, synchronize, reopened] jobs: Build_Wheel: runs-on: macos-26 + strategy: + fail-fast: false + matrix: + target: [cp310-macosx_arm64, cp311-macosx_arm64, cp312-macosx_arm64, cp313-macosx_arm64, cp314-macosx_arm64] + name: ${{ matrix.target }} steps: - - name: Checkout the official ROOT repo - uses: actions/checkout@v6 - with: - path: root -# ref: v${{ inputs.major }}-${{ inputs.minor }}-${{ inputs.patch }} - - name: Make wheel + - uses: actions/checkout@v6 + - uses: ./.github/workflows/cibuildwheel-impl env: MACOSX_DEPLOYMENT_TARGET: 26.5 - run: | - mkdir wheel_creation && cd wheel_creation - cp -r ../root . - python3 -m venv root_build_env - source root_build_env/bin/activate - pip install --upgrade pip setuptools wheel build - cd root - pip install -r requirements.txt - python3 -m build --wheel - pip install delocate - mkdir fixed_wheels - delocate-wheel -v -w fixed_wheels/ dist/*.whl + with: + build-tag: ${{ matrix.target }} + + Test_Wheels: + needs: Build_Wheel + runs-on: macos-26 + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] + name: test-wheel-cp${{ matrix.python-version }} + steps: + - uses: actions/checkout@v6 + - name: Download produced wheels + uses: actions/download-artifact@v4 + with: + path: wheels + merge-multiple: true - - name: Upload_wheel - uses: actions/upload-artifact@v6 + - name: Setup Python + uses: actions/setup-python@v5 with: - name: Wheel upload - path: /Users/runner/work/root/root/wheel_creation/root/fixed_wheels/*.whl - if-no-files-found: error + python-version: ${{ matrix.python-version }} + + - name: Install produced wheel + run: | + ls -R wheels + PY_VER=$(python -c "import sys; print(f'cp{sys.version_info.major}{sys.version_info.minor}')") + WHEEL=$(ls wheels/*${PY_VER}*macosx*.whl | head -n 1) + echo "Python version: ${PY_VER}, installing wheel: ${WHEEL}" + pip install "$WHEEL" + + - name: Install tutorials dependencies + run: | + python -m pip install --no-cache-dir -r test/wheels/requirements-ci.txt + + - name: Run tutorials + run: | + pytest -vv --verbosity="4" -rF test/wheels