-
Notifications
You must be signed in to change notification settings - Fork 28
63 lines (52 loc) · 1.82 KB
/
matlab.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
name: Matlab (ubuntu) build and test
on: [push]
env:
MATLAB_VERSION: R2021a
CC: gcc-9
CXX: g++-9
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
# with:
# release: ${{ env.MATLAB_VERSION }}
- name: Install Ubuntu dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y check ccache
git clone https://github.com/libexpat/libexpat
cmake -G Ninja -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=./dependencies -B libexpat -S libexpat/expat
cmake --build libexpat
cmake --install libexpat
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: |
cmake $GITHUB_WORKSPACE \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Debug \
-DWITH_CHECK=ON \
-DWITH_LIBXML=OFF \
-DWITH_EXPAT=ON \
-DWITH_MATLAB=ON \
-DWITH_STABLE_PACKAGES=ON
- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: |
cmake --build . --config Debug --target matlab_binding_TranslateSBML
cmake --build . --config Debug --target matlab_binding_OutputSBML
- name: Run Test
uses: matlab-actions/run-command@v2
with:
command: cd('../build/src/bindings/matlab/test'); runTests