-
-
Notifications
You must be signed in to change notification settings - Fork 44
65 lines (61 loc) · 2.07 KB
/
Copy pathtest_pypi.yml
File metadata and controls
65 lines (61 loc) · 2.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Test PyPI Install
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab only
workflow_dispatch:
inputs:
package_name:
description: "Package to install from PyPI (raylib, raylib_sdl, raylib_drm, raylib_dynamic)"
type: string
required: true
default: "raylib"
version:
description: "Package version to install (e.g., 5.5.0.2, or leave empty for latest)"
type: string
required: false
default: ""
pre_release:
description: "Allow pre-release versions?"
type: boolean
required: false
default: false
jobs:
test-pypi-install:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15-intel, macos-14]
python-version: ["3.14", "3.11", "3.12", "3.13"]
steps:
- name: Install Python from Homebrew
run: |
brew install python@${{ matrix.python-version }}
PYTHON_BIN="$(brew --prefix python@${{ matrix.python-version }})/bin/python${{ matrix.python-version }}"
echo "PYTHON_BIN=$PYTHON_BIN" >> "$GITHUB_ENV"
$PYTHON_BIN --version
- name: Install package from PyPI
run: |
"$PYTHON_BIN" -m pip install --upgrade pip
PRE_FLAG=""
if [ "${{ inputs.pre_release }}" = "true" ]; then
PRE_FLAG="--pre"
fi
if [ -n "${{ inputs.version }}" ]; then
"$PYTHON_BIN" -m pip install $PRE_FLAG "${{ inputs.package_name }}==${{ inputs.version }}"
else
"$PYTHON_BIN" -m pip install $PRE_FLAG "${{ inputs.package_name }}"
fi
- name: Test import and basic initialization
run: |
cd /
"$PYTHON_BIN" -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
cat /tmp/output
if grep -q "INFO: Initializing raylib" /tmp/output; then
echo "Passed"
exit 0
else
echo "Failed"
exit 1
fi
shell: bash