diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 91a9d9b..31620bc 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -22,6 +22,9 @@ jobs: julia-arch: [x64] os: [ubuntu-latest, windows-latest] experimental: [false] + include: + - os: windows-latest + julia-arch: x86 steps: # Checks-out your repository diff --git a/src/FMI2/int.jl b/src/FMI2/int.jl index 444914b..d1815cd 100644 --- a/src/FMI2/int.jl +++ b/src/FMI2/int.jl @@ -71,11 +71,14 @@ function fmi2Instantiate!(fmu::FMU2; ptrLogger = @cfunction(fmi2CallbackLogger, Cvoid, (Ptr{FMU2ComponentEnvironment}, Ptr{Cchar}, Cuint, Ptr{Cchar}, Ptr{Cchar})) if externalCallbacks if fmu.callbackLibHandle == C_NULL - @assert Sys.WORD_SIZE == 64 "`externalCallbacks=true` is only supported for 64-bit." - + @assert Sys.WORD_SIZE == 64 || (Sys.iswindows() && Sys.WORD_SIZE == 32) "`externalCallbacks=true` is only supported for 64-bit and 32-Bit Windows" cbLibPath = CB_LIB_PATH if Sys.iswindows() - cbLibPath = joinpath(cbLibPath, "win64", "callbackFunctions.dll") + if Sys.WORD_SIZE == 64 + cbLibPath = joinpath(cbLibPath, "win64", "callbackFunctions.dll") + else + cbLibPath = joinpath(cbLibPath, "win32", "callbackFunctions.dll") + end elseif Sys.islinux() cbLibPath = joinpath(cbLibPath, "linux64", "libcallbackFunctions.so") elseif Sys.isapple()