|
10 | 10 | type: string |
11 | 11 | required: true |
12 | 12 | default: "raylib" |
| 13 | + version: |
| 14 | + description: "Package version to install (e.g., 5.5.0.2, or leave empty for latest)" |
| 15 | + type: string |
| 16 | + required: false |
| 17 | + default: "" |
| 18 | + pre_release: |
| 19 | + description: "Allow pre-release versions?" |
| 20 | + type: boolean |
| 21 | + required: false |
| 22 | + default: false |
13 | 23 |
|
14 | 24 | jobs: |
15 | 25 | test-pypi-install: |
16 | 26 | runs-on: ${{ matrix.os }} |
17 | 27 | strategy: |
18 | 28 | fail-fast: false |
19 | 29 | matrix: |
20 | | - os: [macos-15-intel, macos-14] |
21 | | - python-version: ["3.14", "3.11", "3.12", "3.13"] |
| 30 | + os: [macos-15-intel, macos-14, macos-26] |
| 31 | + python-version: ["3.14", "3.13"] |
| 32 | + python-source: [homebrew, python-org] |
22 | 33 | steps: |
23 | 34 | - name: Install Python from Homebrew |
| 35 | + if: matrix.python-source == 'homebrew' |
24 | 36 | run: | |
25 | 37 | brew install python@${{ matrix.python-version }} |
26 | 38 | PYTHON_BIN="$(brew --prefix python@${{ matrix.python-version }})/bin/python${{ matrix.python-version }}" |
27 | 39 | echo "PYTHON_BIN=$PYTHON_BIN" >> "$GITHUB_ENV" |
28 | 40 | $PYTHON_BIN --version |
29 | 41 |
|
| 42 | + - name: Setup Python (python.org) |
| 43 | + if: matrix.python-source == 'python-org' |
| 44 | + uses: actions/setup-python@v5 |
| 45 | + with: |
| 46 | + python-version: ${{ matrix.python-version }} |
| 47 | + |
| 48 | + - name: Set Python bin (python.org) |
| 49 | + if: matrix.python-source == 'python-org' |
| 50 | + shell: bash |
| 51 | + run: | |
| 52 | + PYTHON_BIN="$(command -v python${{ matrix.python-version }} || command -v python3)" |
| 53 | + echo "PYTHON_BIN=$PYTHON_BIN" >> "$GITHUB_ENV" |
| 54 | + $PYTHON_BIN --version |
| 55 | +
|
30 | 56 | - name: Install package from PyPI |
31 | 57 | run: | |
32 | | - "$PYTHON_BIN" -m pip install --upgrade pip |
33 | | - "$PYTHON_BIN" -m pip install "${{ inputs.package_name }}" |
| 58 | + PRE_FLAG="" |
| 59 | + if [ "${{ inputs.pre_release }}" = "true" ]; then |
| 60 | + PRE_FLAG="--pre" |
| 61 | + fi |
| 62 | + if [ -n "${{ inputs.version }}" ]; then |
| 63 | + "$PYTHON_BIN" -m pip install $PRE_FLAG "${{ inputs.package_name }}==${{ inputs.version }}" --break-system-packages |
| 64 | + else |
| 65 | + "$PYTHON_BIN" -m pip install $PRE_FLAG "${{ inputs.package_name }}" --break-system-packages |
| 66 | + fi |
34 | 67 |
|
35 | 68 | - name: Test import and basic initialization |
36 | 69 | run: | |
|
0 commit comments