Skip to content

Update Makefile 3

Update Makefile 3 #36

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