-
Notifications
You must be signed in to change notification settings - Fork 192
37 lines (34 loc) · 1.29 KB
/
ci-pull-request.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
name: SMARTS CI Pull Request
on:
push:
branches:
- disabled
env:
venv_dir: .venv
jobs:
test-benchmark:
runs-on: ubuntu-20.04
container: ghcr.io/smarts-project/smarts:v0.6.1-minimal
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup package
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 .[camera-obs,rllib,test,torch,train]
- name: SMARTS benchmark
run: |
cd $GITHUB_WORKSPACE
. ${{env.venv_dir}}/bin/activate
apt-get update && apt-get -y install git
git checkout $(git log --merges -n 1 --format=format:"%H")
scl scenario build-all --clean ./scenarios
pytest --benchmark-save=previous --benchmark-min-rounds=10 --benchmark-timer=time.process_time ./smarts/env/tests/test_benchmark.py
git checkout -
pip install .[camera-obs,rllib,test,torch,train]
scl scenario build-all --clean ./scenarios
pytest --benchmark-compare=0001_previous --benchmark-compare-fail=mean:10% --benchmark-min-rounds=10 --benchmark-timer=time.process_time ./smarts/env/tests/test_benchmark.py