forked from electronstudio/raylib-python-cffi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
158 lines (154 loc) · 5.71 KB
/
.cirrus.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# download at https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/pi/binary.zip
# https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/mac/binary.zip
pi_task:
arm_container:
matrix:
- image: dtcooper/raspberrypi-os:python3.12-bullseye
- image: dtcooper/raspberrypi-os:python3.11-bullseye
- image: dtcooper/raspberrypi-os:python3.10-bullseye
- image: dtcooper/raspberrypi-os:python3.9-bullseye
env:
matrix:
- RAYLIB_PLATFORM: "Desktop"
RAYLIB_OPENGL: "2.1"
- RAYLIB_PLATFORM: "SDL"
RAYLIB_OPENGL: "2.1"
- RAYLIB_PLATFORM: "DRM"
RAYLIB_OPENGL: "ES 2.0"
setup_script:
- apt update
- apt -y install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev libgbm-dev libdrm-dev
build_sdl_script:
- wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
- tar xvfz release-2.30.7.tar.gz
- mkdir buildsdl
- cd buildsdl
- cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
- cmake --build . --config Release
- cmake --install .
- cd ..
build_raylib_script:
- git submodule update --init --recursive
- cd raylib-c
- mkdir build
- cd build
- cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
- make -j2
- make install
build_raylib_again_script:
- cd raylib-c
- mkdir build2
- cd build2
- cmake -DPLATFORM=${RAYLIB_PLATFORM} -DOPENGL_VERSION="${RAYLIB_OPENGL}" -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
- make -j2
- cp raylib/libraylib.a /usr/local/lib/libraylib.a
build_script:
- cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
- cp physac/src/physac.h /usr/local/include/
- cp raygui/src/raygui.h /usr/local/include/
- python -m pip install --break-system-packages --upgrade pip
- python -m pip install --break-system-packages cffi
- python -m pip install --break-system-packages setuptools
- python -m pip install --break-system-packages wheel
- python setup.py bdist_wheel --plat-name manylinux2014_aarch64
test_script:
- python -m pip install --break-system-packages dist/*.whl
- cd /
- python -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
artifacts:
path: "dist/*"
mac_task:
macos_instance:
matrix:
- image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
matrix:
- env:
PY_VER: "3.9"
RAYLIB_PLATFORM: Desktop
- env:
PY_VER: "3.9"
RAYLIB_PLATFORM: SDL
- env:
PY_VER: "3.10"
RAYLIB_PLATFORM: Desktop
- env:
PY_VER: "3.10"
RAYLIB_PLATFORM: SDL
- env:
PY_VER: "3.11"
RAYLIB_PLATFORM: Desktop
- env:
PY_VER: "3.11"
RAYLIB_PLATFORM: SDL
- env:
PY_VER: "3.12"
RAYLIB_PLATFORM: Desktop
- env:
PY_VER: "3.12"
RAYLIB_PLATFORM: SDL
- env:
PY_VER: "3.13"
RAYLIB_PLATFORM: Desktop
- env:
PY_VER: "3.13"
RAYLIB_PLATFORM: SDL
setup_script:
- brew update
- brew install python@${PY_VER}
build_sdl_script:
- wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
- tar xvfz release-2.30.7.tar.gz
- mkdir buildsdl
- cd buildsdl
- cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
- cmake --build . --config Release
- sudo cmake --install .
- cd ..
build_raylib_script:
- git submodule update --init --recursive
- cd raylib-c
- mkdir build
- cd build
- cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
- make -j8
- sudo make install
build_raylib_again_script:
- cd raylib-c
- mkdir build2
- cd build2
- cmake -DPLATFORM=${RAYLIB_PLATFORM} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
- make -j8
- sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
build_script:
- sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
- sudo cp physac/src/physac.h /usr/local/include/
- sudo cp raygui/src/raygui.h /usr/local/include/
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages --upgrade pip
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages cffi
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages setuptools
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages wheel
- /opt/homebrew/bin/python${PY_VER} setup.py bdist_wheel
test_script:
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages dist/*.whl
- cd /
- /opt/homebrew/bin/python${PY_VER} -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
artifacts:
path: "dist/*"