diff --git a/.github/workflows/test.yaml b/.github/workflows/CI.yaml similarity index 54% rename from .github/workflows/test.yaml rename to .github/workflows/CI.yaml index f0c304a..582703c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/CI.yaml @@ -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: diff --git a/Project.toml b/Project.toml index b5f698c..68fbd16 100644 --- a/Project.toml +++ b/Project.toml @@ -11,4 +11,4 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69" [compat] MATLAB = "0.8" Reexport = "1" -julia = "~1.5, 1.7" +julia = "1.5" diff --git a/README.md b/README.md index 18589c1..c379794 100644 --- a/README.md +++ b/README.md @@ -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: ``` @@ -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. diff --git a/deps/build.jl b/deps/build.jl index dcd65cf..3e6d9a0 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -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"))) @@ -29,14 +29,6 @@ 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() @@ -44,7 +36,7 @@ function ldflags() end return fl end - + function ldlibs() libname = if isDebug() "julia-debug" @@ -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