-
Notifications
You must be signed in to change notification settings - Fork 18
149 lines (129 loc) · 5.14 KB
/
tests.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Unit tests
on:
push:
branches: '**'
tags: '' # Restrict to blank tags
pull_request:
jobs:
tests:
runs-on: ${{ matrix.cfg.os }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: ubuntu-20.04, gcc_v: 8, py_v_maj: 3, py_v_min: 6, desc: 'Ubuntu 20.04 GCC 8 Python 3.6 tests' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
clean: false
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.cfg.py_v_maj }}.${{ matrix.cfg.py_v_min }}
- run: |
sudo apt-get -q update ; sudo apt-get -y install gcc-${{ matrix.cfg.gcc_v }} g++-${{ matrix.cfg.gcc_v }} || true
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.cfg.gcc_v }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.cfg.gcc_v }}
gcc --version
g++ --version
python -c "import sys; print(sys.version)"
pip --version
sudo apt-get -y install flex bison libeigen3-dev
# For documentation
pip install sphinx breathe sphinx-issues sphinx-tabs sphinx_rtd_theme
sudo apt-get -y install doxygen graphviz
# For Python wrapping
#pip install wheel
#pip install --upgrade pip
#pip install pyibex
#pip install --upgrade pyibex==1.8.0
pwd
ls
export ORIGIN_DIR=$PWD
cd ..
pwd
ls
cd $ORIGIN_DIR
# IBEX
bash scripts/dependencies/install_ibex.sh
# CAPD
# cancelled on 2023/05/09: bash scripts/dependencies/install_capd.sh
# Environment variables
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$HOME/codac/build_install
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$HOME/ibex-lib/build_install
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
#py_version=$(python -c "import sys; print(sys.version[:3])") # default python version
#echo "$py_version"
cd $ORIGIN_DIR
pwd
ls
#git submodule init ; git submodule update # for pybind11 submodule
mkdir build -p
cd build
# Without synthesis tree
# Building lib + tests
cmake -DCMAKE_INSTALL_PREFIX=$HOME/codac/build_install -DCMAKE_PREFIX_PATH=$HOME/ibex-lib/build_install -DWITH_PYTHON=OFF -DBUILD_TESTS=ON -DWITH_TUBE_TREE=OFF -DWITH_CAPD=OFF -DTEST_EXAMPLES=ON ..
##-DPYTHON_EXECUTABLE=/usr/bin/python3.5 ..
make
#make doc # todo
make install
#cd python/python_package
#/usr/bin/python3.5 setup.py develop --user
#/usr/bin/python3.5 pycodac/tests/test_arithmetic.py
#cd ../../
# Building the examples
cd ../examples
find . -type d -name build -prune -exec rm -rf {} \;
cd linobs
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd basics
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd robotics
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd tuto
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd lie_group
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ../../build
# Testing
./tests/core/codac-tests-core
make test
./../examples/tuto/05_dyn_rangebearing/build/05_dyn_rangebearing
# With synthesis tree for all created tubes
# Building lib + tests
cmake -DCMAKE_INSTALL_PREFIX=$HOME/codac/build_install -DCMAKE_PREFIX_PATH=$HOME/ibex-lib/build_install -DWITH_PYTHON=OFF -DBUILD_TESTS=ON -DWITH_TUBE_TREE=ON -DWITH_CAPD=OFF -DTEST_EXAMPLES=ON ..
##-DPYTHON_EXECUTABLE=/usr/bin/python3.5 ..
make
#make doc
make install
#cd python/python_package
#/usr/bin/python3.5 setup.py develop --user
#/usr/bin/python3.5 pycodac/tests/test_arithmetic.py
#cd ../../
# Building the examples
cd ../examples
find . -type d -name build -prune -exec rm -rf {} \;
cd linobs
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd basics
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd robotics
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd tuto
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ..
cd lie_group
find . * -maxdepth 0 | grep -P "^[0-9]" | xargs -L 1 bash -c 'cd "$0" && ./build.sh && cd ..'
cd ../../build
# Testing
./tests/core/codac-tests-core
make test
./../examples/tuto/05_dyn_rangebearing/build/05_dyn_rangebearing