Skip to content

Release MATFrost MEX binary. #6

Release MATFrost MEX binary.

Release MATFrost MEX binary. #6

name: "Release MATFrost MEX binary."
on:
workflow_dispatch:
jobs:
build-mex-binary:
strategy:
matrix:
matlab-version: ['2021b', '2022a', '2022b', '2023a', '2023b'] #, '2024a']
runs-on: windows-latest
name: windows-R${{ matrix.matlab-version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up MATLAB on Windows
uses: matlab-actions/setup-matlab@v2
with:
release: R${{ matrix.matlab-version }}
# cache: true
products: >
${{ contains(matrix.matlab-version, '2024') && 'MATLAB_Support_for_MinGW-w64_C/C++/Fortran_Compiler' || 'MATLAB_Support_for_MinGW-w64_C/C++_Compiler' }}
- name: Compile MEX binary
uses: matlab-actions/run-command@v2
with:
command: addpath("src/matfrostjuliacall"), matfrostmake("matfrostjuliacall_r${{ matrix.matlab-version }}")
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
path: src/matfrostjuliacall/bin
name: matfrost-mex-win-r${{ matrix.matlab-version }}-x64
release-mex-binary:
needs: build-mex-binary
runs-on: ubuntu-latest
name: Release-MEX-Binary
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download MEX artifacts
uses: actions/download-artifact@v4
with:
path: mexbinwin
merge-multiple: true
- name: Display structure of downloade MEX binaries.
run: ls -R mexbinwin
- name: Upload MEX binaries
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tar -czvf mexbinwin.tar.gz mexbinwin
gh release create testmex mexbinwin.tar.gz