Skip to content

Commit 22df486

Browse files
authored
Merge pull request #157 from ethz-adrl/feature/new_hpipm_github_workflow
Feature/new hpipm GitHub workflow
2 parents d55a056 + 0324099 commit 22df486

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

.github/workflows/ccpp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ControlToolbox CI
1+
name: unit tests
22

33
on:
44
pull_request:
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: build examples (incl. hpipm)
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- v3*
7+
- 3*
8+
- 4*
9+
- 2*
10+
- v2*
11+
- master
12+
schedule:
13+
- cron: "0 2 * * 0"
14+
15+
jobs:
16+
ct_build_ex:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
os: [ubuntu-16.04, ubuntu-18.04]
21+
compiler: [gcc, clang]
22+
23+
steps:
24+
- name: checkout code
25+
uses: actions/checkout@v2
26+
- name: Install cmake
27+
run: |
28+
sudo apt-get update >/dev/null # suppress output
29+
sudo apt-get install cmake >/dev/null # suppress output
30+
- name: Create workspace
31+
run: |
32+
mkdir -p ~/catkin_ws/src
33+
cd ~/catkin_ws/src
34+
ln -s $GITHUB_WORKSPACE .
35+
- name: Install Gtest
36+
run: |
37+
sudo apt-get update >/dev/null # suppress output
38+
sudo apt-get install cmake >/dev/null # suppress output
39+
sudo apt install libgtest-dev >/dev/null # suppress output
40+
cd /usr/src/gtest/ >/dev/null # suppress output
41+
sudo mkdir build && cd build >/dev/null # suppress output
42+
sudo cmake .. -DBUILD_SHARED_LIBS=ON >/dev/null # suppress output
43+
sudo make >/dev/null # suppress output
44+
sudo cp *.so /usr/lib >/dev/null # suppress output
45+
cd ~/ >/dev/null # suppress output
46+
- name: Install deb-packaged dependencies
47+
run: |
48+
cd ~/catkin_ws/src/control-toolbox/ct
49+
chmod 775 install_deps.sh
50+
sudo ./install_deps.sh
51+
- name: Install blasfeo and hpipm
52+
run: |
53+
cd ~/catkin_ws/src/control-toolbox/ct
54+
chmod 775 install_hpipm.sh
55+
sudo ./install_hpipm.sh
56+
- name: build ct_core examples
57+
continue-on-error: false
58+
env:
59+
CC: ${{ matrix.compiler }}
60+
run: |
61+
cd ~/catkin_ws/src/control-toolbox/ct_core
62+
mkdir build && cd build
63+
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=false -DBUILD_EXAMPLES=true -DCMAKE_CXX_FLAGS="-w"
64+
make
65+
sudo make install
66+
- name: build ct_optcon examples, also those requiring hpipm.
67+
continue-on-error: false
68+
env:
69+
CC: ${{ matrix.compiler }}
70+
run: |
71+
cd ~/catkin_ws/src/control-toolbox/ct_optcon
72+
mkdir build && cd build
73+
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=false -DBUILD_EXAMPLES=true -DCMAKE_CXX_FLAGS="-w"
74+
make
75+
sudo make install

0 commit comments

Comments
 (0)