-
Notifications
You must be signed in to change notification settings - Fork 45
72 lines (63 loc) · 2 KB
/
run_octave_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
name: Run the Octave tests
on: [pull_request]
env:
BUILD_FOLDER: build
EXAMPLES_FOLDER: examples
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/ezc3d
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Setup environment
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
- name: Print mamba info
run: |
mamba info
mamba list
- name: Install dependencies
run: |
mamba install cmake git pkgconfig octave -cconda-forge
mamba list
git submodule update --init --recursive
- name: Build ezc3d
run: |
MAIN_FOLDER=`pwd`
cd
HOME=`pwd`
cd $MAIN_FOLDER
CONDA_ENV_PATH=$CONDA/envs/ezc3d
mkdir -p $MAIN_FOLDER/$BUILD_FOLDER
cd $MAIN_FOLDER/$BUILD_FOLDER
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DUSE_MATRIX_FAST_ACCESSOR=OFF -DBINDER_OCTAVE=ON -DOctave_ezc3d_INSTALL_DIR=$HOME -DBINDER_PYTHON3=OFF ..
make install -j${{ steps.cpu-cores.outputs.count }}
cd $MAIN_FOLDER
- name: Run the Octave binder tests
run: |
MAIN_FOLDER=`pwd`
cd
HOME=`pwd`
cd $MAIN_FOLDER/test/matlab
cp $HOME/ezc3d_octave/* .
octave test_binder_matlab.m
octave test_binder_matlab_force_platform.m
cd $MAIN_FOLDER