Use ninja build. #352
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
run: | | |
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") |