Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Fix for JuliaInterop/CxxWrap.jl#419

* Fall back to CxxWrap as package in CI

* Don't build JLL in CI
  • Loading branch information
barche authored Apr 14, 2024
1 parent 646ec4e commit 46ffb70
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 47 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/build-binary.yml

This file was deleted.

6 changes: 5 additions & 1 deletion .github/workflows/test-linux-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Build and test
env:
body: ${{ github.event.pull_request.body }}
run: |
body="${{github.event.pull_request.body}}"
package="$(echo "$body" | sed -n '1p')"
if [ -z "${package}" ]; then
package="CxxWrap"
fi
if [[ "$OSTYPE" != "darwin"* ]]; then
rm -f /opt/hostedtoolcache/julia/1.6*/x64/lib/julia/libstdc++.so.6
fi
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/test-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Config and Test
env:
body: ${{ github.event.pull_request.body }}
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DOVERRIDES_PATH=$HOMEDRIVE/$HOMEPATH/.julia/artifacts/Overrides.toml -DOVERRIDE_ROOT=./ -DAPPEND_OVERRIDES_TOML=ON ..
body="${{github.event.pull_request.body}}"
package="$(echo "$body" | sed -n '1p')"
if [ -z "${package}" ]; then
package="CxxWrap"
fi
cmake --build . --config Release
julia -e "using Pkg; Pkg.Registry.add(\"General\"); Pkg.Registry.add(RegistrySpec(url = \"https://github.com/barche/CxxWrapTestRegistry.git\"))"
julia -e "using Pkg; pkg\"add ${package}\"; using CxxWrap"
Expand Down
2 changes: 2 additions & 0 deletions examples/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& types)
return {std::shared_ptr<const World>(new World("shared vector const hello"))};
});

types.method("world_ptr_vector", []() { static World w; return std::vector({&w}); });

types.method("get_shared_vector_msg", [](const std::vector<std::shared_ptr<World>>& v)
{
return v[0]->greet();
Expand Down
2 changes: 1 addition & 1 deletion include/jlcxx/stl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ struct WrapQueueImpl
wrapped.module().set_override_module(StlWrappers::instance().module());
wrapped.method("cppsize", &WrappedT::size);
wrapped.method("push_back!", [] (WrappedT& v, const T& val) { v.push(val); });
wrapped.method("front", [] (WrappedT& v) -> const T { return v.front(); });
wrapped.method("front", [] (WrappedT& v) { return v.front(); });
wrapped.method("pop_front!", [] (WrappedT& v) { v.pop(); });
wrapped.module().unset_override_module();
}
Expand Down

0 comments on commit 46ffb70

Please sign in to comment.