|
13 | 13 |
|
14 | 14 | jobs:
|
15 | 15 | build-and-test:
|
16 |
| - name: Build and test ${{matrix.cfg.name}} ${{matrix.os.name}} |
| 16 | + name: Build and test ${{matrix.cfg.name}} |
17 | 17 |
|
18 |
| - runs-on: ${{matrix.os.id}} |
| 18 | + runs-on: ${{matrix.cfg.os}} |
19 | 19 |
|
20 | 20 | strategy:
|
21 | 21 | matrix:
|
22 |
| - os: |
23 |
| - - { name: 'Linux', id: 'ubuntu-20.04' } |
24 | 22 | cfg:
|
25 |
| - - { name: 'GCC', cc: gcc-10, cxx: g++-10, config: --copt=-Wno-maybe-uninitialized } |
26 |
| - - { name: 'LLVM+libstdc++', cc: clang, cxx: clang++, config: --copt=-Wno-uninitialized } |
27 |
| - - { name: 'LLVM+libc++', cc: clang, cxx: clang++, config: --config=libc++ --copt=-Wno-uninitialized } |
| 23 | + - { name: 'Linux GCC', os: 'ubuntu-20.04', cc: gcc-10, cxx: g++-10, config: --copt=-Wno-maybe-uninitialized } |
| 24 | + - { name: 'Linux LLVM+libstdc++', os: 'ubuntu-20.04', cc: clang, cxx: clang++, config: --copt=-Wno-uninitialized } |
| 25 | + - { name: 'Linux LLVM+libc++', os: 'ubuntu-20.04', cc: clang, cxx: clang++, config: --config=libc++ --copt=-Wno-uninitialized } |
| 26 | + - { name: 'MacOS LLVM+libc++', os: 'macos-10.15', config: --config=libc++ --copt=-Wno-uninitialized } |
28 | 27 |
|
29 | 28 | env:
|
30 | 29 | CC: ${{matrix.cfg.cc}}
|
31 | 30 | CXX: ${{matrix.cfg.cxx}}
|
32 | 31 |
|
33 | 32 | steps:
|
34 | 33 | - uses: actions/checkout@v2
|
35 |
| - - name: install infrastructure |
| 34 | + - name: install infrastructure (Linux) |
| 35 | + if: matrix.cfg.os == 'ubuntu-20.04' |
36 | 36 | run: |
|
37 | 37 | sudo apt-get update
|
38 | 38 | sudo apt-get install gettext python2-dev python3-dev libsdl2-dev libosmesa6-dev python-numpy-dev python3-numpy-dev python-pil python3-pil python-enum34
|
39 | 39 | sudo find /usr -type f -name Python.h -o -name arrayobject.h -o -name functional -o -name -filesystem
|
40 | 40 | sudo ln -s /usr/lib/llvm-10/include/c++/v1 /usr/include/c++/v1
|
41 | 41 | sed -i -e 's/py_version = "PY3"/py_version = "PY2AND3"/' WORKSPACE
|
42 |
| - - name: build |
| 42 | + - name: install infrastructure (MacOS) |
| 43 | + if: matrix.cfg.os == 'macos-10.15' |
| 44 | + run: | |
| 45 | + brew install SDL2 |
| 46 | + sudo -H pip install numpy |
| 47 | + sudo -H pip3 install numpy |
| 48 | + sudo find -L /usr /Library -type f -name SDL.h -o -name glib.h -o -name Python.h -o -name arrayobject.h |
| 49 | + - name: build (Linux) |
| 50 | + if: matrix.cfg.os == 'ubuntu-20.04' |
43 | 51 | run: |
|
44 | 52 | bazel --bazelrc=.precommit.bazelrc build ${{matrix.cfg.config}} --copt=-Wno-sign-compare //...
|
45 |
| - - name: run-tests |
| 53 | + - name: run-tests (Linux) |
| 54 | + if: matrix.cfg.os == 'ubuntu-20.04' |
46 | 55 | timeout-minutes: 45
|
47 | 56 | run: |
|
48 | 57 | bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //...
|
49 | 58 | bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //python/tests:python_module_test.py2 --test_tag_filters="" --test_arg=--verbose
|
50 | 59 | bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //python/tests:python_module_test.py3 --test_tag_filters="" --test_arg=--verbose
|
51 | 60 | bazel --bazelrc=.precommit.bazelrc test ${{matrix.cfg.config}} --copt=-Wno-sign-compare //python/tests:dmenv_module_test --test_tag_filters="" --test_arg=--verbose
|
52 |
| - - name: run-agent |
| 61 | + - name: run-agent (Linux) |
| 62 | + if: matrix.cfg.os == 'ubuntu-20.04' |
53 | 63 | run: |
|
54 | 64 | bazel --bazelrc=.precommit.bazelrc run ${{matrix.cfg.config}} --copt=-Wno-sign-compare --define headless=osmesa //:python_random_agent
|
| 65 | + - name: build-and-run-tests (MacOS) |
| 66 | + if: matrix.cfg.os == 'macos-10.15' |
| 67 | + timeout-minutes: 45 |
| 68 | + run: | |
| 69 | + bazel --bazelrc=.precommit.bazelrc build ${{matrix.cfg.config}} --copt=-Wno-sign-compare -c opt --dynamic_mode=off --show_progress_rate_limit=10 //:game_lib_headless_macos |
0 commit comments