Skip to content

Set MATLAB_ADDITIONAL_VERSIONS variable #354

Set MATLAB_ADDITIONAL_VERSIONS variable

Set MATLAB_ADDITIONAL_VERSIONS variable #354

Workflow file for this run

name: "libmexclass"
on: [push]
jobs:
windows:
runs-on: windows-latest
env:
LIBMEXCLASS_INSTALL_PREFIX: ${{ vars.RUNNER_TEMP }}/install
# Use the commit SHA that triggered the workflow to run the example on latest changes.
LIBMEXCLASS_GIT_TAG: ${{ vars.GITHUB_SHA }}
steps:
- name: Download libmexclass source code
uses: actions/checkout@v3
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2023b
- name: Build Example
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cd example
echo "LIBMEXCLASS_INSTALL_PREFIX= ${{ env.LIBMEXCLASS_GIT_TAG }}"
cmake -S . -B build -G Ninja -D CMAKE_INSTALL_PREFIX=${{ env.LIBMEXCLASS_INSTALL_PREFIX }} -D LIBMEXCLASS_FETCH_CONTENT_GIT_TAG=${{ github.sha }}
cmake --build build --config Release --target install
- name: Run Example
uses: matlab-actions/run-command@v1
with:
command: addpath(fullfile("${{ env.LIBMEXCLASS_INSTALL_PREFIX }}")), addpath(fullfile("example", "matlab")), c = example.Car("A", "B", "C")