-
Notifications
You must be signed in to change notification settings - Fork 44
114 lines (100 loc) · 3.31 KB
/
ci.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install flow and sumo dependencies and binaries.
run: |
pushd $HOME
git clone https://github.com/flow-project/flow
pushd flow
git checkout aboudy-tmp # keeping until model-v3 features are added
pip install --use-deprecated=legacy-resolver -e .
./scripts/setup_sumo_ubuntu1804.sh
source ~/.bashrc
popd
popd
- name: Install MuJoCo.
run: |
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.mujoco/mjpro150/bin"
mkdir $HOME/.mujoco
unzip docs/ci/mjpro150_linux.zip && mv mjpro150 $HOME/.mujoco
cp docs/ci/mjkey.txt $HOME/.mujoco/mjkey.txt
pip install cffi
pip install Cython
pip install lockfile
pip install mujoco-py==1.50.1.68
- name: Install AntGather.
run: |
pip install pyopengl
pip install theano
pip install mako
pushd $HOME
git clone https://github.com/rll/rllab.git
pushd rllab
python setup.py develop
git submodule add -f https://github.com/florensacc/snn4hrl.git sandbox/snn4hrl
popd
popd
unzip docs/ci/mjpro131_linux.zip && mv mjpro131 $HOME/.mujoco
mkdir -p $HOME/rllab/vendor/mujoco
mkdir -p $HOME/rllab/vendor/mujoco_models
cp docs/ci/rllab/snake.xml $HOME/rllab/vendor/mujoco_models/snake.xml
cp docs/ci/rllab/ant.xml $HOME/rllab/vendor/mujoco_models/ant.xml
ln -s $HOME/.mujoco/mjpro131/bin/libglfw.so.3 $HOME/rllab/vendor/mujoco/.
ln -s $HOME/.mujoco/mjpro131/bin/libmujoco131.so $HOME/rllab/vendor/mujoco/.
ln -s $HOME/.mujoco/mjkey.txt $HOME/rllab/vendor/mujoco/.
- name: Install multi-world.
run: |
pushd $HOME
git clone https://github.com/vitchyr/multiworld.git
pushd multiworld
pip install -e .
popd
popd
- name: Other packages to install.
run: |
pip install flake8
pip install coveralls
pip install nose2
pip install pydocstyle
- name: Analysing the code with pylint.
run: |
flake8 --show-source
pydocstyle . --convention=numpy
- name: Run tests.
run: |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/.mujoco/mjpro150/bin"
export PATH="$HOME/sumo_binaries/bin:$PATH"
export SUMO_HOME="$HOME/sumo_binaries/bin"
pip install --use-deprecated=legacy-resolver -e .
nose2 --with-coverage
- name: Upload coverage data to coveralls.io
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true
coveralls:
name: Indicate completion to coveralls.io.
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}