-
-
Notifications
You must be signed in to change notification settings - Fork 404
81 lines (68 loc) · 1.89 KB
/
build-and-test.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
name: Build and test
on:
push:
paths:
- '.github/workflows/build-and-test.yml'
- 'include/**'
- 'scripts/**'
- 'src/**'
- 'tests/**'
- 'CMakeLists.txt'
- 'setup.py'
- 'pyproject.toml'
branches: [master]
pull_request:
paths:
- '.github/workflows/build-and-test.yml'
- 'include/**'
- 'scripts/**'
- 'src/**'
- 'tests/**'
- 'CMakeLists.txt'
- 'setup.py'
- 'pyproject.toml'
branches: [master]
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
jobs:
build_and_test:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
python-version: ['3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Report OS
run: |
echo ${{ matrix.os }}
echo ${{ runner.os }}
uname -p
- name: Install dependencies on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y cmake git libboost-all-dev libsdl2-dev libopenal-dev
- name: Apt report
if: runner.os == 'Linux'
run: apt list --installed
- name: Install dependencies on MacOS
if: runner.os == 'macOS'
run: brew install cmake boost openal-soft sdl2
- name: Set up Python ${{ matrix.python-version }} environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Python environment report
run: python -c "import sys; print(sys.version)"
- name: Pip install
run: pip install .[test]
- name: Import check
run: python -c "import vizdoom"
- name: Run tests
# Skip tests on macOS with Apple Silicon, because they are slow (TODO: investigate)
if: matrix.os != 'macos-14'
run: pytest tests