ci: latest matlab actions #32
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: matlab | |
env: | |
CTEST_NO_TESTS_ACTION: error | |
on: | |
push: | |
paths: | |
- "**.m" | |
- "**.cmake" | |
- "**/CMakeLists.txt" | |
- ".github/workflows/ci.yml" | |
# Engine can't start on CI runner Linux, but works on real Linux computer | |
jobs: | |
unix: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
matlab: [R2023a, R2023b] | |
include: | |
- os: macos-latest | |
matlab: R2023b | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install MATLAB | |
timeout-minutes: 10 | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
release: ${{ matrix.matlab }} | |
- uses: actions/checkout@v4 | |
- name: CMake Linux config | |
if: runner.os == 'Linux' | |
run: cmake -Bbuild -Dfortran=yes | |
env: | |
CC: gcc-10 | |
CXX: g++-10 | |
FC: gfortran-10 | |
- name: CMake macOS | |
if: runner.os == 'macOS' | |
run: cmake -Bbuild -Dfortran=no | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
run: ctest --test-dir build -LE engine -V | |
msvc: | |
strategy: | |
matrix: | |
matlab: [R2023a] | |
# R2023b didn't work with MSVC on GitHub Actions in Sept 2023. | |
runs-on: windows-latest | |
steps: | |
- name: Install MATLAB | |
timeout-minutes: 10 | |
uses: matlab-actions/setup-matlab@v2 | |
with: | |
release: ${{ matrix.matlab }} | |
- uses: actions/checkout@v4 | |
- name: CMake workflow | |
run: cmake -Bbuild -Dfortran=no | |
- name: Build | |
run: cmake --build build --config Release | |
- name: Test | |
run: ctest --test-dir build -C Release -LE engine -V |