diff --git a/.github/workflows/runtests.yml b/.github/workflows/runtests.yml index 8c25d8dd..1d0925b9 100644 --- a/.github/workflows/runtests.yml +++ b/.github/workflows/runtests.yml @@ -27,10 +27,23 @@ jobs: julia-version: - '~1.6.0-0' - '~1.8.0-0' - - '~1.9.0-0' - '~1.10.0-0' - - 'nightly' os: ['ubuntu-latest'] + cxxwrap: [ '' ] + include: + - cxxwrap: '0.13.4' + os: ubuntu-latest + julia-version: 1.9 + - cxxwrap: '0.14.0' + os: ubuntu-latest + julia-version: 1.9 + - cxxwrap: '0.13.4' + os: ubuntu-latest + julia-version: nightly + - cxxwrap: '0.14.0' + os: ubuntu-latest + julia-version: nightly + fail-fast: false # Service containers to run services: @@ -54,6 +67,9 @@ jobs: uses: julia-actions/setup-julia@v1 with: version: ${{ matrix.julia-version }} + - name: "pin CxxWrap" + if: matrix.cxxwrap != '' + run: julia --project -e 'using Pkg; pkg"add CxxWrap@${{ matrix.cxxwrap }}"; pkg"pin CxxWrap";' - name: "Fill polyDB container" run: | wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add - diff --git a/Project.toml b/Project.toml index 2f50a8dd..9835b834 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Polymake" uuid = "d720cf60-89b5-51f5-aff5-213f193123e7" repo = "https://github.com/oscar-system/Polymake.jl.git" -version = "0.11.4" +version = "0.11.5" [deps] BinaryWrappers = "f01c122e-0ea1-4f85-ad8f-907073ad7a9f" @@ -24,7 +24,7 @@ polymake_oscarnumber_jll = "10f31823-b687-53e6-9f29-edb9d4da9f9f" [compat] BinaryWrappers = "~0.1.0" -CxxWrap = "~0.10.1, ~0.11, ~0.12, ~0.13.1" +CxxWrap = "~0.10.1, ~0.11, ~0.12, ~0.13.1, ~0.14" JSON = "^0.20, ^0.21" Mongoc = "~0.6.0, ~0.7.0, ~0.8.0, ~0.9.0" Ninja_jll = "^1.11.1" diff --git a/src/Polymake.jl b/src/Polymake.jl index 0670fd0c..841c1a88 100644 --- a/src/Polymake.jl +++ b/src/Polymake.jl @@ -96,8 +96,13 @@ module LibPolymake using polymake_jll using libpolymake_julia_jll using polymake_oscarnumber_jll + import ..Polymake: libcxxwrap_build_version - @wrapmodule(joinpath(libpolymake_julia), :define_module_polymake) + if libcxxwrap_build_version() >= v"0.11.0" + @wrapmodule(() -> joinpath(libpolymake_julia), :define_module_polymake) + else + @wrapmodule(joinpath(libpolymake_julia), :define_module_polymake) + end function __init__() @@ -135,8 +140,13 @@ module LibOscarNumber using polymake_oscarnumber_jll import ..LibPolymake: show_small_obj + import ..Polymake: libcxxwrap_build_version - @wrapmodule(joinpath(libpolymake_oscarnumber), :define_module_polymake_oscarnumber) + if libcxxwrap_build_version() >= v"0.11.0" + @wrapmodule(() -> joinpath(libpolymake_oscarnumber), :define_module_polymake_oscarnumber) + else + @wrapmodule(joinpath(libpolymake_oscarnumber), :define_module_polymake_oscarnumber) + end function __init__() diff --git a/src/call_function.jl b/src/call_function.jl index 5ff903ac..28d489e0 100644 --- a/src/call_function.jl +++ b/src/call_function.jl @@ -1,7 +1,3 @@ -function CxxWrap.StdVector{CxxWrap.StdString}(vec::AbstractVector{<:AbstractString}) - return CxxWrap.StdVector(convert.(CxxWrap.StdString, vec)) -end - """ call_function([::Type{PropertyValue},] app::Symbol, func::Symbol, args...; template_parameters=String[], kwargs...) @@ -16,7 +12,8 @@ function call_function(::Type{PropertyValue}, app::Symbol, func::Symbol, args... calltype::Symbol=:scalar, kwargs...) fname = Meta.pm_name_qualified(app, func) cargs = Meta.polymake_arguments(args...; kwargs...) - templ = CxxWrap.StdVector{CxxWrap.StdString}(template_parameters) + templ = CxxWrap.StdVector{CxxWrap.StdString}() + append!(templ, StdString.(template_parameters)) return disable_sigint() do if calltype == :void internal_call_function_void(fname, templ, cargs)