Skip to content

Commit

Permalink
Merge pull request #455 from oscar-system/bl/cxxwrap014
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz authored Sep 7, 2023
2 parents 6a8e38c + bb8875e commit 19769aa
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 -
Expand Down
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand Down
14 changes: 12 additions & 2 deletions src/Polymake.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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__()

Expand Down Expand Up @@ -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__()

Expand Down
7 changes: 2 additions & 5 deletions src/call_function.jl
Original file line number Diff line number Diff line change
@@ -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...)
Expand All @@ -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)
Expand Down

2 comments on commit 19769aa

@benlorenz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/90991

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.11.5 -m "<description of version>" 19769aade46698eeae6f2f7181054d1ca8aa56ec
git push origin v0.11.5

Please sign in to comment.