Skip to content

Commit

Permalink
ci: add matlab
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Dec 19, 2024
1 parent 517b7de commit d5a9c64
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
52 changes: 52 additions & 0 deletions .github/workflows/ci-matlab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: matlab

env:
CTEST_NO_TESTS_ACTION: error
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 0

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-22.04]
matlab: [R2024b]

runs-on: ${{ matrix.os }}

env:
CC: gcc-10
CXX: g++-10
FC: gfortran-10

steps:

- name: Install MATLAB
timeout-minutes: 10
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.matlab }}

- uses: actions/checkout@v4

- name: Lint task
uses: matlab-actions/run-build@v2
with:
tasks: check

- name: Test task
uses: matlab-actions/run-build@v2
with:
tasks: test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
msis00_driver

*.m~
*.svg
bin/
Expand Down
1 change: 0 additions & 1 deletion buildfile.m
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
function plan = buildfile
plan = buildplan(localfunctions);
plan.DefaultTasks = "test";
plan("test").Dependencies = "check";
end

function checkTask(~)
Expand Down

0 comments on commit d5a9c64

Please sign in to comment.