forked from Farama-Foundation/stable-retro
-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (55 loc) · 2.14 KB
/
test-python.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
name: Test Stable-Retro
on: [pull_request, push]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
build:
runs-on: ubuntu-latest # todo, add more OS systems to see if they work as well
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system packages
run: |
sudo apt-get update
sudo apt-get install git cmake capnproto zlib1g-dev build-essential pkg-config libzip-dev software-properties-common libbz2-dev xvfb python3-opengl
- name: Install pip packages
run: |
python3 -m pip install --upgrade pip pytest
python3 -m pip install -e .
- name: Run tests
run: |
xvfb-run -s '-screen 0 1024x768x24' pytest
build_macos:
runs-on: macos-14
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system packages
run: brew install pkg-config [email protected] libzip capnp cmake
- name: Install python packages
run: python3 -m pip install --upgrade pip pytest
- name: Build project
run: |
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
python3 -m pip install -e .
- name: Run tests
run: |
xvfb-run -s '-screen 0 1024x768x24' pytest
# - name: Build wheel
# run: python3 -m build --wheel --sdist
# - name: Smoke Test
# run: |
# python3 -m pip uninstall stable-retro -y
# python3 -m pip install --no-cache dist/*.whl
# python3 -c 'import retro; env = retro.make("Airstriker-Genesis", render_mode="rgb_array"); env.reset(); print(env.step(env.action_space.sample())); env.close();'