-
Notifications
You must be signed in to change notification settings - Fork 73
148 lines (142 loc) · 6.14 KB
/
run_test.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
name: Iso2Mesh CI
on: [push, pull_request]
jobs:
octave_test:
name: Octave tests
strategy:
# provided octave versions: ubuntu-20.04 = 5.2, ubuntu-22.04 = 6.4, macos-13/14 = 9.2, windows-2019 = 5.2
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-13, macos-14, windows-2019]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install dependencies
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update && sudo apt-get install -y octave cmake libcgal-dev libsuperlu-dev libsuitesparse-dev libgmp-dev libtbb-dev octave-image
elif [[ "$RUNNER_OS" == "macOS" ]]; then
brew install gnuplot
brew install octave
else
curl --retry 3 -kL http://cdimage.debian.org/mirror/gnu.org/gnu/octave/windows/octave-4.4.0-w64.7z --output octave_4.4.0.7z
7z x octave_4.4.0.7z -ooctave -y
echo "$PWD/octave/octave-4.4.0-w64-64/mingw64/bin" >> $GITHUB_PATH
fi
- name: Install octave-image (Windows and MacOS)
if: ${{ runner.os != 'Linux' }}
run: octave-cli --eval "pkg install -forge image"
- name: Test linux32 binaries
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: rm -rf bin/*.mexa64
- name: Run Octave unit tests
run: octave-cli --eval "addpath(pwd);cd test; tic; run_iso2mesh_test; toc"
- name: Run Octave test - demo_vol2mesh_ex1
run: |
octave-cli --version
octave-cli --eval 'available_graphics_toolkits(); graphics_toolkit()'
octave-cli --eval "addpath(pwd);cd sample; tic; demo_vol2mesh_ex1; toc"
- name: Run Octave test - demo_vol2mesh_ex1b
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_vol2mesh_ex1b; toc"
- name: Run Octave test - demo_vol2mesh_ex1c
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_vol2mesh_ex1c; toc"
- name: Run Octave test - demo_vol2mesh_ex2
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_vol2mesh_ex2; toc"
- name: Run Octave test - demo_surf2mesh_ex1
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_surf2mesh_ex1; toc"
- name: Run Octave test - demo_directplc_ex1
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_directplc_ex1; toc"
- name: Run Octave test - demo_grayscale_ex1
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_grayscale_ex1; toc"
- name: Run Octave test - demo_shortcut_ex1
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_shortcut_ex1; toc"
- name: Run Octave test - demo_surf2vol_ex1
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_surf2vol_ex1; toc"
- name: Run Octave test - demo_label_sizing
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_label_sizing; toc"
- name: Run Octave test - demo_qmeshcut_ex1
run: octave-cli --eval "addpath(pwd);cd sample; tic; demo_qmeshcut_ex1; toc"
- name: Rebuild binaries
if: ${{ runner.os == 'Linux' }} # use these variables to limit a step only on a specific OS
run: |
cd tools
make
ls -lt ../bin/*
matlab_test:
name: MATLAB test
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-24.04, macos-12, windows-2019, windows-2022]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2022a
- name: Test linux32 binaries
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: rm -rf bin/*.mexa64
- name: Test win32 binaries
if: ${{ matrix.os == 'windows-2019' }}
run: rm -rf bin/*x86-64.exe
- name: Run MATLAB unit tests
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd test; tic; run_iso2mesh_test; toc
- name: Run MATLAB test - demo_vol2mesh_ex1
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_vol2mesh_ex1; toc
- name: Run MATLAB test - demo_vol2mesh_ex1b
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_vol2mesh_ex1b; toc
- name: Run MATLAB test - demo_vol2mesh_ex1c
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_vol2mesh_ex1c; toc
- name: Run MATLAB test - demo_vol2mesh_ex2
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_vol2mesh_ex2; toc
- name: Run MATLAB test - demo_surf2mesh_ex1
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_surf2mesh_ex1; toc
- name: Run MATLAB test - demo_directplc_ex1
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_directplc_ex1; toc
- name: Run MATLAB test - demo_grayscale_ex1
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_grayscale_ex1; toc
- name: Run MATLAB test - demo_surf2vol_ex1 (Linux only)
if: ${{ runner.os == 'Linux' }}
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_surf2vol_ex1; toc
- name: Run MATLAB test - demo_shortcut_ex1
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_shortcut_ex1; toc
- name: Run MATLAB test - demo_label_sizing
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_label_sizing; toc
- name: Run MATLAB test - demo_qmeshcut_ex1
uses: matlab-actions/run-command@v1
with:
command: addpath(pwd);cd sample; tic; demo_qmeshcut_ex1; toc