Skip to content

Commit

Permalink
Merge pull request #15 from byuflowlab/taylormcd-patch-1
Browse files Browse the repository at this point in the history
Update compatibility limitations for newer versions of Julia and MATLAB
  • Loading branch information
taylormcd authored Nov 30, 2022
2 parents c088dd1 + a6bbaf9 commit bd79ef6
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 22 deletions.
34 changes: 25 additions & 9 deletions .github/workflows/test.yaml → .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,39 @@
name: Run tests

on: [push, pull_request]

name: CI
on:
push:
branches:
- master
tags: '*'
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: MATLAB ${{ matrix.matlab-version }} - Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version: ['1.5']
julia-arch: [x64]
os: [ubuntu-latest]

matlab-version:
- 'R2021b'
julia-version:
- '1.6'
os:
- ubuntu-latest
arch:
- x64
steps:
- name: Install csh
run: sudo apt-get install -y csh
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: ${{ matrix.matlab-version }}
- name: Set up Julia
uses: julia-actions/setup-julia@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
[compat]
MATLAB = "0.8"
Reexport = "1"
julia = "~1.5, 1.7"
julia = "1.5"
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

## Prerequisites

| :exclamation: This package cannot be used with MATLAB 2022a/2022b because these versions are currently incompatible with [MATLAB.jl](https://github.com/JuliaInterop/MATLAB.jl). |
|-----------------------------------------|

| :exclamation: This package supports Julia 1.6, but does not currently support Julia 1.8. |
|-----------------------------------------|

`Mex.jl` requires MATLAB and Julia along with a C++ compiler configured to work with MATLAB's `mex` command, the last is required for building the `mexjulia` MEX function. You can check that a compiler is properly configured by executing:

```
Expand All @@ -16,8 +22,6 @@

from the MATLAB command prompt.

***NOTE:** This project currently only supports Julia 1.5. Support for Julia 1.6 and greater will be possible when the changes resulting from https://github.com/JuliaLang/julia/issues/42411 are incorporated into the latest stable release of Julia.*

## Installation

First ensure that the [MATLAB.jl](https://github.com/JuliaInterop/MATLAB.jl) Julia package can be properly installed.
Expand Down
20 changes: 10 additions & 10 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function matlab_escape(str)
end

function libDir()
return if isDebug()
return if isDebug() != 0
dirname(abspath(Libdl.dlpath("libjulia-debug")))
else
dirname(abspath(Libdl.dlpath("libjulia")))
Expand All @@ -29,22 +29,14 @@ function includeDir()
return abspath(Sys.BINDIR, Base.INCLUDEDIR, "julia")
end

function cflags()
fl = "-I $(shell_escape(includeDir()))"
if Sys.isunix()
fl = fl * " -fPIC"
end
return fl
end

function ldflags()
fl = "-L$(shell_escape(libDir()))"
if Sys.isunix()
fl = fl * " -Wl,-rpath $(shell_escape(libDir()))"
end
return fl
end

function ldlibs()
libname = if isDebug()
"julia-debug"
Expand All @@ -57,6 +49,14 @@ function ldlibs()
return "\'$(normpath(joinpath(libDir(), "..", "lib", "lib$libname.dll.a")))\'"
end
end

function cflags()
fl = "-I $(shell_escape(includeDir()))"
if Sys.isunix()
fl = fl * " -fPIC"
end
return fl
end

# the following two functions are taken from the MATLAB.jl build script and are used to
# locate MATLAB and its relevant libraries and commands
Expand Down

0 comments on commit bd79ef6

Please sign in to comment.