Skip to content

Adding the notifications buffer to ViZDoom gymnasium wrapper (#657) #286

Adding the notifications buffer to ViZDoom gymnasium wrapper (#657)

Adding the notifications buffer to ViZDoom gymnasium wrapper (#657) #286

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
DYLD_LIBRARY_PATH: "/opt/homebrew/opt/openal-soft/lib:/usr/local/opt/openal-soft/lib"
jobs:
build_and_test:
name: Build and test on ${{ matrix.os }} with Python ${{ matrix.python-version }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, macos-15]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
fail-fast: true
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
apt list --installed
- name: Install dependencies on MacOS
if: runner.os == 'macOS'
run: |
brew config
brew uninstall cmake
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: CMake report
run: |
cmake --version
cmake -DBUILD_PYTHON=ON .
rm -rf CMakeCache.txt
- name: Pip install
run: |
pip install .[test]
pip freeze
- name: Import check
run: python -c "import vizdoom"
- name: Init with console check (+snd_efx 0)
run: python -c "import vizdoom; g = vizdoom.DoomGame(); g.set_window_visible(False); g.set_console_enabled(True); g.set_audio_buffer_enabled(True); g.add_game_args('+snd_efx 0'); g.init()"
- name: Run tests
run: pytest tests -s