Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test matlab gh actions CI #189

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ jobs:
- x64
steps:
- uses: actions/checkout@v2
- name: Install csh
run: sudo apt-get install csh
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v0
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
Expand Down
3 changes: 1 addition & 2 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ if !isnothing(matlab_root)
println(io, "const matlab_cmd = \"$(escape_string(matlab_cmd))\"")
println(io, "const libmx_size = $libmx_size")
end
elseif get(ENV, "JULIA_REGISTRYCI_AUTOMERGE", nothing) == "true" || get(ENV, "CI", nothing) == "true"
elseif get(ENV, "JULIA_REGISTRYCI_AUTOMERGE", nothing) == "true"
# We need to be able to install and load this package without error for
# Julia's registry AutoMerge to work, so we just use dummy values.
# Similarly we want to also be able to install and load this package for CI.
matlab_libpath = ""
matlab_cmd = ""
libmx_size = 0
Expand Down
4 changes: 3 additions & 1 deletion src/engine.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ mutable struct MSession
if Sys.iswindows()
assign_persistent_msession()
end
ep = ccall(eng_open[], Ptr{Cvoid}, (Ptr{UInt8},), startcmd(flags))
ep = ccall(eng_open[], Ptr{Cvoid}, (Ptr{UInt8},), C_NULL)
if ep == C_NULL
@show eng_open[]
@show matlab_libpath
@warn("Confirm MATLAB is installed and discoverable.", maxlog=1)
if Sys.iswindows()
@warn("Ensure `matlab -regserver` has been run in a Command Prompt as Administrator.", maxlog=1)
Expand Down
4 changes: 0 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using MATLAB
using Test

is_ci() = get(ENV, "CI", nothing) == "true"

if !is_ci() # only test if not CI
include("engine.jl")
include("matfile.jl")
include("matstr.jl")
include("mxarray.jl")
end