From e3674863b9033173508a1ee3ccbc1ae54a2962de Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 14:47:12 -0700 Subject: [PATCH 01/16] Update Project.toml --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 5e8c59c38646f13597277762d9b019e72e4c23f2 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 14:50:04 -0700 Subject: [PATCH 02/16] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 18589c1..db1c6a0 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,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. From f3a8baf814e71e1e1f80445b2f73d391addaac8f Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 14:51:53 -0700 Subject: [PATCH 03/16] Test later Julia versions --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f0c304a..97746ac 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - julia-version: ['1.5'] + julia-version: ['1.6','1'] julia-arch: [x64] os: [ubuntu-latest] From 8d53740c3c89e1222d74d3be74ef3fcc0a96db1d Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:00:02 -0700 Subject: [PATCH 04/16] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 97746ac..782bde0 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,7 +15,7 @@ jobs: - 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 - name: Set up Julia From 6e3f10c72069b02439acba0ae0add05b675647ed Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:03:54 -0700 Subject: [PATCH 05/16] Add MATLAB version --- .github/workflows/test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 782bde0..77e1c73 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,6 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: + matlab-version: R2021b julia-version: ['1.6','1'] julia-arch: [x64] os: [ubuntu-latest] @@ -18,6 +19,8 @@ jobs: uses: actions/checkout@v3 - name: Set up MATLAB uses: matlab-actions/setup-matlab@v1 + with: + version: ${{ matrix.matlab-version }} - name: Set up Julia uses: julia-actions/setup-julia@v1 with: From 6d49c27b74e4bfe23090d66f399d98d46ef7ca70 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:05:39 -0700 Subject: [PATCH 06/16] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 77e1c73..6a3f14c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - matlab-version: R2021b + matlab-version: ['R2021b'] julia-version: ['1.6','1'] julia-arch: [x64] os: [ubuntu-latest] From ad186fc3b091817cd5d508ff915b9dbc66b1c476 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:11:34 -0700 Subject: [PATCH 07/16] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6a3f14c..07cf8cc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: matlab-version: ['R2021b'] - julia-version: ['1.6','1'] + julia-version: ['1.5'] julia-arch: [x64] os: [ubuntu-latest] From 023f6a3ff0e1a3f51d3040260d85119c8f15ff01 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:21:52 -0700 Subject: [PATCH 08/16] Adjust Matlab release --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 07cf8cc..9a76eca 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: - name: Set up MATLAB uses: matlab-actions/setup-matlab@v1 with: - version: ${{ matrix.matlab-version }} + release: ${{ matrix.matlab-version }} - name: Set up Julia uses: julia-actions/setup-julia@v1 with: From e163c1d658ed0987457da662f30def7112deb703 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:35:16 -0700 Subject: [PATCH 09/16] Update and rename test.yaml to CI.yaml --- .github/workflows/{test.yaml => CI.yaml} | 32 +++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) rename .github/workflows/{test.yaml => CI.yaml} (59%) diff --git a/.github/workflows/test.yaml b/.github/workflows/CI.yaml similarity index 59% rename from .github/workflows/test.yaml rename to .github/workflows/CI.yaml index 9a76eca..6371784 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/CI.yaml @@ -1,17 +1,31 @@ -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: - matlab-version: ['R2021b'] - julia-version: ['1.5'] - julia-arch: [x64] - os: [ubuntu-latest] - + matlab-version: + - 'R2021b' + julia-version: + - '1.6' + - '1' + os: + - ubuntu-latest + arch: + - x64 steps: - name: Install csh run: sudo apt-get install -y csh From 287d6f268976873656288b6a9b539a3ba9b511f3 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 15:58:34 -0700 Subject: [PATCH 10/16] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index db1c6a0..c5671a4 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ ## 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). | +|-----------------------------------------| + `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: ``` From 0ab699af75aaf05f7a16319c7f7c655abf98ec7f Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 16:36:41 -0700 Subject: [PATCH 11/16] Update build.jl --- deps/build.jl | 55 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index f6909f8..fefd573 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,22 +29,37 @@ 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 ldflags() fl = "-L$(shell_escape(libDir()))" - if Sys.isunix() - fl = fl * " -Wl,-rpath $(shell_escape(libDir()))" + if Sys.iswindows() + fl = fl * " -Wl,--stack,8388608" + elseif !Sys.isapple() + fl = fl * " -Wl,--export-dynamic" end return fl -end - +end + +# function ldlibs() +# libname = if isDebug() +# "julia-debug" +# else +# "julia" +# end +# if Sys.isunix() +# return "-l$libname -ldl" +# else +# return "\'$(normpath(joinpath(libDir(), "..", "lib", "lib$libname.dll.a")))\'" +# end +# end + function ldlibs() libname = if isDebug() "julia-debug" @@ -52,10 +67,20 @@ function ldlibs() "julia" end if Sys.isunix() - return "-l$libname -ldl" + return "-Wl,-rpath,$(shell_escape(libDir())) " * + (Sys.isapple() ? string() : "-Wl,-rpath,$(shell_escape(private_libDir())) ") * + "-l$libname" else - return "\'$(normpath(joinpath(libDir(), "..", "lib", "lib$libname.dll.a")))\'" + return "-l$libname -lopenlibm" 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 From a51e34c39eebfd461a4443c6bc998017c428abda Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 16:42:32 -0700 Subject: [PATCH 12/16] Update build.jl --- deps/build.jl | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index fefd573..37d5be3 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -29,36 +29,13 @@ function includeDir() return abspath(Sys.BINDIR, Base.INCLUDEDIR, "julia") end -# function ldflags() -# fl = "-L$(shell_escape(libDir()))" -# if Sys.isunix() -# fl = fl * " -Wl,-rpath $(shell_escape(libDir()))" -# end -# return fl -# end - function ldflags() fl = "-L$(shell_escape(libDir()))" - if Sys.iswindows() - fl = fl * " -Wl,--stack,8388608" - elseif !Sys.isapple() - fl = fl * " -Wl,--export-dynamic" + if Sys.isunix() + fl = fl * " -Wl,-rpath $(shell_escape(libDir()))" end return fl -end - -# function ldlibs() -# libname = if isDebug() -# "julia-debug" -# else -# "julia" -# end -# if Sys.isunix() -# return "-l$libname -ldl" -# else -# return "\'$(normpath(joinpath(libDir(), "..", "lib", "lib$libname.dll.a")))\'" -# end -# end +end function ldlibs() libname = if isDebug() @@ -67,13 +44,11 @@ function ldlibs() "julia" end if Sys.isunix() - return "-Wl,-rpath,$(shell_escape(libDir())) " * - (Sys.isapple() ? string() : "-Wl,-rpath,$(shell_escape(private_libDir())) ") * - "-l$libname" + return "-l$libname -ldl" else - return "-l$libname -lopenlibm" + return "\'$(normpath(joinpath(libDir(), "..", "lib", "lib$libname.dll.a")))\'" end -end +end function cflags() fl = "-I $(shell_escape(includeDir()))" From 92975a6e7b2cf37b9e870bbc94f3be45bc2ef82a Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 16:56:19 -0700 Subject: [PATCH 13/16] Update CI.yaml --- .github/workflows/CI.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 6371784..582703c 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -21,7 +21,6 @@ jobs: - 'R2021b' julia-version: - '1.6' - - '1' os: - ubuntu-latest arch: From dc3bf5542f34ac9dab0e1502383304d2aff27744 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 16:59:24 -0700 Subject: [PATCH 14/16] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c5671a4..7b5626c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ from the MATLAB command prompt. +***NOTE:** This project does not currently support Julia 1.8. There currently appears to be an error when loading this package in Julia. + ## Installation First ensure that the [MATLAB.jl](https://github.com/JuliaInterop/MATLAB.jl) Julia package can be properly installed. From 074e83d0091bc458681e908d64b028dbef403566 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 17:02:17 -0700 Subject: [PATCH 15/16] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7b5626c..361def0 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,9 @@ | :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 project does not currently support Julia 1.8. We therefore recommend using Julia 1.6. | +|-----------------------------------------| + `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: ``` @@ -19,8 +22,6 @@ from the MATLAB command prompt. -***NOTE:** This project does not currently support Julia 1.8. There currently appears to be an error when loading this package in Julia. - ## Installation First ensure that the [MATLAB.jl](https://github.com/JuliaInterop/MATLAB.jl) Julia package can be properly installed. From a6bbaf9132a3e9eac66fda28a99caf47c68154c4 Mon Sep 17 00:00:00 2001 From: Taylor McDonnell Date: Tue, 29 Nov 2022 17:04:44 -0700 Subject: [PATCH 16/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 361def0..c379794 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ | :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 project does not currently support Julia 1.8. We therefore recommend using Julia 1.6. | +| :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: