-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.93 KB
/
Copy pathraspberry_pi.yml
File metadata and controls
59 lines (51 loc) · 1.93 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
name: Test on Raspberry Pi
on: [push]
jobs:
build:
runs-on: self-hosted
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt update
sudo apt install -y libatlas-base-dev \
python3-pip \
python3-venv \
python3-dev \
libffi-dev \
build-essential \
libgl1-mesa-glx \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libportmidi-dev \
- name: Set up folder
run: |
pwd
rm -rf /tmp/test-${{ matrix.python-version }}
mkdir /tmp/test-${{ matrix.python-version }}
cd /tmp/test-${{ matrix.python-version }}
- name: Set up Python version and virtual environment
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
pyenv local ${{ matrix.python-version }}
python -m venv /tmp/test-${{ matrix.python-version }}/.venv
- name: Install project dependencies
run: |
/tmp/test-${{ matrix.python-version }}/.venv/bin/python -m pip install -r requirements.txt
- name: Run all demos to make sure they load
run: |
/tmp/test-${{ matrix.python-version }}/.venv/bin/python main.py test
- name: Clean up code
if: always()
run: |
rm -rf /tmp/test-${{ matrix.python-version }}