Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ jobs:
version: '1.10'
lib_subdir: 'x86_64-linux-gnu'
shim_ext: '.so'
- os: macos-latest
version: '1.10'
lib_subdir: 'aarch64-apple-darwin'
shim_ext: '.dylib'
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -58,13 +54,6 @@ jobs:
run: |
gcc -shared -fPIC -o lib/ext/shared/${{ matrix.lib_subdir }}/libModelicaCallbacks.so src/modelica_callbacks.c -ldl

- name: Build ModelicaCallbacks shim (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
mkdir -p lib/ext/shared/${{ matrix.lib_subdir }}
cc -dynamiclib -fPIC -o lib/ext/shared/${{ matrix.lib_subdir }}/libModelicaCallbacks.dylib src/modelica_callbacks.c -ldl

- name: Build ModelicaCallbacks shim (Windows)
if: runner.os == 'Windows'
shell: bash
Expand All @@ -88,16 +77,6 @@ jobs:
Pkg.test()
'

- name: Run tests (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
export DYLD_LIBRARY_PATH="$(pwd)/lib/ext/shared/${{ matrix.lib_subdir }}:${DYLD_LIBRARY_PATH}"
julia --color=yes --project -e '
import Pkg
Pkg.test()
'

- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: bash
Expand Down
19 changes: 19 additions & 0 deletions src/api.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1150,3 +1150,22 @@ function ModelicaStreams_closeFile(fileName::String)
rc != 0 && error("ModelicaStreams_closeFile failed: ", get_modelica_error())
return nothing
end

function ModelicaError(msg::Cstring)
error("Modelica runtime error: " * unsafe_string(msg))
end

function ModelicaError(msg::String)
error("Modelica runtime error: " * msg)
end

function ModelicaFFT_kiss_fftr(nfft::Cint, timeIn::Ptr{Cdouble}, nTime::Csize_t,
f_re::Ptr{Cdouble}, f_im::Ptr{Cdouble}, nf::Csize_t)
error("ModelicaFFT_kiss_fftr: FFT support not compiled into this build")
end

function ModelicaRandom_xorshift1024star(state_in::Ptr{Cint}, nState_in::Csize_t,
state_out::Ptr{Cint}, nState_out::Csize_t,
result::Ptr{Cdouble})
error("ModelicaRandom_xorshift1024star: random support not compiled into this build")
end
Loading