-
Notifications
You must be signed in to change notification settings - Fork 13
90 lines (67 loc) · 2.63 KB
/
matlab_package.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
name: Building Matlab MEX files
on: [push]
jobs:
build-win:
runs-on: [self-hosted, Windows]
steps:
- uses: actions/checkout@v4
- name: Test shell
shell: cmd /C CALL {0}
working-directory: ${{ github.workspace }}
run: dir
- name: Start shell and run make
shell: cmd /C CALL {0}
working-directory: ${{ github.workspace }}
run: >-
make USE_CUDA=0 USE_CVODE=0 USE_MATLAB=1 CVODE_ROOT=/usr/local/sundials-4.1.0/instdir MATLAB_INCLUDE=/usr/local/MATLAB/R2021b/extern/include MKL_ROOT=/opt/intel/oneapi/mkl/latest
- run: echo "Workflow done"
build-linux:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
- name: Set up Conda with Python 3.12
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: magtense-env
environment-file: python/environment_linux.yml
python-version: 3.12
auto-activate-base: false
- name: Printenv
run: printenv
- name: Dir list2
run: ls -l ${CONDA_PREFIX}/lib
- name: Pwd1
run: cd ${CONDA_PREFIX}
- name: Pwd2
run: pwd
- name: Pwd3
run: pwd ${CONDA_PREFIX}
- name: Which1
run: which ifx
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2023b
- name: Dir list
run: ls -l /opt/hostedtoolcache/MATLAB/2023.2.999/x64
- name: Which2
run: ls -l /usr/share/miniconda/envs/magtense-env
- name: Which3
run: ls -l /usr/share/miniconda/envs/magtense-env/lib
- name: Compile Fortran source code and build Python wrapper
working-directory: ${{ github.workspace }}
run: make USE_CUDA=0 USE_CVODE=0 USE_MATLAB=1 MATLAB_INCLUDE=/opt/hostedtoolcache/MATLAB/2023.2.999/x64/extern/include MKL_ROOT=/usr/share/miniconda/envs/magtense-env
#- name: Compile Fortran source code and build Python wrapper
#working-directory: ${{ github.workspace }}/python/src/magtense/lib/
#run: make ps USE_MATLAB=1 MATLAB_INCLUDE=/opt/hostedtoolcache/MATLAB/2023.2.999/x64/extern/include
- name: Which5
run: export LD_LIBRARY_PATH=/usr/share/miniconda/envs/magtense-env/lib:$LD_LIBRARY_PATH
- name: Run script
uses: matlab-actions/run-command@v2
with:
command: dir; pwd; cd('matlab'); buildMagTenseMEX(1, 0, 0); dir; dir('MEX_files'); cd('examples/Micromagnetism/mumag_micromag_Std_problem_4'); [~,~,~,~,~,~,int_error] = Standard_problem_4('USE_CUDA',false); disp(int_error);
- name: Which4
run: ls -l matlab/MEX_files