-
-
Notifications
You must be signed in to change notification settings - Fork 20
57 lines (49 loc) · 1.64 KB
/
matlab.yaml
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
name: matlab
on:
push:
pull_request:
branches:
- main
workflow_call:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
required: false
default: false
jobs:
Matlab-Unit-Tests:
runs-on: ${{ matrix.os }}
env:
TEST_ECAT_PATH: ${{ github.workspace }}/ecat_validation/synthetic_ecat_integer.v.gz
MATLAB_CODE_PATH: ${{ github.workspace }}/matlab/
METADATA_PATH: ${{ github.workspace }}/metadata/
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Debug
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
timeout-minutes: 15
with:
limit-access-to-actor: true
# matlab not supported on MacOS!! at this time
- name: Perform setup-matlab
uses: matlab-actions/setup-matlab@v1
if: matrix.os == 'ubuntu-latest'
# Again only running this on ubuntu
- name: Add Matlab Code Folder to Path and Run Tests
uses: matlab-actions/run-command@v1
with:
command: |
addpath('${{ env.MATLAB_CODE_PATH }}');
addpath('${{ env.MATLAB_CODE_PATH }}/unit_tests');
addpath('${{ env.MATLAB_CODE_PATH }}/template_txt');
addpath('${{ env.TEST_ECAT_PATH }}');
addpath('${{ env.METADATA_PATH }}');
ecat2nii_test
if: matrix.os == 'ubuntu-latest'