Simplify readme (#2131) #9258
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
name: SMARTS CI Base Tests Linux | |
on: [push, pull_request] | |
env: | |
venv_dir: .venv | |
jobs: | |
base-tests: | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal | |
strategy: | |
matrix: | |
tests: | |
- ./cli | |
- ./envision | |
- ./smarts/core --nb-exec-timeout 65536 --ignore=./smarts/core/tests/test_notebook.py | |
- ./smarts/env --ignore=./smarts/env/tests/test_rllib_hiway_env.py | |
- ./smarts/env/tests/test_rllib_hiway_env.py | |
- ./smarts/sstudio | |
- ./smarts/ray | |
- ./examples/tests/test_examples.py | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
python3.8 -m venv ${{env.venv_dir}} | |
. ${{env.venv_dir}}/bin/activate | |
pip install --upgrade pip | |
pip install wheel==0.38.4 | |
pip install -e .[camera_obs,opendrive,test,test_notebook,torch,train,gif_recorder,gymnasium,argoverse,envision,sumo] | |
if echo ${{matrix.tests}} | grep -q -e "test_rllib_hiway_env.py"; then pip install -e .[rllib]; fi | |
if echo ${{matrix.tests}} | grep -q -e "test_examples.py"; then pip install -e .[examples,rllib]; fi | |
if echo ${{matrix.tests}} | grep -q -e "/smarts/ray"; then pip install -e .[ray]; fi | |
- name: Build scenarios | |
run: | | |
. ${{env.venv_dir}}/bin/activate | |
scl scenario build-all \ | |
scenarios/open_drive/od_4lane \ | |
scenarios/open_drive/od_merge \ | |
scenarios/sumo/figure_eight \ | |
scenarios/sumo/intersections/2lane \ | |
scenarios/sumo/intersections/4lane \ | |
scenarios/sumo/intersections/6lane \ | |
scenarios/sumo/loop \ | |
scenarios/sumo/straight/3lane_bubble \ | |
scenarios/sumo/tests/multi_agents_loop \ | |
scenarios/sumo/zoo_intersection | |
- name: Run smoke tests | |
run: | | |
. ${{env.venv_dir}}/bin/activate | |
PYTHONPATH=$PWD PYTHONHASHSEED=42 pytest -v \ | |
--doctest-modules \ | |
--forked \ | |
--dist=no \ | |
-n auto \ | |
--ignore-glob="**/ros.py" \ | |
--ignore-glob="**/waymo_map.py" \ | |
--ignore-glob="**/argoverse_map.py" \ | |
${{matrix.tests}} \ | |
--ignore=./smarts/core/tests/test_smarts_memory_growth.py \ | |
--ignore=./smarts/core/tests/test_env_frame_rate.py \ | |
--ignore=./smarts/env/tests/test_benchmark.py \ | |
-k 'not test_long_determinism' | |
examples-rl: | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal | |
strategy: | |
matrix: | |
tests: | |
- e10_drive | |
- e11_platoon | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd ${GITHUB_WORKSPACE}/examples/${{matrix.tests}} | |
python3.8 -m venv ${{env.venv_dir}} | |
. ${{env.venv_dir}}/bin/activate | |
pip install --upgrade pip | |
pip install wheel==0.38.4 | |
pip install -e ./../../.[camera_obs,argoverse,sumo,test] | |
pip install -e ./inference/ | |
- name: Run smoke tests | |
run: | | |
cd ${GITHUB_WORKSPACE}/examples/${{matrix.tests}} | |
. ${{env.venv_dir}}/bin/activate | |
PYTHONPATH=$PWD PYTHONHASHSEED=42 pytest -v \ | |
--doctest-modules \ | |
--forked \ | |
--dist=no \ | |
-n auto \ | |
${GITHUB_WORKSPACE}/examples/tests/test_rl.py::test_${{matrix.tests}} | |
benchmark: | |
runs-on: ubuntu-20.04 | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal | |
strategy: | |
matrix: | |
tests: | |
- e10_drive | |
- e11_platoon | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
python3.8 -m venv ${{env.venv_dir}} | |
. ${{env.venv_dir}}/bin/activate | |
pip install --upgrade pip | |
pip install wheel==0.38.4 | |
pip install -e .[camera_obs,argoverse,test,ray,sumo] | |
scl zoo install examples/${{matrix.tests}}/inference | |
- name: Run smoke tests | |
run: | | |
cd ${GITHUB_WORKSPACE} | |
. ${{env.venv_dir}}/bin/activate | |
PYTHONPATH=$PWD PYTHONHASHSEED=42 SMARTS_RAY_NUM_CPUS=0 pytest -v \ | |
--doctest-modules \ | |
--forked \ | |
--dist=no \ | |
${GITHUB_WORKSPACE}/smarts/benchmark/tests/test_benchmark_runner.py::test_${{matrix.tests}} |