inkcpp_rb 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +84 -0
- data/LICENSE +7 -0
- data/README.md +3 -0
- data/Rakefile +16 -0
- data/bin/console +15 -0
- data/bin/setup +10 -0
- data/bin/tapioca +29 -0
- data/ext/inkcpp_rb/extconf.rb +19 -0
- data/ext/inkcpp_rb/inkcpp/.clang-format +99 -0
- data/ext/inkcpp_rb/inkcpp/.github/FUNDING.yml +1 -0
- data/ext/inkcpp_rb/inkcpp/.github/workflows/build.yml +344 -0
- data/ext/inkcpp_rb/inkcpp/.github/workflows/release.yml +49 -0
- data/ext/inkcpp_rb/inkcpp/.gitignore +25 -0
- data/ext/inkcpp_rb/inkcpp/.gitmodules +9 -0
- data/ext/inkcpp_rb/inkcpp/CMakeLists.txt +170 -0
- data/ext/inkcpp_rb/inkcpp/CODE_OF_CONDUCT.md +76 -0
- data/ext/inkcpp_rb/inkcpp/CONTRIBUTING.md +55 -0
- data/ext/inkcpp_rb/inkcpp/Config.cmake.in +2 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/cmake_example/CMakeLists.txt +13 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/cmake_example/main.c +38 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/cmake_example/main.cpp +40 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/cmake_example/test.ink +8 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/cmake_example/test.ink.json +1 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/cmake_example.zip +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/InkCPP_DEMO.zip +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/CreateThread.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/HandleChoice.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/ListElementOf.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/MinimalRuntime.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/MinimalThread.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/ObseverChange.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/TagListGetValue.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Documentation/unreal/imgs/YieldResume.png +0 -0
- data/ext/inkcpp_rb/inkcpp/Doxyfile +2825 -0
- data/ext/inkcpp_rb/inkcpp/LICENSE.txt +22 -0
- data/ext/inkcpp_rb/inkcpp/Minimal.runsettings +8 -0
- data/ext/inkcpp_rb/inkcpp/README.md +192 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/CMakeLists.txt +67 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/array.h +481 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/avl_array.h +833 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/casting.h +93 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/choice.cpp +54 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/collections/restorable.cpp +124 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/collections/restorable.h +406 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/container_operations.cpp +52 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/container_operations.h +34 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/executioner.h +179 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/functional.cpp +86 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/functions.cpp +54 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/functions.h +40 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/globals_impl.cpp +289 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/globals_impl.h +149 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/header.cpp +44 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/choice.h +106 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/functional.h +327 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/globals.h +196 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/list.h +187 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/runner.h +291 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/snapshot.h +61 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/story.h +219 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/story_ptr.h +233 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/traits.h +270 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/include/types.h +169 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/list_impl.cpp +79 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/list_impl.h +39 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/list_operations.cpp +276 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/list_operations.h +356 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/list_table.cpp +841 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/list_table.h +450 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/numeric_operations.cpp +40 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/numeric_operations.h +529 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/operation_bases.h +164 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/operations.h +100 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/output.cpp +528 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/output.h +153 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/platform.h +22 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/random.h +38 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/runner_impl.cpp +1396 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/runner_impl.h +336 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/simple_restorable_stack.h +335 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/snapshot_impl.cpp +182 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/snapshot_impl.h +91 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/snapshot_interface.h +57 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/stack.cpp +618 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/stack.h +243 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/story_impl.cpp +361 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/story_impl.h +92 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/story_ptr.cpp +75 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/string_operations.cpp +125 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/string_operations.h +67 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/string_table.cpp +149 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/string_table.h +47 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/string_utils.h +207 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/system.cpp +39 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/tuple.hpp +151 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/value.cpp +279 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp/value.h +666 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/CMakeLists.txt +62 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/include/inkcpp.h +393 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/inkcpp.cpp +344 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/inkcpp_c.pc.in +10 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/tests/ExternalFunction.c +56 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/tests/Globals.c +98 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/tests/Lists.c +73 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/tests/Observer.c +36 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_c/tests/Snapshot.c +65 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_cl/CMakeLists.txt +49 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_cl/inkcpp_cl.cpp +215 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_cl/test.cpp +209 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_cl/test.h +8 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/CMakeLists.txt +37 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/binary_emitter.cpp +446 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/binary_emitter.h +70 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/binary_stream.cpp +166 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/binary_stream.h +79 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/command.cpp +107 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/compiler.cpp +96 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/emitter.cpp +62 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/emitter.h +104 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/include/compilation_results.h +22 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/include/compiler.h +44 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/json.hpp +24596 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/json_compiler.cpp +411 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/json_compiler.h +62 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/list_data.cpp +47 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/list_data.h +70 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/reporter.cpp +107 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_compiler/reporter.h +55 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/CMakeLists.txt +19 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/example.py +78 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/src/module.cpp +317 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/tests/conftest.py +53 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/tests/test_ExternalFunctions.py +35 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/tests/test_Globals.py +40 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/tests/test_Lists.py +43 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/tests/test_Observer.py +27 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/tests/test_Snapshot.py +57 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_py/unreal_example.ink +71 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Array.cpp +115 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/CMakeLists.txt +117 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Callstack.cpp +392 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/EmptyStringForDivert.cpp +36 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ExternalFunctionsExecuteProperly.cpp +34 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/FallbackFunction.cpp +77 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Globals.cpp +73 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/InkyJson.cpp +34 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/LabelCondition.cpp +60 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Lists.cpp +144 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/LookaheadSafe.cpp +46 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Main.cpp +7 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/MoveTo.cpp +95 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/NewLines.cpp +76 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/NoEarlyTags.cpp +33 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Observer.cpp +245 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Pointer.cpp +191 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Restorable.cpp +294 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/SpaceAfterBracketChoice.cpp +45 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Stack.cpp +224 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Tags.cpp +131 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ThirdTierChoiceAfterBrackets.cpp +38 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/UTF8.cpp +56 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/Value.cpp +210 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/catch.hpp +17970 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/AHF.ink +7 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/ChoiceBracketStory.ink +7 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/EmptyStringForDivert.ink +13 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/ExternalFunctionsExecuteProperly.ink +11 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/FallBack.ink +15 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/GlobalStory.ink +9 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/LabelConditionStory.ink +5 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/LinesStory.ink +42 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/ListLogicStory.ink +40 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/ListStory.ink +8 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/LookaheadSafe.ink +14 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/MoveTo.ink +36 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/NoEarlyTags.ink +19 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/ObserverStory.ink +8 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/SimpleStoryFlow.ink +65 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/TagsStory.ink +22 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/TheIntercept.ink +1686 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/ThirdTierChoiceAfterBracketsStory.ink +13 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/UTF-8-demo.txt +212 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/UTF8Story.ink +218 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/simple-1.1.1-inklecate.json +154 -0
- data/ext/inkcpp_rb/inkcpp/inkcpp_test/ink/simple-1.1.1-inky.json +160 -0
- data/ext/inkcpp_rb/inkcpp/notes/ArchitectureNotes.md +54 -0
- data/ext/inkcpp_rb/inkcpp/notes/ListNotes.md +69 -0
- data/ext/inkcpp_rb/inkcpp/notes/OperationNotes.md +35 -0
- data/ext/inkcpp_rb/inkcpp/notes/TagsNotes.md +24 -0
- data/ext/inkcpp_rb/inkcpp/notes/WhitespaceNotes.md +28 -0
- data/ext/inkcpp_rb/inkcpp/proofing/README.md +3 -0
- data/ext/inkcpp_rb/inkcpp/proofing/inkcpp_runtime_driver +12 -0
- data/ext/inkcpp_rb/inkcpp/pyproject.toml +63 -0
- data/ext/inkcpp_rb/inkcpp/setup.py +166 -0
- data/ext/inkcpp_rb/inkcpp/shared/CMakeLists.txt +14 -0
- data/ext/inkcpp_rb/inkcpp/shared/private/command.h +172 -0
- data/ext/inkcpp_rb/inkcpp/shared/private/header.h +46 -0
- data/ext/inkcpp_rb/inkcpp/shared/public/config.h +53 -0
- data/ext/inkcpp_rb/inkcpp/shared/public/system.h +307 -0
- data/ext/inkcpp_rb/inkcpp/shared/public/version.h +14 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestAllSequenceTypes.ink +59 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestArithmetic.ink +17 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestBasicStringLiterals.ink +8 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestBasicTunnel.ink +10 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestBlanksInInlineSequences.ink +51 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestCallStackEvaluation.ink +15 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestChoiceCount.ink +15 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestChoiceDivertsToDone.ink +6 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestChoiceWithBracketsOnly.ink +9 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestCompareDivertTargets.ink +26 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestComplexTunnels.ink +22 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestConditionalChoiceInWeave.ink +19 -0
- data/ext/inkcpp_rb/inkcpp/tests/TestTunnelOnwardsAfterTunnel.ink +17 -0
- data/ext/inkcpp_rb/inkcpp/unreal/CMakeLists.txt +51 -0
- data/ext/inkcpp_rb/inkcpp/unreal/UE_example.ink +92 -0
- data/ext/inkcpp_rb/inkcpp/unreal/blueprint_filter.js +377 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Resources/Icon128.png +0 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/InkAsset.cpp +47 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/InkChoice.cpp +40 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/InkList.cpp +86 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/InkRuntime.cpp +265 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/InkThread.cpp +239 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/InkVar.cpp +143 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/TagList.cpp +95 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Private/inkcpp.cpp +13 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkAsset.h +50 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkChoice.h +58 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkDelegates.h +139 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkList.h +102 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkRuntime.h +177 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkSnapshot.h +30 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkThread.h +215 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/InkVar.h +245 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/TagList.h +77 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/Public/inkcpp.h +217 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp/inkcpp.Build.cs +62 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp_editor/Private/InkAssetFactory.cpp +237 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp_editor/Private/InkAssetFactory.h +43 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp_editor/Private/inkcpp_editor.cpp +13 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp_editor/Private/inklecate_cmd.cpp.in +24 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp_editor/Public/inkcpp_editor.h +9 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/Source/inkcpp_editor/inkcpp_editor.Build.cs +61 -0
- data/ext/inkcpp_rb/inkcpp/unreal/inkcpp/inkcpp.uplugin +44 -0
- data/ext/inkcpp_rb/inkcpp/unreal/render.css +1 -0
- data/ext/inkcpp_rb/inkcpp_rb.cpp +321 -0
- data/inkcpp_rb.gemspec +54 -0
- data/rbi/inkcpp_rb.rbi +211 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/benchmark@0.4.0.rbi +618 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/minitest@5.25.4.rbi +1547 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
- data/sorbet/rbi/gems/prism@1.3.0.rbi +40040 -0
- data/sorbet/rbi/gems/rake-compiler@1.2.8.rbi +9 -0
- data/sorbet/rbi/gems/rake@13.2.1.rbi +3033 -0
- data/sorbet/rbi/gems/rbi@0.2.2.rbi +4527 -0
- data/sorbet/rbi/gems/rice@4.3.3.rbi +44 -0
- data/sorbet/rbi/gems/spoom@1.5.0.rbi +4932 -0
- data/sorbet/rbi/gems/tapioca@0.16.7.rbi +3611 -0
- data/sorbet/rbi/gems/thor@1.3.2.rbi +4378 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.37.rbi +18379 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +400 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9108f35d9ee3f30702c1b2c73c77b1cd86a98122bfa4ae92bb47227af78b0307
|
4
|
+
data.tar.gz: 98e7b0ece1ede52080f09421f2c8d5fdd5ad5e803c34266ab1a0eca209247356
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7da2986d457633e3e88175fc15fc52c58490e2c553f99e731a54c142454439529338a1e6cdeca371d0ee4704465b1a6d54601230232fee57edc56901a44a90ea
|
7
|
+
data.tar.gz: 4571001c48c80c561cb9517b53d5ccd735368a32271c666c8bedfc9922f01faccab8b3d09c2b0e1dbd89330c9ffa66c59d1ae9abd7f6fc16c33c57b4b8962dc6
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.4.1
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.1.0: Initial commit
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
inkcpp_rb (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
benchmark (0.4.0)
|
10
|
+
date (3.4.1)
|
11
|
+
debug (1.1.0)
|
12
|
+
irb
|
13
|
+
reline (>= 0.2.7)
|
14
|
+
erubi (1.13.1)
|
15
|
+
io-console (0.8.0)
|
16
|
+
irb (1.14.3)
|
17
|
+
rdoc (>= 4.0.0)
|
18
|
+
reline (>= 0.4.2)
|
19
|
+
minitest (5.25.4)
|
20
|
+
netrc (0.11.0)
|
21
|
+
parallel (1.26.3)
|
22
|
+
prism (1.3.0)
|
23
|
+
psych (5.2.2)
|
24
|
+
date
|
25
|
+
stringio
|
26
|
+
rake (13.2.1)
|
27
|
+
rake-compiler (1.2.8)
|
28
|
+
rake
|
29
|
+
rbi (0.2.2)
|
30
|
+
prism (~> 1.0)
|
31
|
+
sorbet-runtime (>= 0.5.9204)
|
32
|
+
rdoc (6.10.0)
|
33
|
+
psych (>= 4.0.0)
|
34
|
+
reline (0.6.0)
|
35
|
+
io-console (~> 0.5)
|
36
|
+
rice (4.3.3)
|
37
|
+
sorbet (0.5.11746)
|
38
|
+
sorbet-static (= 0.5.11746)
|
39
|
+
sorbet-runtime (0.5.11746)
|
40
|
+
sorbet-static (0.5.11746-universal-darwin)
|
41
|
+
sorbet-static (0.5.11746-x86_64-linux)
|
42
|
+
sorbet-static-and-runtime (0.5.11746)
|
43
|
+
sorbet (= 0.5.11746)
|
44
|
+
sorbet-runtime (= 0.5.11746)
|
45
|
+
spoom (1.5.0)
|
46
|
+
erubi (>= 1.10.0)
|
47
|
+
prism (>= 0.28.0)
|
48
|
+
sorbet-static-and-runtime (>= 0.5.10187)
|
49
|
+
thor (>= 0.19.2)
|
50
|
+
stringio (3.1.2)
|
51
|
+
tapioca (0.16.7)
|
52
|
+
benchmark
|
53
|
+
bundler (>= 2.2.25)
|
54
|
+
netrc (>= 0.11.0)
|
55
|
+
parallel (>= 1.21.0)
|
56
|
+
rbi (~> 0.2)
|
57
|
+
sorbet-static-and-runtime (>= 0.5.11087)
|
58
|
+
spoom (>= 1.2.0)
|
59
|
+
thor (>= 1.2.0)
|
60
|
+
yard-sorbet
|
61
|
+
thor (1.3.2)
|
62
|
+
yard (0.9.37)
|
63
|
+
yard-sorbet (0.9.0)
|
64
|
+
sorbet-runtime
|
65
|
+
yard
|
66
|
+
|
67
|
+
PLATFORMS
|
68
|
+
arm64-darwin-21
|
69
|
+
arm64-darwin-24
|
70
|
+
x86_64-linux
|
71
|
+
|
72
|
+
DEPENDENCIES
|
73
|
+
debug (~> 1.1.0)
|
74
|
+
inkcpp_rb!
|
75
|
+
minitest (~> 5.0)
|
76
|
+
rake (~> 13.0)
|
77
|
+
rake-compiler (~> 1.2.8)
|
78
|
+
rice (~> 4.3.3)
|
79
|
+
sorbet (~> 0.5.0)
|
80
|
+
sorbet-runtime (~> 0.5.0)
|
81
|
+
tapioca (~> 0.16.0)
|
82
|
+
|
83
|
+
BUNDLED WITH
|
84
|
+
2.3.4
|
data/LICENSE
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright 2025 Chris Zelenak
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rake/extensiontask"
|
5
|
+
require "rake/testtask"
|
6
|
+
|
7
|
+
Rake::TestTask.new(:test) do |t|
|
8
|
+
t.libs << "test"
|
9
|
+
t.libs << "lib"
|
10
|
+
t.test_files = FileList["test/**/test_*.rb"]
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
Rake::ExtensionTask.new("inkcpp_rb")
|
15
|
+
|
16
|
+
task default: :test
|
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "inkcpp_rb"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/bin/tapioca
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'tapioca' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
|
+
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
|
+
|
17
|
+
if File.file?(bundle_binstub)
|
18
|
+
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
19
|
+
load(bundle_binstub)
|
20
|
+
else
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
|
+
|
29
|
+
load Gem.bin_path("tapioca", "tapioca")
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require "mkmf-rice"
|
2
|
+
|
3
|
+
cmake_path = %x{which cmake}.chomp
|
4
|
+
raise "cmake required" unless $?.success? && !cmake_path.empty?
|
5
|
+
|
6
|
+
inkcpp_dir = File.join(File.dirname(File.realpath(__FILE__)), "inkcpp")
|
7
|
+
build_dir = File.join(inkcpp_dir, "build")
|
8
|
+
dist_dir = File.join(build_dir, "dist")
|
9
|
+
FileUtils.mkdir_p(dist_dir)
|
10
|
+
FileUtils.mkdir_p(build_dir)
|
11
|
+
succeed = system(%Q{cd #{build_dir} && cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=#{dist_dir} .. && cmake --build . --config Release && cmake --install . --component lib}, out: STDOUT)
|
12
|
+
raise "cmake failed" unless succeed
|
13
|
+
inkcpp_lib_dir = File.join(dist_dir, "lib", "ink")
|
14
|
+
inkcpp_include_dir = File.join(dist_dir, "include")
|
15
|
+
|
16
|
+
$CXXFLAGS += %Q{ -I#{inkcpp_include_dir}}
|
17
|
+
$LDFLAGS += %Q{ -L#{inkcpp_lib_dir} -linkcpp -linkcpp_compiler}
|
18
|
+
|
19
|
+
create_makefile "inkcpp_rb/inkcpp_rb"
|
@@ -0,0 +1,99 @@
|
|
1
|
+
---
|
2
|
+
AccessModifierOffset: -2
|
3
|
+
AlignAfterOpenBracket: BlockIndent
|
4
|
+
AlignArrayOfStructures: Right
|
5
|
+
# readd padOperation if bumped from clang 14
|
6
|
+
AlignConsecutiveAssignments: AcrossComments
|
7
|
+
AlignConsecutiveBitFields: AcrossComments
|
8
|
+
AlignConsecutiveDeclarations: AcrossComments
|
9
|
+
AlignConsecutiveMacros: AcrossComments
|
10
|
+
AlignEscapedNewlines: Left
|
11
|
+
AlignOperands: AlignAfterOperator
|
12
|
+
AlignTrailingComments: true
|
13
|
+
AllowAllArgumentsOnNextLine: true
|
14
|
+
AllowAllParametersOfDeclarationOnNextLine: true
|
15
|
+
AllowShortBlocksOnASingleLine: Always
|
16
|
+
AllowShortCaseLabelsOnASingleLine: true
|
17
|
+
AllowShortEnumsOnASingleLine: false
|
18
|
+
AllowShortFunctionsOnASingleLine: All
|
19
|
+
AllowShortIfStatementsOnASingleLine: Never
|
20
|
+
AllowShortLambdasOnASingleLine: Inline
|
21
|
+
AllowShortLoopsOnASingleLine: false
|
22
|
+
AlwaysBreakAfterReturnType: None
|
23
|
+
AlwaysBreakBeforeMultilineStrings: true
|
24
|
+
AlwaysBreakTemplateDeclarations: Yes
|
25
|
+
BinPackArguments: true
|
26
|
+
BinPackParameters: true
|
27
|
+
BreakBeforeBraces: Linux
|
28
|
+
# BreakAfterAttributes: Always
|
29
|
+
BreakBeforeBinaryOperators: All
|
30
|
+
UseTab: ForIndentation
|
31
|
+
Standard: Latest
|
32
|
+
SpacesInSquareBrackets: false
|
33
|
+
SpacesInParentheses: false
|
34
|
+
SpacesInLineCommentPrefix:
|
35
|
+
Minimum: 1
|
36
|
+
Maximum: 1
|
37
|
+
SpacesInContainerLiterals: false
|
38
|
+
SpacesInConditionalStatement: false
|
39
|
+
SpacesInCStyleCastParentheses: true
|
40
|
+
SpacesInAngles: Never
|
41
|
+
SpacesBeforeTrailingComments: 1
|
42
|
+
SpaceInEmptyParentheses: false
|
43
|
+
SpaceInEmptyBlock: false
|
44
|
+
SpaceBeforeSquareBrackets: false
|
45
|
+
SpaceBeforeRangeBasedForLoopColon: true
|
46
|
+
SpaceBeforeParens: ControlStatements
|
47
|
+
SpaceBeforeInheritanceColon: true
|
48
|
+
SpaceBeforeCtorInitializerColon: true
|
49
|
+
SpaceBeforeCpp11BracedList: false
|
50
|
+
SpaceBeforeCaseColon: false
|
51
|
+
SpaceBeforeAssignmentOperators: true
|
52
|
+
SpaceAroundPointerQualifiers: Before
|
53
|
+
PointerAlignment: Left
|
54
|
+
SpaceAfterTemplateKeyword: false
|
55
|
+
SpaceAfterLogicalNot: true
|
56
|
+
SpaceAfterCStyleCast: true
|
57
|
+
SortUsingDeclarations: false
|
58
|
+
SortIncludes: Never
|
59
|
+
ShortNamespaceLines: 0
|
60
|
+
SeparateDefinitionBlocks: Always
|
61
|
+
# RequiresExpressionIndentation: OuterScope
|
62
|
+
# BreakBeforeConceptDeclarations: Always
|
63
|
+
# BreakBeforeInlineASMColon: Always
|
64
|
+
BreakBeforeTernaryOperators: true
|
65
|
+
BreakConstructorInitializers: BeforeComma
|
66
|
+
BreakInheritanceList: BeforeComma
|
67
|
+
BreakStringLiterals: true
|
68
|
+
ColumnLimit: 100
|
69
|
+
CompactNamespaces: true
|
70
|
+
Cpp11BracedListStyle: true
|
71
|
+
EmptyLineBeforeAccessModifier: Always
|
72
|
+
FixNamespaceComments: true
|
73
|
+
IncludeBlocks: Preserve
|
74
|
+
IndentAccessModifiers: false
|
75
|
+
IndentCaseBlocks: false
|
76
|
+
IndentCaseLabels: true
|
77
|
+
IndentExternBlock: Indent
|
78
|
+
IndentGotoLabels: false
|
79
|
+
IndentPPDirectives: AfterHash
|
80
|
+
# IndentRequiresClause: true
|
81
|
+
IndentWidth: 2
|
82
|
+
TabWidth: 2
|
83
|
+
IndentWrappedFunctionNames: true
|
84
|
+
# InsertBraces: true
|
85
|
+
# InsertNewlineAtEOF: true
|
86
|
+
KeepEmptyLinesAtTheStartOfBlocks: true
|
87
|
+
LambdaBodyIndentation: Signature
|
88
|
+
Language: Cpp
|
89
|
+
# LineEnding: LF
|
90
|
+
MaxEmptyLinesToKeep: 2
|
91
|
+
NamespaceIndentation: Inner
|
92
|
+
QualifierAlignment: Left
|
93
|
+
ReferenceAlignment: Left
|
94
|
+
ReflowComments: true
|
95
|
+
RemoveBracesLLVM: false
|
96
|
+
# RemoveSemicolon: false
|
97
|
+
# RequiresClausePosition: OwnLine
|
98
|
+
UseCRLF: false
|
99
|
+
DeriveLineEnding: false
|
@@ -0,0 +1 @@
|
|
1
|
+
github: JBenda
|
@@ -0,0 +1,344 @@
|
|
1
|
+
name: build
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
pull_request:
|
7
|
+
|
8
|
+
env:
|
9
|
+
BUILD_TYPE: release
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
compilation:
|
13
|
+
name: Compilation and Unit Tests
|
14
|
+
runs-on: ${{ matrix.os }}
|
15
|
+
strategy:
|
16
|
+
matrix:
|
17
|
+
include:
|
18
|
+
- os: macos-latest
|
19
|
+
artifact: macos
|
20
|
+
name: MacOSX
|
21
|
+
inklecate_url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip
|
22
|
+
proof: false
|
23
|
+
unreal: false
|
24
|
+
- os: macos-14
|
25
|
+
artifact: macos-arm
|
26
|
+
name: MacOSX-ARM
|
27
|
+
inklecate_url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip
|
28
|
+
proof: false
|
29
|
+
unreal: false
|
30
|
+
- os: windows-latest
|
31
|
+
artifact: win64
|
32
|
+
name: Windows x64
|
33
|
+
inklecate_url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_windows.zip
|
34
|
+
proof: false
|
35
|
+
unreal: false
|
36
|
+
- os: "ubuntu-20.04"
|
37
|
+
artifact: linux
|
38
|
+
name: Linux x64
|
39
|
+
inklecate_url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_linux.zip
|
40
|
+
proof: true
|
41
|
+
unreal: true
|
42
|
+
|
43
|
+
steps:
|
44
|
+
|
45
|
+
# Checkout project
|
46
|
+
- uses: actions/checkout@v4
|
47
|
+
with:
|
48
|
+
submodules: true
|
49
|
+
|
50
|
+
# Setup python
|
51
|
+
- uses: actions/setup-python@v5
|
52
|
+
if: ${{ matrix.proof }}
|
53
|
+
with:
|
54
|
+
python-version: '3.x'
|
55
|
+
|
56
|
+
# Setup CMake
|
57
|
+
- name: Setup cmake
|
58
|
+
uses: jwlawson/actions-setup-cmake@v2
|
59
|
+
with:
|
60
|
+
cmake-version: '3.22.x'
|
61
|
+
|
62
|
+
# Create a build directory to store all the CMake generated files
|
63
|
+
- name: Create Build Environment
|
64
|
+
run: cmake -E make_directory ${{github.workspace}}/build
|
65
|
+
|
66
|
+
# Run CMake configuration to create build files
|
67
|
+
- name: Configure CMake
|
68
|
+
shell: bash
|
69
|
+
working-directory: ${{github.workspace}}/build
|
70
|
+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DINKCPP_PY=OFF -DINKCPP_C=ON -DINKCPP_TEST=ON -DINKCPP_INKLECATE=OS
|
71
|
+
|
72
|
+
# Build using CMake and OS toolkit
|
73
|
+
- name: Build
|
74
|
+
working-directory: ${{github.workspace}}/build
|
75
|
+
shell: bash
|
76
|
+
run: cmake --build . --config $BUILD_TYPE
|
77
|
+
|
78
|
+
# Run CMake tests (unit tests, etc.)
|
79
|
+
- name: CTests
|
80
|
+
working-directory: ${{github.workspace}}/build
|
81
|
+
shell: bash
|
82
|
+
run: ctest . -C $BUILD_TYPE -V
|
83
|
+
|
84
|
+
# Copy all build artifacts to the bin directory
|
85
|
+
- name: Install Cl
|
86
|
+
working-directory: ${{github.workspace}}/build
|
87
|
+
shell: bash
|
88
|
+
run: cmake --install . --config $BUILD_TYPE --prefix comp_cl --component cl
|
89
|
+
- name: Upload Cl
|
90
|
+
uses: actions/upload-artifact@v4
|
91
|
+
with:
|
92
|
+
name: ${{ matrix.artifact }}-cl
|
93
|
+
path: build/comp_cl/
|
94
|
+
|
95
|
+
- name: Install Lib
|
96
|
+
working-directory: ${{github.workspace}}/build
|
97
|
+
shell: bash
|
98
|
+
run: cmake --install . --config $BUILD_TYPE --prefix comp_lib --component lib
|
99
|
+
- name: Upload Lib
|
100
|
+
uses: actions/upload-artifact@v4
|
101
|
+
with:
|
102
|
+
name: ${{ matrix.artifact }}-lib
|
103
|
+
path: build/comp_lib/
|
104
|
+
|
105
|
+
- name: Install CLib
|
106
|
+
working-directory: ${{github.workspace}}/build
|
107
|
+
shell: bash
|
108
|
+
run: cmake --install . --config $BUILD_TYPE --prefix comp_clib --component clib
|
109
|
+
- name: Upload Clib
|
110
|
+
uses: actions/upload-artifact@v4
|
111
|
+
with:
|
112
|
+
name: ${{matrix.artifact}}-clib
|
113
|
+
path: build/comp_clib
|
114
|
+
|
115
|
+
- name: Install UE
|
116
|
+
if: ${{ matrix.unreal }}
|
117
|
+
working-directory: ${{github.workspace}}/build
|
118
|
+
shell: bash
|
119
|
+
run: cmake --install . --config $BUILD_TYPE --prefix comp_unreal --component unreal
|
120
|
+
- name: Upload UE
|
121
|
+
if: ${{ matrix.unreal }}
|
122
|
+
uses: actions/upload-artifact@v4
|
123
|
+
with:
|
124
|
+
name: unreal
|
125
|
+
path: build/comp_unreal/
|
126
|
+
|
127
|
+
# Make sure Inkproof has everything it needs to run our executable
|
128
|
+
- name: Setup Ink Proof
|
129
|
+
if: ${{ matrix.proof }}
|
130
|
+
shell: bash
|
131
|
+
working-directory: proofing/ink-proof
|
132
|
+
run: |
|
133
|
+
python3 install_deps.py
|
134
|
+
cp ../inkcpp_runtime_driver drivers/
|
135
|
+
chmod +x drivers/inkcpp_runtime_driver
|
136
|
+
mkdir deps/inkcpp
|
137
|
+
cp ../../build/comp_cl/* deps/inkcpp/
|
138
|
+
chmod +x deps/inkcpp/inkcpp_cl
|
139
|
+
|
140
|
+
# Run it
|
141
|
+
- name: Run Ink Proof
|
142
|
+
if: ${{ matrix.proof }}
|
143
|
+
shell: bash
|
144
|
+
working-directory: proofing/ink-proof
|
145
|
+
run: |
|
146
|
+
python3 proof.py --examples 'I...' inklecate_v1.1.1 inkcpp_runtime > run.out
|
147
|
+
echo -e "| ${{ matrix.name }} | $(cat run.out) |" > ${{ matrix.artifact }}.txt
|
148
|
+
|
149
|
+
# Creates a "disabled" artifact if ink proofing is disabled
|
150
|
+
- name: Create Disabled InkProof Results File
|
151
|
+
if: ${{ !matrix.proof }}
|
152
|
+
shell: bash
|
153
|
+
run: |
|
154
|
+
mkdir -p proofing/ink-proof
|
155
|
+
echo "| ${{ matrix.name }} | DISABLED |" > proofing/ink-proof/${{ matrix.artifact }}.txt
|
156
|
+
|
157
|
+
# Upload results artifact
|
158
|
+
- name: Upload Results Artifact
|
159
|
+
uses: actions/upload-artifact@v4
|
160
|
+
with:
|
161
|
+
name: result-${{ matrix.artifact }}
|
162
|
+
path: proofing/ink-proof/${{ matrix.artifact }}.txt
|
163
|
+
|
164
|
+
# Upload website artifact
|
165
|
+
- name: Upload Ink-Proof Website Artifact
|
166
|
+
if: ${{ matrix.proof }}
|
167
|
+
uses: actions/upload-artifact@v4
|
168
|
+
with:
|
169
|
+
name: ${{ matrix.artifact }}-www
|
170
|
+
path: proofing/ink-proof/out
|
171
|
+
|
172
|
+
build-doc:
|
173
|
+
name: Build Doxygen documentation
|
174
|
+
needs: [compilation, build-python]
|
175
|
+
runs-on: ubuntu-latest
|
176
|
+
steps:
|
177
|
+
- uses: actions/checkout@v4
|
178
|
+
with:
|
179
|
+
submodules: true
|
180
|
+
- name: Set upt Python
|
181
|
+
uses: actions/setup-python@v5
|
182
|
+
with:
|
183
|
+
python-version: "3.x"
|
184
|
+
- name: Install Doxygen
|
185
|
+
run: |
|
186
|
+
sudo apt-get install graphviz -y
|
187
|
+
wget https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz
|
188
|
+
gunzip doxygen-*.tar.gz
|
189
|
+
tar xf doxygen-*.tar
|
190
|
+
cd doxygen-1.10.0/
|
191
|
+
sudo make install
|
192
|
+
- name: Setup cmake
|
193
|
+
uses: jwlawson/actions-setup-cmake@v2
|
194
|
+
with:
|
195
|
+
cmake-version: '3.22.x'
|
196
|
+
- name: Create Build Environment
|
197
|
+
run: cmake -E make_directory ${{github.workspace}}/build
|
198
|
+
- name: Configure CMake
|
199
|
+
shell: bash
|
200
|
+
working-directory: ${{github.workspace}}/build
|
201
|
+
run: cmake $GITHUB_WORKSPACE -DINKCPP_PY=ON -DINKCPP_DOC_BlueprintUE=ON
|
202
|
+
- name: Build
|
203
|
+
working-directory: ${{github.workspace}}/build
|
204
|
+
shell: bash
|
205
|
+
run: cmake --build . --target doc
|
206
|
+
- name: Upload
|
207
|
+
uses: actions/upload-artifact@v4
|
208
|
+
with:
|
209
|
+
name: doxygen
|
210
|
+
path: Documentation/
|
211
|
+
|
212
|
+
build-python:
|
213
|
+
name: Build Python package
|
214
|
+
needs: compilation
|
215
|
+
runs-on: ubuntu-latest
|
216
|
+
steps:
|
217
|
+
- uses: actions/checkout@v4
|
218
|
+
with:
|
219
|
+
submodules: true
|
220
|
+
- name: Set up Python
|
221
|
+
uses: actions/setup-python@v5
|
222
|
+
with:
|
223
|
+
python-version: "3.x"
|
224
|
+
- name: install build
|
225
|
+
run: >-
|
226
|
+
python3 -m
|
227
|
+
pip install
|
228
|
+
build
|
229
|
+
pytest
|
230
|
+
--user
|
231
|
+
- name: Build python release
|
232
|
+
run: python3 -m build
|
233
|
+
|
234
|
+
- uses: suisei-cn/actions-download-file@v1.6.0
|
235
|
+
name: Download Inklecate
|
236
|
+
id: download_inklecate
|
237
|
+
with:
|
238
|
+
url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_linux.zip
|
239
|
+
target: "inklecate/"
|
240
|
+
- name: Deploy Inkelcate
|
241
|
+
shell: bash
|
242
|
+
run: |
|
243
|
+
cd inklecate
|
244
|
+
unzip *.zip
|
245
|
+
echo "INKLECATE=${{ matrix.inklecate_pre }}$GITHUB_WORKSPACE/inklecate/inklecate${{ matrix.inklecate_post }}" >> $GITHUB_ENV
|
246
|
+
|
247
|
+
- name: Test python release
|
248
|
+
run: |
|
249
|
+
python3 -m pip install dist/*.whl --user
|
250
|
+
python3 -m pytest
|
251
|
+
- name: Remove wheel
|
252
|
+
run: |
|
253
|
+
rm dist/*.whl
|
254
|
+
- name: Upload Python files
|
255
|
+
uses: actions/upload-artifact@v4
|
256
|
+
with:
|
257
|
+
name: python-package-distribution
|
258
|
+
path: dist/
|
259
|
+
|
260
|
+
clang-format:
|
261
|
+
name: "Check Formatting"
|
262
|
+
runs-on: ubuntu-latest
|
263
|
+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' }}
|
264
|
+
steps:
|
265
|
+
- uses: actions/checkout@v4
|
266
|
+
- name: Fetch master branch
|
267
|
+
run: |
|
268
|
+
git fetch origin master
|
269
|
+
- name: Check clang-format
|
270
|
+
run: |
|
271
|
+
diff=$(git clang-format-14 --extensions c,cpp,h,hpp --style file -q --diff origin/master)
|
272
|
+
echo $diff
|
273
|
+
if [ "$diff" != "" ]; then
|
274
|
+
echo run git clang-format --extensions c,cpp,h,hpp --style file master
|
275
|
+
echo or upstream/master depending on your setup
|
276
|
+
clang
|
277
|
+
fi
|
278
|
+
|
279
|
+
reporting:
|
280
|
+
name: "Pull Request Report"
|
281
|
+
# if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'brwarner/inkcpp' }}
|
282
|
+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' }}
|
283
|
+
runs-on: ubuntu-latest
|
284
|
+
needs: [compilation, clang-format]
|
285
|
+
permissions:
|
286
|
+
pull-requests: write
|
287
|
+
steps:
|
288
|
+
# Download Ink Proof Results
|
289
|
+
- uses: actions/download-artifact@v4
|
290
|
+
with:
|
291
|
+
pattern: result-*
|
292
|
+
path: "results"
|
293
|
+
merge-multiple: true
|
294
|
+
|
295
|
+
# Create comment text
|
296
|
+
- name: Create Comment Text File
|
297
|
+
shell: bash
|
298
|
+
run: |
|
299
|
+
echo "### Ink Proof Results" >> comment.txt
|
300
|
+
echo "" >> comment.txt
|
301
|
+
echo "These results are obtained by running the [Ink-Proof Testing Suite](https://github.com/chromy/ink-proof) on the compiled binaries in this pull request." >> comment.txt
|
302
|
+
echo "" >> comment.txt
|
303
|
+
echo "| System | Results |" >> comment.txt
|
304
|
+
echo "| --- | --- |" >> comment.txt
|
305
|
+
FILES="results/*.txt"
|
306
|
+
for f in $FILES
|
307
|
+
do
|
308
|
+
echo "Reading results from $f"
|
309
|
+
cat "$f" >> comment.txt
|
310
|
+
done
|
311
|
+
|
312
|
+
# Post Comment
|
313
|
+
- uses: marocchino/sticky-pull-request-comment@v2.9.0
|
314
|
+
with:
|
315
|
+
recreate: true
|
316
|
+
path: comment.txt
|
317
|
+
|
318
|
+
pages:
|
319
|
+
permissions:
|
320
|
+
contents: write
|
321
|
+
name: "Upload Ink-Proof to Github Pages"
|
322
|
+
needs: [ compilation, build-doc ]
|
323
|
+
runs-on: ubuntu-latest
|
324
|
+
if: github.ref == 'refs/heads/master'
|
325
|
+
steps:
|
326
|
+
- uses: actions/checkout@v4
|
327
|
+
|
328
|
+
# Download Ink Proof page for Linux
|
329
|
+
- uses: actions/download-artifact@v4
|
330
|
+
with:
|
331
|
+
name: linux-www
|
332
|
+
path: www/proof
|
333
|
+
|
334
|
+
- uses: actions/download-artifact@v4
|
335
|
+
with:
|
336
|
+
name: doxygen
|
337
|
+
path: www
|
338
|
+
|
339
|
+
# Deploy to Github Pages
|
340
|
+
- name: Deploy Page
|
341
|
+
uses: JamesIves/github-pages-deploy-action@v4
|
342
|
+
with:
|
343
|
+
branch: inkproof-page
|
344
|
+
folder: www
|