forked from acados/acados
-
Notifications
You must be signed in to change notification settings - Fork 0
234 lines (194 loc) · 7.02 KB
/
full_build.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
name: Test Full Build Linux
on:
push:
branches-ignore:
- 'doc*'
- 'wip*'
pull_request:
branches:
- '*'
env:
BUILD_TYPE: Release
ACADOS_PYTHON: ON
ACADOS_OCTAVE: ON
ACADOS_WITH_OSQP: ON
ACADOS_WITH_QPOASES: ON
ACADOS_WITH_DAQP: ON
ACADOS_WITH_QPDUNES: OFF
ACADOS_ON_CI: ON
jobs:
core_build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Create Build Environment
working-directory: ${{runner.workspace}}
run: cmake -E make_directory ${{runner.workspace}}/acados/build
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/acados/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=$ACADOS_PYTHON -DACADOS_OCTAVE=OFF
- name: Build & Install
working-directory: ${{runner.workspace}}/acados/build
shell: bash
run: |
cmake --build . --config $BUILD_TYPE
make install -j4
- name: Store shared libs (/lib)
uses: actions/upload-artifact@v4
with:
name: lib
if-no-files-found: error
path: ${{runner.workspace}}/acados/lib/
compression-level: 0
overwrite: true
- name: Store build scripts (/build)
uses: actions/upload-artifact@v4
with:
name: build
if-no-files-found: error
path: |
${{runner.workspace}}/acados/build/
!${{runner.workspace}}/**/*.dir
compression-level: 0
overwrite: true
# exclude object files in .dir directories
- name: Store include directory (/include)
uses: actions/upload-artifact@v4
with:
name: include
if-no-files-found: error
path: ${{runner.workspace}}/acados/include/
compression-level: 0
overwrite: true
python_interface:
needs: core_build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/download-artifact@v4
with:
path: ${{runner.workspace}}/acados
- name: Export Paths
working-directory: ${{runner.workspace}}/acados
shell: bash
run: |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}}
- name: Install Python interface
working-directory: ${{runner.workspace}}/acados
shell: bash
run: ${{runner.workspace}}/acados/.github/linux/install_python.sh''
- name: Run CMake python tests (ctest)
working-directory: ${{runner.workspace}}/acados/build
shell: bash
run: |
source ${{runner.workspace}}/acados/acadosenv/bin/activate
ctest -C $BUILD_TYPE --output-on-failure -j 4 --parallel 4;
MATLAB_interface:
needs: core_build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/download-artifact@v4
with:
path: ${{runner.workspace}}/acados
- name: Install Casadi MATLAB
working-directory: ${{runner.workspace}}/acados/external
shell: bash
run: |
${{runner.workspace}}/acados/.github/linux/install_casadi_matlab.sh
- name: Export Paths
working-directory: ${{runner.workspace}}/acados
shell: bash
run: |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}}
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
if: always()
with:
release: R2021a
cache: true
# just needed for blasfeo_target.h
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/acados/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=OFF
- name: Matlab test native MEX
uses: matlab-actions/run-command@v2
if: always()
with:
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; run_matlab_tests
simulink_interface:
needs: core_build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/download-artifact@v4
with:
path: ${{runner.workspace}}/acados
- name: Install Casadi MATLAB
working-directory: ${{runner.workspace}}/acados/external
shell: bash
run: |
${{runner.workspace}}/acados/.github/linux/install_casadi_matlab.sh
- name: Export Paths
working-directory: ${{runner.workspace}}/acados
shell: bash
run: |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}}
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
if: always()
with:
release: R2021a
products: Simulink Simulink_Test
cache: true
# just needed for blasfeo_target.h
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/acados/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=OFF
- name: Run Simulink test
uses: matlab-actions/run-command@v2
if: always()
with:
command: cd ${{runner.workspace}}/acados/examples/acados_matlab_octave/test; simulink_test
octave_interface:
needs: core_build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/download-artifact@v4
with:
path: ${{runner.workspace}}/acados
- name: Prepare Octave
working-directory: ${{runner.workspace}}/acados/external
shell: bash
run: |
sudo apt-get update
sudo apt-get install liboctave-dev -y --fix-missing
octave --version
${{runner.workspace}}/acados/.github/linux/install_casadi_octave.sh
- name: Export Paths
working-directory: ${{runner.workspace}}/acados
shell: bash
run: |
${{runner.workspace}}/acados/.github/linux/export_paths.sh'' ${{runner.workspace}}
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/acados/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DACADOS_WITH_QPOASES=$ACADOS_WITH_QPOASES -DACADOS_WITH_DAQP=$ACADOS_WITH_DAQP -DACADOS_WITH_QPDUNES=$ACADOS_WITH_QPDUNES -DACADOS_WITH_OSQP=$ACADOS_WITH_OSQP -DACADOS_PYTHON=OFF -DACADOS_OCTAVE=$ACADOS_OCTAVE
- name: Run CMake Octave tests (ctest)
working-directory: ${{runner.workspace}}/acados/build
shell: bash
run: ctest -C $BUILD_TYPE --output-on-failure -j 4 --parallel 4;