compatibility with bazel 8.0.0 #215
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A workflow to run Bazel builds and tests. | |
name: precommit | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'master' | |
- 'beta' | |
- 'gamma' | |
- 'macos' | |
jobs: | |
build-and-test: | |
name: Build and test ${{matrix.cfg.name}} ${{matrix.os.name}} | |
runs-on: ${{matrix.os.id}} | |
strategy: | |
matrix: | |
os: | |
- { name: 'Linux', id: 'ubuntu-22.04' } | |
cfg: | |
- { name: 'GCC', cc: gcc-12, cxx: g++-12, config: --copt=-Wno-maybe-uninitialized } | |
- { name: 'LLVM+libstdc++', cc: clang, cxx: clang++, config: --copt=-Wno-uninitialized } | |
- { name: 'LLVM+libc++', cc: clang, cxx: clang++, config: --config=libc++ --copt=-Wno-uninitialized } | |
env: | |
CC: ${{matrix.cfg.cc}} | |
CXX: ${{matrix.cfg.cxx}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install infrastructure | |
run: | | |
sudo apt-get update | |
sudo apt-get install gettext python3-dev libsdl2-dev libosmesa6-dev python3-numpy-dev python3-pil | |
sudo find /usr -type f -name Python.h -o -name arrayobject.h -o -name functional -o -name -filesystem | |
sudo ln -s /usr/lib/llvm-10/include/c++/v1 /usr/include/c++/v1 | |
- name: build | |
run: | | |
bazel --bazelrc=.precommit.bazelrc build ${{matrix.cfg.config}} --copt=-Wno-sign-compare //... //:python_game_py3 | |
- name: run-tests | |
timeout-minutes: 45 | |
run: | | |
bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //... | |
bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //python/tests:python_module_test --test_tag_filters="" | |
bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //python/tests:dmenv_module_test --test_tag_filters="" | |
- name: run-agent | |
run: | | |
bazel --bazelrc=.precommit.bazelrc run ${{matrix.cfg.config}} --copt=-Wno-sign-compare --define headless=osmesa //:python_random_agent |