pyurd 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyurd-0.1.0/.clang-format +60 -0
- pyurd-0.1.0/.clang-tidy +98 -0
- pyurd-0.1.0/.github/workflows/ci.yml +98 -0
- pyurd-0.1.0/.github/workflows/ci_release.yml +254 -0
- pyurd-0.1.0/.github/workflows/docs.yml +47 -0
- pyurd-0.1.0/.github/workflows/release-native.yml +248 -0
- pyurd-0.1.0/.github/workflows/release.yml +97 -0
- pyurd-0.1.0/.github/workflows/standards.yml +44 -0
- pyurd-0.1.0/.gitignore +6 -0
- pyurd-0.1.0/AGENTS.md +105 -0
- pyurd-0.1.0/CMakeLists.txt +129 -0
- pyurd-0.1.0/LICENSE +674 -0
- pyurd-0.1.0/PKG-INFO +122 -0
- pyurd-0.1.0/README.md +107 -0
- pyurd-0.1.0/benchmarks/.clang-tidy +4 -0
- pyurd-0.1.0/benchmarks/CMakeLists.txt +27 -0
- pyurd-0.1.0/benchmarks/cells.hpp +96 -0
- pyurd-0.1.0/benchmarks/containers.cpp +323 -0
- pyurd-0.1.0/benchmarks/experiment.cpp +60 -0
- pyurd-0.1.0/benchmarks/experiments_main.cpp.in +142 -0
- pyurd-0.1.0/benchmarks/lifecycle.hpp +540 -0
- pyurd-0.1.0/benchmarks/pools.cpp +122 -0
- pyurd-0.1.0/benchmarks/record.py +629 -0
- pyurd-0.1.0/benchmarks/requests.json +1056 -0
- pyurd-0.1.0/benchmarks/results/dominik-MS-7D31.json +24623 -0
- pyurd-0.1.0/claude.search.md +122 -0
- pyurd-0.1.0/cmake/build_corresponding_source.py +99 -0
- pyurd-0.1.0/cmake/urdConfig.cmake.in +30 -0
- pyurd-0.1.0/cmake/urd_objects.cmake +82 -0
- pyurd-0.1.0/docs/BENCHMARKS.md +323 -0
- pyurd-0.1.0/docs/RESOLUTION.md +468 -0
- pyurd-0.1.0/docs/_ext/urd_language.py +252 -0
- pyurd-0.1.0/docs/conf.py +32 -0
- pyurd-0.1.0/docs/extending.rst +161 -0
- pyurd-0.1.0/docs/index.rst +74 -0
- pyurd-0.1.0/docs/kinds/maps.rst +251 -0
- pyurd-0.1.0/docs/kinds/partitions.rst +56 -0
- pyurd-0.1.0/docs/kinds/pools.rst +247 -0
- pyurd-0.1.0/docs/kinds/queues.rst +112 -0
- pyurd-0.1.0/docs/kinds/records.rst +194 -0
- pyurd-0.1.0/docs/kinds/sequences.rst +146 -0
- pyurd-0.1.0/docs/kinds/sets.rst +268 -0
- pyurd-0.1.0/docs/language/costs.rst +22 -0
- pyurd-0.1.0/docs/language/hints.rst +13 -0
- pyurd-0.1.0/docs/language/index.rst +224 -0
- pyurd-0.1.0/docs/language/kind.rst +48 -0
- pyurd-0.1.0/docs/language/needs.rst +7 -0
- pyurd-0.1.0/docs/language/semantics.rst +131 -0
- pyurd-0.1.0/docs/python.rst +35 -0
- pyurd-0.1.0/docs/representations.rst +160 -0
- pyurd-0.1.0/docs/requests.rst +171 -0
- pyurd-0.1.0/docs/requirements.txt +4 -0
- pyurd-0.1.0/docs/semantics.rst +265 -0
- pyurd-0.1.0/examples/.clang-tidy +4 -0
- pyurd-0.1.0/examples/CMakeLists.txt +15 -0
- pyurd-0.1.0/examples/README.md +48 -0
- pyurd-0.1.0/examples/dense.cpp +82 -0
- pyurd-0.1.0/examples/interning.cpp +66 -0
- pyurd-0.1.0/examples/maps.cpp +68 -0
- pyurd-0.1.0/examples/queues.cpp +65 -0
- pyurd-0.1.0/examples/rows.cpp +83 -0
- pyurd-0.1.0/examples/scopes.cpp +85 -0
- pyurd-0.1.0/examples/sequences.cpp +85 -0
- pyurd-0.1.0/examples/sets.cpp +42 -0
- pyurd-0.1.0/examples/show.hpp +20 -0
- pyurd-0.1.0/examples/states.cpp +90 -0
- pyurd-0.1.0/examples/structures.cpp +49 -0
- pyurd-0.1.0/include/urd/bits.hpp +36 -0
- pyurd-0.1.0/include/urd/config.hpp +47 -0
- pyurd-0.1.0/include/urd/cost.hpp +313 -0
- pyurd-0.1.0/include/urd/elements/builder.hpp +12 -0
- pyurd-0.1.0/include/urd/elements/children.hpp +120 -0
- pyurd-0.1.0/include/urd/elements/concepts.hpp +189 -0
- pyurd-0.1.0/include/urd/elements/data.hpp +33 -0
- pyurd-0.1.0/include/urd/elements/equal_to.hpp +183 -0
- pyurd-0.1.0/include/urd/elements/flat.hpp +151 -0
- pyurd-0.1.0/include/urd/elements/hash.hpp +249 -0
- pyurd-0.1.0/include/urd/elements/hash_dynamic_bitset.hpp +26 -0
- pyurd-0.1.0/include/urd/elements/index.hpp +98 -0
- pyurd-0.1.0/include/urd/elements/less.hpp +272 -0
- pyurd-0.1.0/include/urd/elements/prehashed.hpp +68 -0
- pyurd-0.1.0/include/urd/elements/requirements.hpp +148 -0
- pyurd-0.1.0/include/urd/elements/subset_view.hpp +57 -0
- pyurd-0.1.0/include/urd/elements/view.hpp +499 -0
- pyurd-0.1.0/include/urd/format.hpp +174 -0
- pyurd-0.1.0/include/urd/kinds.hpp +467 -0
- pyurd-0.1.0/include/urd/memory.hpp +105 -0
- pyurd-0.1.0/include/urd/property_set.hpp +367 -0
- pyurd-0.1.0/include/urd/python/bindings.hpp +89 -0
- pyurd-0.1.0/include/urd/python/caster.hpp +67 -0
- pyurd-0.1.0/include/urd/python/flat.hpp +136 -0
- pyurd-0.1.0/include/urd/python/maps/flat_map.hpp +14 -0
- pyurd-0.1.0/include/urd/python/maps/index_map.hpp +14 -0
- pyurd-0.1.0/include/urd/python/maps/ordered_map.hpp +14 -0
- pyurd-0.1.0/include/urd/python/maps/parallel_hash_map.hpp +16 -0
- pyurd-0.1.0/include/urd/python/maps/std_map.hpp +16 -0
- pyurd-0.1.0/include/urd/python/maps/unordered_flat_map.hpp +14 -0
- pyurd-0.1.0/include/urd/python/owner.hpp +67 -0
- pyurd-0.1.0/include/urd/python/ranges.hpp +79 -0
- pyurd-0.1.0/include/urd/python/sequences/segmented.hpp +14 -0
- pyurd-0.1.0/include/urd/python/sequences/sequence.hpp +14 -0
- pyurd-0.1.0/include/urd/python/values/dense_set.hpp +14 -0
- pyurd-0.1.0/include/urd/python/values/flat_set.hpp +14 -0
- pyurd-0.1.0/include/urd/python/values/indexed.hpp +14 -0
- pyurd-0.1.0/include/urd/python/values/parallel_hash_set.hpp +16 -0
- pyurd-0.1.0/include/urd/python/values/sparse_set.hpp +14 -0
- pyurd-0.1.0/include/urd/python/values/std_set.hpp +16 -0
- pyurd-0.1.0/include/urd/python/values/unordered_flat_set.hpp +14 -0
- pyurd-0.1.0/include/urd/registry/declaration.hpp +148 -0
- pyurd-0.1.0/include/urd/registry/declarations.hpp +179 -0
- pyurd-0.1.0/include/urd/registry/derived.hpp +65 -0
- pyurd-0.1.0/include/urd/registry/facts.hpp +213 -0
- pyurd-0.1.0/include/urd/registry/scan.hpp +87 -0
- pyurd-0.1.0/include/urd/registry/select.hpp +133 -0
- pyurd-0.1.0/include/urd/registry/table.hpp +24 -0
- pyurd-0.1.0/include/urd/repr/containers/bit.hpp +304 -0
- pyurd-0.1.0/include/urd/repr/containers/bit_rows.hpp +196 -0
- pyurd-0.1.0/include/urd/repr/containers/bitset_span.hpp +631 -0
- pyurd-0.1.0/include/urd/repr/containers/byte_arena.hpp +128 -0
- pyurd-0.1.0/include/urd/repr/containers/detail/geometric_segment_layout.hpp +59 -0
- pyurd-0.1.0/include/urd/repr/containers/detail/segmented_rows.hpp +96 -0
- pyurd-0.1.0/include/urd/repr/containers/detail/threading.hpp +114 -0
- pyurd-0.1.0/include/urd/repr/containers/detail/tracking.hpp +59 -0
- pyurd-0.1.0/include/urd/repr/containers/schema_rows.hpp +324 -0
- pyurd-0.1.0/include/urd/repr/containers/segment_sizes.hpp +40 -0
- pyurd-0.1.0/include/urd/repr/containers/segmented_vector.hpp +384 -0
- pyurd-0.1.0/include/urd/repr/containers/spin_mutex.hpp +143 -0
- pyurd-0.1.0/include/urd/repr/containers/uniform_rows.hpp +210 -0
- pyurd-0.1.0/include/urd/repr/core/boost_memory.hpp +44 -0
- pyurd-0.1.0/include/urd/repr/core/gtl_memory.hpp +61 -0
- pyurd-0.1.0/include/urd/repr/core/gtl_spin_lock.hpp +28 -0
- pyurd-0.1.0/include/urd/repr/core/numbered.hpp +58 -0
- pyurd-0.1.0/include/urd/repr/core/position_iterator.hpp +124 -0
- pyurd-0.1.0/include/urd/repr/core/std_memory.hpp +120 -0
- pyurd-0.1.0/include/urd/repr/maps/bidirectional_csr.hpp +90 -0
- pyurd-0.1.0/include/urd/repr/maps/csr_multimap.hpp +24 -0
- pyurd-0.1.0/include/urd/repr/maps/dense_groups.hpp +117 -0
- pyurd-0.1.0/include/urd/repr/maps/dense_map_fwd.hpp +164 -0
- pyurd-0.1.0/include/urd/repr/maps/dense_multimap.hpp +24 -0
- pyurd-0.1.0/include/urd/repr/maps/flat_map.hpp +31 -0
- pyurd-0.1.0/include/urd/repr/maps/flat_map_fwd.hpp +87 -0
- pyurd-0.1.0/include/urd/repr/maps/grouped_fwd.hpp +183 -0
- pyurd-0.1.0/include/urd/repr/maps/grouped_multimap.hpp +255 -0
- pyurd-0.1.0/include/urd/repr/maps/index_groups.hpp +115 -0
- pyurd-0.1.0/include/urd/repr/maps/index_map.hpp +506 -0
- pyurd-0.1.0/include/urd/repr/maps/ordered_map.hpp +209 -0
- pyurd-0.1.0/include/urd/repr/maps/ordered_map_fwd.hpp +89 -0
- pyurd-0.1.0/include/urd/repr/maps/parallel_hash_map.hpp +135 -0
- pyurd-0.1.0/include/urd/repr/maps/parallel_hash_map_fwd.hpp +98 -0
- pyurd-0.1.0/include/urd/repr/maps/postings.hpp +403 -0
- pyurd-0.1.0/include/urd/repr/maps/std_map.hpp +178 -0
- pyurd-0.1.0/include/urd/repr/maps/unordered_flat_map.hpp +25 -0
- pyurd-0.1.0/include/urd/repr/maps/unordered_flat_map_fwd.hpp +49 -0
- pyurd-0.1.0/include/urd/repr/partitions/disjoint_sets.hpp +115 -0
- pyurd-0.1.0/include/urd/repr/partitions/disjoint_sets_fwd.hpp +48 -0
- pyurd-0.1.0/include/urd/repr/pools/pools.hpp +460 -0
- pyurd-0.1.0/include/urd/repr/pools/pools_fwd.hpp +181 -0
- pyurd-0.1.0/include/urd/repr/pools/tree_bitset.hpp +616 -0
- pyurd-0.1.0/include/urd/repr/pools/tree_vector.hpp +309 -0
- pyurd-0.1.0/include/urd/repr/queues/addressable_heap.hpp +182 -0
- pyurd-0.1.0/include/urd/repr/queues/bucket_queue.hpp +114 -0
- pyurd-0.1.0/include/urd/repr/queues/queue.hpp +129 -0
- pyurd-0.1.0/include/urd/repr/queues/queues_fwd.hpp +203 -0
- pyurd-0.1.0/include/urd/repr/queues/ring_fifo.hpp +156 -0
- pyurd-0.1.0/include/urd/repr/records/arena.hpp +129 -0
- pyurd-0.1.0/include/urd/repr/records/records.hpp +132 -0
- pyurd-0.1.0/include/urd/repr/records/records_fwd.hpp +163 -0
- pyurd-0.1.0/include/urd/repr/sequences/jagged.hpp +323 -0
- pyurd-0.1.0/include/urd/repr/sequences/row_pool.hpp +173 -0
- pyurd-0.1.0/include/urd/repr/sequences/rows_fwd.hpp +180 -0
- pyurd-0.1.0/include/urd/repr/sequences/segmented.hpp +29 -0
- pyurd-0.1.0/include/urd/repr/sequences/segmented_fwd.hpp +81 -0
- pyurd-0.1.0/include/urd/repr/sequences/sequence.hpp +55 -0
- pyurd-0.1.0/include/urd/repr/slots/slots.hpp +249 -0
- pyurd-0.1.0/include/urd/repr/slots/slots_fwd.hpp +86 -0
- pyurd-0.1.0/include/urd/repr/values/dense_set.hpp +362 -0
- pyurd-0.1.0/include/urd/repr/values/dense_set_fwd.hpp +157 -0
- pyurd-0.1.0/include/urd/repr/values/flat_set.hpp +41 -0
- pyurd-0.1.0/include/urd/repr/values/flat_set_fwd.hpp +94 -0
- pyurd-0.1.0/include/urd/repr/values/indexed.hpp +663 -0
- pyurd-0.1.0/include/urd/repr/values/indexed_fwd.hpp +145 -0
- pyurd-0.1.0/include/urd/repr/values/parallel_hash_set.hpp +32 -0
- pyurd-0.1.0/include/urd/repr/values/parallel_hash_set_fwd.hpp +103 -0
- pyurd-0.1.0/include/urd/repr/values/sparse_set.hpp +198 -0
- pyurd-0.1.0/include/urd/repr/values/std_set.hpp +109 -0
- pyurd-0.1.0/include/urd/repr/values/unordered_flat_set.hpp +25 -0
- pyurd-0.1.0/include/urd/repr/values/unordered_flat_set_fwd.hpp +49 -0
- pyurd-0.1.0/include/urd/repr/wrappers/layer.hpp +275 -0
- pyurd-0.1.0/include/urd/repr/wrappers/layered_fwd.hpp +70 -0
- pyurd-0.1.0/include/urd/repr/wrappers/layered_pool.hpp +311 -0
- pyurd-0.1.0/include/urd/repr/wrappers/recycling.hpp +281 -0
- pyurd-0.1.0/include/urd/repr/wrappers/recycling_fwd.hpp +152 -0
- pyurd-0.1.0/include/urd/repr/wrappers/scoped.hpp +227 -0
- pyurd-0.1.0/include/urd/repr/wrappers/scoped_fwd.hpp +122 -0
- pyurd-0.1.0/include/urd/spec.hpp +231 -0
- pyurd-0.1.0/include/urd/store/appending.hpp +85 -0
- pyurd-0.1.0/include/urd/store/assigning.hpp +41 -0
- pyurd-0.1.0/include/urd/store/capacity.hpp +35 -0
- pyurd-0.1.0/include/urd/store/contiguous_data.hpp +40 -0
- pyurd-0.1.0/include/urd/store/ends.hpp +66 -0
- pyurd-0.1.0/include/urd/store/entries.hpp +39 -0
- pyurd-0.1.0/include/urd/store/equality.hpp +40 -0
- pyurd-0.1.0/include/urd/store/grouping.hpp +47 -0
- pyurd-0.1.0/include/urd/store/insertion.hpp +67 -0
- pyurd-0.1.0/include/urd/store/inverse.hpp +30 -0
- pyurd-0.1.0/include/urd/store/iteration.hpp +89 -0
- pyurd-0.1.0/include/urd/store/layers.hpp +97 -0
- pyurd-0.1.0/include/urd/store/lookup.hpp +77 -0
- pyurd-0.1.0/include/urd/store/multi_values.hpp +39 -0
- pyurd-0.1.0/include/urd/store/ordered_lookup.hpp +43 -0
- pyurd-0.1.0/include/urd/store/ordering.hpp +43 -0
- pyurd-0.1.0/include/urd/store/pool.hpp +225 -0
- pyurd-0.1.0/include/urd/store/positions.hpp +137 -0
- pyurd-0.1.0/include/urd/store/queue_access.hpp +101 -0
- pyurd-0.1.0/include/urd/store/records.hpp +126 -0
- pyurd-0.1.0/include/urd/store/removal.hpp +85 -0
- pyurd-0.1.0/include/urd/store/scopes.hpp +53 -0
- pyurd-0.1.0/include/urd/store/set_algebra.hpp +89 -0
- pyurd-0.1.0/include/urd/store/shape.hpp +59 -0
- pyurd-0.1.0/include/urd/store/sizing.hpp +57 -0
- pyurd-0.1.0/include/urd/store/slots.hpp +180 -0
- pyurd-0.1.0/include/urd/store/store_facts.hpp +51 -0
- pyurd-0.1.0/include/urd/store/types.hpp +170 -0
- pyurd-0.1.0/include/urd/store/values_by_key.hpp +110 -0
- pyurd-0.1.0/include/urd/store.hpp +266 -0
- pyurd-0.1.0/include/urd/tags.hpp +1226 -0
- pyurd-0.1.0/include/urd/testing/allocations.cpp +51 -0
- pyurd-0.1.0/include/urd/testing/allocations.hpp +91 -0
- pyurd-0.1.0/include/urd/traits.hpp +70 -0
- pyurd-0.1.0/include/urd/type_traits_of.hpp +200 -0
- pyurd-0.1.0/peachycheck.yml +5 -0
- pyurd-0.1.0/pyproject.toml +66 -0
- pyurd-0.1.0/python/CMakeLists.txt +37 -0
- pyurd-0.1.0/python/pyurd_build_backend.py +17 -0
- pyurd-0.1.0/python/src/pyurd/__init__.py +95 -0
- pyurd-0.1.0/python/src/pyurd/__main__.py +51 -0
- pyurd-0.1.0/python/src/pyurd/py.typed +0 -0
- pyurd-0.1.0/python/src/pyurd/repair.py +95 -0
- pyurd-0.1.0/python/tests/test_build_backend.py +55 -0
- pyurd-0.1.0/python/tests/test_build_backend_smoke.py +122 -0
- pyurd-0.1.0/python/tests/test_corresponding_source.py +70 -0
- pyurd-0.1.0/python/tests/test_native.py +242 -0
- pyurd-0.1.0/python/tests/test_repair.py +44 -0
- pyurd-0.1.0/share/urd/complexity.json +85 -0
- pyurd-0.1.0/share/urd/vocabulary.json +78 -0
- pyurd-0.1.0/tests/.clang-tidy +22 -0
- pyurd-0.1.0/tests/CMakeLists.txt +257 -0
- pyurd-0.1.0/tests/all_containers.hpp +42 -0
- pyurd-0.1.0/tests/budget/bare.cpp +5 -0
- pyurd-0.1.0/tests/budget.py +45 -0
- pyurd-0.1.0/tests/children.cpp +178 -0
- pyurd-0.1.0/tests/compile_fail_include.cpp +120 -0
- pyurd-0.1.0/tests/compile_fail_store.cpp +246 -0
- pyurd-0.1.0/tests/complexity.hpp +201 -0
- pyurd-0.1.0/tests/complexity_table.cpp +239 -0
- pyurd-0.1.0/tests/concurrency.cpp +558 -0
- pyurd-0.1.0/tests/consumer/CMakeLists.txt +9 -0
- pyurd-0.1.0/tests/consumer/main.cpp +17 -0
- pyurd-0.1.0/tests/container.cpp +66 -0
- pyurd-0.1.0/tests/elements.hpp +44 -0
- pyurd-0.1.0/tests/format.hpp +25 -0
- pyurd-0.1.0/tests/generated.hpp +76 -0
- pyurd-0.1.0/tests/generic.py +53 -0
- pyurd-0.1.0/tests/grid.hpp +374 -0
- pyurd-0.1.0/tests/names.hpp +261 -0
- pyurd-0.1.0/tests/pools.cpp +523 -0
- pyurd-0.1.0/tests/properties.cpp +172 -0
- pyurd-0.1.0/tests/properties.hpp +465 -0
- pyurd-0.1.0/tests/python/caster_headers.cpp +11 -0
- pyurd-0.1.0/tests/python/casters.py +60 -0
- pyurd-0.1.0/tests/python/casters_module.cpp +94 -0
- pyurd-0.1.0/tests/python/views.py +77 -0
- pyurd-0.1.0/tests/python/views_module.cpp +68 -0
- pyurd-0.1.0/tests/queues.cpp +214 -0
- pyurd-0.1.0/tests/repr/containers/bit.cpp +76 -0
- pyurd-0.1.0/tests/repr/containers/bitset_span.cpp +300 -0
- pyurd-0.1.0/tests/repr/containers/segmented_vector.cpp +258 -0
- pyurd-0.1.0/tests/repr/containers/tree_bitset_set.cpp +321 -0
- pyurd-0.1.0/tests/repr/containers/tree_vector_set.cpp +219 -0
- pyurd-0.1.0/tests/repr/main.cpp +26 -0
- pyurd-0.1.0/tests/request.hpp +103 -0
- pyurd-0.1.0/tests/requests.hpp +60 -0
- pyurd-0.1.0/tests/requests_group.cpp +90 -0
- pyurd-0.1.0/tests/requests_table.cpp +192 -0
- pyurd-0.1.0/tests/resolution_table.cpp +179 -0
- pyurd-0.1.0/tests/rows.cpp +188 -0
- pyurd-0.1.0/tests/scaling/one.cpp +19 -0
- pyurd-0.1.0/tests/scaling.py +80 -0
- pyurd-0.1.0/tests/semantics.cpp +661 -0
- pyurd-0.1.0/tests/shortfall.cpp +59 -0
- pyurd-0.1.0/tests/store/incomplete.cpp +112 -0
- pyurd-0.1.0/tests/store/maps.cpp +413 -0
- pyurd-0.1.0/tests/store/multimaps.cpp +286 -0
- pyurd-0.1.0/tests/store/outside_kind.cpp +199 -0
- pyurd-0.1.0/tests/store/owners.cpp +268 -0
- pyurd-0.1.0/tests/store/pools.cpp +259 -0
- pyurd-0.1.0/tests/store/prehashed.cpp +246 -0
- pyurd-0.1.0/tests/store/queues.cpp +127 -0
- pyurd-0.1.0/tests/store/row_pools.cpp +378 -0
- pyurd-0.1.0/tests/store/rows.cpp +267 -0
- pyurd-0.1.0/tests/store/rules.cpp +223 -0
- pyurd-0.1.0/tests/store/scopes.cpp +301 -0
- pyurd-0.1.0/tests/store/sequences.cpp +47 -0
- pyurd-0.1.0/tests/store/sets.cpp +496 -0
- pyurd-0.1.0/tests/verify/common.hpp +153 -0
- pyurd-0.1.0/tests/verify/maps.hpp +308 -0
- pyurd-0.1.0/tests/verify/pools.hpp +310 -0
- pyurd-0.1.0/tests/verify/queues.hpp +117 -0
- pyurd-0.1.0/tests/verify/records.hpp +231 -0
- pyurd-0.1.0/tests/verify/sequences.hpp +340 -0
- pyurd-0.1.0/tests/verify.hpp +29 -0
- pyurd-0.1.0/tests/views.cpp +538 -0
- pyurd-0.1.0/tests/vocabulary_table.cpp +144 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
AccessModifierOffset: -4
|
|
3
|
+
AlignAfterOpenBracket: Align
|
|
4
|
+
AlignEscapedNewlines: Left
|
|
5
|
+
AlignOperands: 'true'
|
|
6
|
+
AlignTrailingComments: 'true'
|
|
7
|
+
AllowAllArgumentsOnNextLine: 'false'
|
|
8
|
+
AllowAllConstructorInitializersOnNextLine: 'false'
|
|
9
|
+
AllowAllParametersOfDeclarationOnNextLine: 'false'
|
|
10
|
+
AllowShortBlocksOnASingleLine: 'true'
|
|
11
|
+
AllowShortCaseLabelsOnASingleLine: 'false'
|
|
12
|
+
AllowShortFunctionsOnASingleLine: All
|
|
13
|
+
AllowShortIfStatementsOnASingleLine: Never
|
|
14
|
+
AllowShortLambdasOnASingleLine: All
|
|
15
|
+
AllowShortLoopsOnASingleLine: 'false'
|
|
16
|
+
AlwaysBreakTemplateDeclarations: 'Yes'
|
|
17
|
+
BinPackArguments: 'false'
|
|
18
|
+
BinPackParameters: 'false'
|
|
19
|
+
BreakBeforeBinaryOperators: NonAssignment
|
|
20
|
+
BreakBeforeBraces: Allman
|
|
21
|
+
BreakBeforeTernaryOperators: 'false'
|
|
22
|
+
BreakConstructorInitializers: AfterColon
|
|
23
|
+
BreakInheritanceList: AfterColon
|
|
24
|
+
ColumnLimit: '160'
|
|
25
|
+
CompactNamespaces: 'false'
|
|
26
|
+
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
|
|
27
|
+
Cpp11BracedListStyle: 'false'
|
|
28
|
+
FixNamespaceComments: 'false'
|
|
29
|
+
IncludeBlocks: Regroup
|
|
30
|
+
IndentAccessModifiers: 'false'
|
|
31
|
+
IndentCaseLabels: 'true'
|
|
32
|
+
IndentPPDirectives: None
|
|
33
|
+
IndentWidth: '4'
|
|
34
|
+
IndentWrappedFunctionNames: 'false'
|
|
35
|
+
KeepEmptyLinesAtTheStartOfBlocks: 'false'
|
|
36
|
+
Language: Cpp
|
|
37
|
+
MaxEmptyLinesToKeep: '1'
|
|
38
|
+
NamespaceIndentation: None
|
|
39
|
+
PointerAlignment: Left
|
|
40
|
+
SortIncludes: 'true'
|
|
41
|
+
SortUsingDeclarations: 'true'
|
|
42
|
+
SpaceAfterCStyleCast: 'true'
|
|
43
|
+
SpaceAfterLogicalNot: 'false'
|
|
44
|
+
SpaceAfterTemplateKeyword: 'false'
|
|
45
|
+
SpaceBeforeAssignmentOperators: 'true'
|
|
46
|
+
SpaceBeforeCpp11BracedList: 'true'
|
|
47
|
+
SpaceBeforeCtorInitializerColon: 'true'
|
|
48
|
+
SpaceBeforeInheritanceColon: 'true'
|
|
49
|
+
SpaceBeforeParens: ControlStatements
|
|
50
|
+
SpaceBeforeRangeBasedForLoopColon: 'true'
|
|
51
|
+
SpaceInEmptyParentheses: 'false'
|
|
52
|
+
SpacesBeforeTrailingComments: '2'
|
|
53
|
+
SpacesInAngles: 'false'
|
|
54
|
+
SpacesInCStyleCastParentheses: 'false'
|
|
55
|
+
SpacesInParentheses: 'false'
|
|
56
|
+
SpacesInSquareBrackets: 'false'
|
|
57
|
+
Standard: Cpp11
|
|
58
|
+
TabWidth: '4'
|
|
59
|
+
UseTab: Never
|
|
60
|
+
...
|
pyurd-0.1.0/.clang-tidy
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# clang-tidy for peachycheck: every bugprone, cppcoreguidelines and performance check is on,
|
|
2
|
+
# except where the check is wrong for any code, not just for today's:
|
|
3
|
+
# - unchecked container access, constant array index: the only fix, .at(), puts a bounds
|
|
4
|
+
# check into hot loops. Debug builds check those bounds instead: CMakeLists.txt defines
|
|
5
|
+
# _GLIBCXX_ASSERTIONS, so operator[] of std::vector, std::array and
|
|
6
|
+
# std::span asserts its index there, at no cost in Release;
|
|
7
|
+
# - std-namespace-modification: std::ranges::enable_borrowed_range must be specialized in std;
|
|
8
|
+
# - easily-swappable-parameters: a heuristic without a clear fix;
|
|
9
|
+
# - pro-type-reinterpret-cast: byte storage views its bytes as objects (reinterpret_cast plus
|
|
10
|
+
# std::launder); casting through void* instead stays forbidden (bugprone-casting-through-void);
|
|
11
|
+
# - avoid-c-arrays: std::unique_ptr<T[]> with make_unique_for_overwrite is the uninitialized buffer,
|
|
12
|
+
# which std::vector would zero;
|
|
13
|
+
# - pro-type-const-cast: std::atomic_ref of a const object needs C++26; until then atomic loads of
|
|
14
|
+
# const blocks cast;
|
|
15
|
+
# - crtp-constructor-accessibility: private mixin constructors break inheriting constructors
|
|
16
|
+
# (using Base::Base) and aggregate initialization of derived types.
|
|
17
|
+
# From the other families, the checks that find defects rather than enforce a style: the static
|
|
18
|
+
# analyzer (clang-analyzer-*), concurrency, include cycles, redundant expressions, external linkage
|
|
19
|
+
# of file-local functions, discarded results, nested namespace syntax, C-style casts, declarations
|
|
20
|
+
# whose parameter names differ from the definition, non-inline definitions in headers (ODR), ignored
|
|
21
|
+
# C return values, dead code (unused declarations and parameters, redundant declarations and casts,
|
|
22
|
+
# member functions that could be const) and the modern forms that rule out a defect class (override,
|
|
23
|
+
# nullptr, make_unique, deleted and defaulted members, misleading identifiers and indentation). Not
|
|
24
|
+
# misc-const-correctness: in templates it reports variables as never modified that an overload
|
|
25
|
+
# chosen at instantiation does modify (hash_combine's seed, fold-expression counters); following it
|
|
26
|
+
# made hash_combine recurse forever.
|
|
27
|
+
# Not google-explicit-constructor: the standard library's own idioms need implicit conversions
|
|
28
|
+
# that it forbids, with no option to allow them: proxy references convert to their value (as
|
|
29
|
+
# std::vector<bool>::reference does, and iterator concepts require it), and views of mutable
|
|
30
|
+
# elements convert to views of const ones (as std::span does).
|
|
31
|
+
# Not portability-template-virtual-member-function: it warns that other compilers (MSVC)
|
|
32
|
+
# instantiate unused virtual members of class templates; the libraries build only with GCC and
|
|
33
|
+
# Clang (Linux and macOS), which instantiate only what is used, so no build can check a fix.
|
|
34
|
+
# tests/ turns off more in its own file, with its reasons.
|
|
35
|
+
Checks: >
|
|
36
|
+
-*,
|
|
37
|
+
bugprone-*,
|
|
38
|
+
cppcoreguidelines-*,
|
|
39
|
+
performance-*,
|
|
40
|
+
clang-analyzer-*,
|
|
41
|
+
concurrency-*,
|
|
42
|
+
misc-header-include-cycle,
|
|
43
|
+
misc-redundant-expression,
|
|
44
|
+
misc-use-internal-linkage,
|
|
45
|
+
modernize-use-nodiscard,
|
|
46
|
+
modernize-concat-nested-namespaces,
|
|
47
|
+
modernize-avoid-c-style-cast,
|
|
48
|
+
google-runtime-int,
|
|
49
|
+
readability-inconsistent-declaration-parameter-name,
|
|
50
|
+
misc-definitions-in-headers,
|
|
51
|
+
cert-err33-c,
|
|
52
|
+
misc-unused-using-decls,
|
|
53
|
+
misc-unused-alias-decls,
|
|
54
|
+
misc-unused-parameters,
|
|
55
|
+
readability-redundant-declaration,
|
|
56
|
+
readability-redundant-casting,
|
|
57
|
+
readability-redundant-string-cstr,
|
|
58
|
+
readability-make-member-function-const,
|
|
59
|
+
modernize-use-emplace,
|
|
60
|
+
modernize-use-equals-default,
|
|
61
|
+
modernize-use-equals-delete,
|
|
62
|
+
modernize-use-override,
|
|
63
|
+
modernize-use-nullptr,
|
|
64
|
+
modernize-use-using,
|
|
65
|
+
modernize-make-unique,
|
|
66
|
+
modernize-make-shared,
|
|
67
|
+
misc-misplaced-const,
|
|
68
|
+
misc-throw-by-value-catch-by-reference,
|
|
69
|
+
misc-unconventional-assign-operator,
|
|
70
|
+
misc-non-copyable-objects,
|
|
71
|
+
misc-confusable-identifiers,
|
|
72
|
+
misc-misleading-bidirectional,
|
|
73
|
+
misc-misleading-identifier,
|
|
74
|
+
readability-misleading-indentation,
|
|
75
|
+
readability-duplicate-include,
|
|
76
|
+
readability-non-const-parameter,
|
|
77
|
+
hicpp-multiway-paths-covered,
|
|
78
|
+
-cppcoreguidelines-pro-bounds-avoid-unchecked-container-access,
|
|
79
|
+
-cppcoreguidelines-pro-bounds-constant-array-index,
|
|
80
|
+
-bugprone-std-namespace-modification,
|
|
81
|
+
-bugprone-easily-swappable-parameters,
|
|
82
|
+
-cppcoreguidelines-pro-type-reinterpret-cast,
|
|
83
|
+
-cppcoreguidelines-avoid-c-arrays,
|
|
84
|
+
-cppcoreguidelines-pro-type-const-cast,
|
|
85
|
+
-bugprone-crtp-constructor-accessibility
|
|
86
|
+
HeaderFilterRegex: '.*/(include/urd|tests|examples|benchmarks)/.*'
|
|
87
|
+
ExcludeHeaderFilterRegex: '.*/(dependencies-install|dependencies-build|build|site-packages|_deps)/.*'
|
|
88
|
+
CheckOptions:
|
|
89
|
+
# Member initializers are written `= value`, as elsewhere in the code.
|
|
90
|
+
cppcoreguidelines-use-default-member-init.UseAssignment: true
|
|
91
|
+
# Copying a reference-counted handle has a side effect (the count); it is not a wasted copy.
|
|
92
|
+
performance-unnecessary-copy-initialization.AllowedTypes: 'SharedObjectPoolPtr'
|
|
93
|
+
# Iterators are passed by value, as the standard library passes them; Boost's vector iterator declares its
|
|
94
|
+
# copy constructor, which makes the check take a pointer's copy for a costly one.
|
|
95
|
+
performance-unnecessary-value-param.AllowedTypes: 'iterator(_type)?$'
|
|
96
|
+
# URD_ASSUME (urd/config.hpp) must expand at its call site, like assert: the analysis
|
|
97
|
+
# of optionals sees a condition only in the function that states it, never through a call.
|
|
98
|
+
cppcoreguidelines-macro-usage.AllowedRegexp: '^URD_ASSUME$'
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
# main, and pull requests into it: the organization's ruleset lets main take only commits that passed `standards`.
|
|
4
|
+
on:
|
|
5
|
+
pull_request:
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build-and-test:
|
|
15
|
+
name: ${{ matrix.compiler }} ${{ matrix.build_type }}
|
|
16
|
+
runs-on: ubuntu-24.04
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
compiler: [g++, clang++]
|
|
21
|
+
build_type: [Debug, Release]
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Restore dependencies
|
|
26
|
+
id: dependencies
|
|
27
|
+
uses: actions/cache@v4
|
|
28
|
+
with:
|
|
29
|
+
path: dependencies-install
|
|
30
|
+
key: dependencies-${{ runner.os }}-${{ hashFiles('python/native/**') }}
|
|
31
|
+
|
|
32
|
+
- name: Build dependencies
|
|
33
|
+
if: steps.dependencies.outputs.cache-hit != 'true'
|
|
34
|
+
run: |
|
|
35
|
+
cmake -S python/native -B dependencies-build -DCMAKE_INSTALL_PREFIX="$PWD/dependencies-install" -DCMAKE_INSTALL_LIBDIR=lib
|
|
36
|
+
cmake --build dependencies-build
|
|
37
|
+
cmake --install dependencies-build
|
|
38
|
+
|
|
39
|
+
- name: Configure
|
|
40
|
+
run: >
|
|
41
|
+
cmake -S . -B build -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
|
|
42
|
+
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON
|
|
43
|
+
-DURD_BUILD_BENCHMARKS=${{ (matrix.compiler == 'g++' && matrix.build_type == 'Release') && 'ON' || 'OFF' }}
|
|
44
|
+
|
|
45
|
+
- name: Build
|
|
46
|
+
run: cmake --build build
|
|
47
|
+
|
|
48
|
+
- name: Test
|
|
49
|
+
run: ctest --test-dir build -j 4 --output-on-failure
|
|
50
|
+
|
|
51
|
+
thread-sanitizer:
|
|
52
|
+
name: ThreadSanitizer
|
|
53
|
+
runs-on: ubuntu-24.04
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v4
|
|
56
|
+
|
|
57
|
+
- name: Restore dependencies
|
|
58
|
+
id: dependencies
|
|
59
|
+
uses: actions/cache@v4
|
|
60
|
+
with:
|
|
61
|
+
path: dependencies-install
|
|
62
|
+
key: dependencies-${{ runner.os }}-${{ hashFiles('python/native/**') }}
|
|
63
|
+
|
|
64
|
+
- name: Build dependencies
|
|
65
|
+
if: steps.dependencies.outputs.cache-hit != 'true'
|
|
66
|
+
run: |
|
|
67
|
+
cmake -S python/native -B dependencies-build -DCMAKE_INSTALL_PREFIX="$PWD/dependencies-install" -DCMAKE_INSTALL_LIBDIR=lib
|
|
68
|
+
cmake --build dependencies-build
|
|
69
|
+
cmake --install dependencies-build
|
|
70
|
+
|
|
71
|
+
# ThreadSanitizer cannot map its shadow memory with the runner's default address randomization.
|
|
72
|
+
- name: Allow ThreadSanitizer's memory layout
|
|
73
|
+
run: sudo sysctl vm.mmap_rnd_bits=28
|
|
74
|
+
|
|
75
|
+
- name: Build with ThreadSanitizer
|
|
76
|
+
run: |
|
|
77
|
+
cmake -S . -B build -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug -DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
|
|
78
|
+
-DCMAKE_CXX_FLAGS=-fsanitize=thread -DCMAKE_EXE_LINKER_FLAGS=-fsanitize=thread
|
|
79
|
+
cmake --build build --target test_properties test_rows test_pools test_store_rules test_store_sets test_store_maps test_store_multimaps test_store_scopes test_store_queues test_store_pools test_store_rows test_concurrency example_sequences
|
|
80
|
+
|
|
81
|
+
# A data race makes ThreadSanitizer report and the program exit non-zero.
|
|
82
|
+
- name: Run concurrent code
|
|
83
|
+
env:
|
|
84
|
+
TSAN_OPTIONS: halt_on_error=1
|
|
85
|
+
run: |
|
|
86
|
+
build/tests/test_properties
|
|
87
|
+
build/tests/test_rows
|
|
88
|
+
build/tests/test_pools
|
|
89
|
+
build/tests/test_store_rules
|
|
90
|
+
build/tests/test_store_sets
|
|
91
|
+
build/tests/test_store_maps
|
|
92
|
+
build/tests/test_store_multimaps
|
|
93
|
+
build/tests/test_store_scopes
|
|
94
|
+
build/tests/test_store_queues
|
|
95
|
+
build/tests/test_store_pools
|
|
96
|
+
build/tests/test_store_rows
|
|
97
|
+
build/tests/test_concurrency
|
|
98
|
+
build/examples/example_sequences
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
name: CI Release
|
|
2
|
+
|
|
3
|
+
# Builds what the two releases publish, without publishing: pyurd-native's wheels and source distribution
|
|
4
|
+
# (release-native.yml) and, against the Linux wheel, pyurd's wheel and source distribution (release.yml).
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
- dev
|
|
11
|
+
pull_request:
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
env:
|
|
15
|
+
CMAKE_BUILD_PARALLEL_LEVEL: "2"
|
|
16
|
+
URD_JOBS: "2"
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build_native_sdist:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v6
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v6
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.13"
|
|
30
|
+
|
|
31
|
+
- name: Install build frontend
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install --upgrade pip
|
|
34
|
+
python -m pip install build
|
|
35
|
+
|
|
36
|
+
- name: Build source distribution
|
|
37
|
+
run: python -m build --sdist python --outdir native-dist
|
|
38
|
+
|
|
39
|
+
- name: Upload sdist artifact
|
|
40
|
+
uses: actions/upload-artifact@v5
|
|
41
|
+
with:
|
|
42
|
+
name: native-sdist
|
|
43
|
+
path: native-dist/*.tar.gz
|
|
44
|
+
|
|
45
|
+
build_corresponding_source:
|
|
46
|
+
needs: build_native_sdist
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
|
|
49
|
+
steps:
|
|
50
|
+
- name: Checkout repository
|
|
51
|
+
uses: actions/checkout@v6
|
|
52
|
+
|
|
53
|
+
- name: Set up Python
|
|
54
|
+
uses: actions/setup-python@v6
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.13"
|
|
57
|
+
|
|
58
|
+
- name: Download source distribution
|
|
59
|
+
uses: actions/download-artifact@v5
|
|
60
|
+
with:
|
|
61
|
+
name: native-sdist
|
|
62
|
+
path: native-dist
|
|
63
|
+
|
|
64
|
+
- name: Download upstream sources
|
|
65
|
+
run: |
|
|
66
|
+
cmake -S python/native -B source-build \
|
|
67
|
+
-DCMAKE_INSTALL_PREFIX="$RUNNER_TEMP/urd-source-prefix" \
|
|
68
|
+
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
69
|
+
-DPython_EXECUTABLE="$(python -c 'import sys; print(sys.executable)')"
|
|
70
|
+
cmake --build source-build --target corresponding-source-downloads --parallel 2
|
|
71
|
+
|
|
72
|
+
- name: Build corresponding-source bundle
|
|
73
|
+
run: |
|
|
74
|
+
SDISTS=(native-dist/*.tar.gz)
|
|
75
|
+
test "${#SDISTS[@]}" -eq 1
|
|
76
|
+
test -f "${SDISTS[0]}"
|
|
77
|
+
SOURCE_ARCHIVE=${SDISTS[0]#native-dist/}
|
|
78
|
+
SOURCE_ARCHIVE=${SOURCE_ARCHIVE%.tar.gz}-corresponding-source.tar.gz
|
|
79
|
+
mkdir -p release-assets
|
|
80
|
+
python cmake/build_corresponding_source.py \
|
|
81
|
+
--manifest python/native/SOURCES.json \
|
|
82
|
+
--sdist "${SDISTS[0]}" \
|
|
83
|
+
--sources source-build \
|
|
84
|
+
--output "release-assets/${SOURCE_ARCHIVE}"
|
|
85
|
+
|
|
86
|
+
- name: Upload corresponding-source artifact
|
|
87
|
+
uses: actions/upload-artifact@v5
|
|
88
|
+
with:
|
|
89
|
+
name: corresponding-source
|
|
90
|
+
path: release-assets/*.tar.gz
|
|
91
|
+
|
|
92
|
+
build_native_wheels_linux:
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
strategy:
|
|
95
|
+
fail-fast: false
|
|
96
|
+
matrix:
|
|
97
|
+
architecture: ["x86_64"]
|
|
98
|
+
python-version: ["cp311"]
|
|
99
|
+
|
|
100
|
+
steps:
|
|
101
|
+
- name: Checkout repository
|
|
102
|
+
uses: actions/checkout@v6
|
|
103
|
+
|
|
104
|
+
- name: Set up Python
|
|
105
|
+
uses: actions/setup-python@v6
|
|
106
|
+
with:
|
|
107
|
+
python-version: "3.13"
|
|
108
|
+
|
|
109
|
+
- name: Install cibuildwheel
|
|
110
|
+
run: |
|
|
111
|
+
python -m pip install --upgrade pip
|
|
112
|
+
python -m pip install cibuildwheel
|
|
113
|
+
|
|
114
|
+
# python/ is pyurd-native's project; cibuildwheel copies the repository, from whose root it runs, into the container.
|
|
115
|
+
- name: Build Linux wheels
|
|
116
|
+
run: cibuildwheel python --output-dir wheelhouse
|
|
117
|
+
env:
|
|
118
|
+
CIBW_ENVIRONMENT: "URD_JOBS=2 CMAKE_BUILD_PARALLEL_LEVEL=2"
|
|
119
|
+
CIBW_PLATFORM: linux
|
|
120
|
+
CIBW_BUILD: "${{ matrix.python-version }}-*"
|
|
121
|
+
CIBW_SKIP: "*-musllinux_*"
|
|
122
|
+
CIBW_ARCHS: "${{ matrix.architecture }}"
|
|
123
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
124
|
+
|
|
125
|
+
- name: Upload Linux wheels artifact
|
|
126
|
+
uses: actions/upload-artifact@v5
|
|
127
|
+
with:
|
|
128
|
+
name: native-wheels-linux-${{ matrix.python-version }}-${{ matrix.architecture }}
|
|
129
|
+
path: wheelhouse/*.whl
|
|
130
|
+
|
|
131
|
+
build_native_wheels_macos:
|
|
132
|
+
runs-on: macos-latest
|
|
133
|
+
strategy:
|
|
134
|
+
fail-fast: false
|
|
135
|
+
matrix:
|
|
136
|
+
architecture: ["arm64"]
|
|
137
|
+
python-version: ["cp311"]
|
|
138
|
+
|
|
139
|
+
steps:
|
|
140
|
+
- name: Checkout repository
|
|
141
|
+
uses: actions/checkout@v6
|
|
142
|
+
|
|
143
|
+
- name: Set up Python
|
|
144
|
+
uses: actions/setup-python@v6
|
|
145
|
+
with:
|
|
146
|
+
python-version: "3.13"
|
|
147
|
+
|
|
148
|
+
- name: Install cibuildwheel
|
|
149
|
+
run: |
|
|
150
|
+
python -m pip install --upgrade pip
|
|
151
|
+
python -m pip install cibuildwheel
|
|
152
|
+
|
|
153
|
+
- name: Build macOS wheels
|
|
154
|
+
run: cibuildwheel python --output-dir wheelhouse
|
|
155
|
+
env:
|
|
156
|
+
CIBW_ENVIRONMENT: "URD_JOBS=2 CMAKE_BUILD_PARALLEL_LEVEL=2"
|
|
157
|
+
CIBW_PLATFORM: macos
|
|
158
|
+
CIBW_BUILD: "${{ matrix.python-version }}-*"
|
|
159
|
+
CIBW_ARCHS: "${{ matrix.architecture }}"
|
|
160
|
+
CIBW_BUILD_VERBOSITY: "1"
|
|
161
|
+
|
|
162
|
+
- name: Upload macOS wheels artifact
|
|
163
|
+
uses: actions/upload-artifact@v5
|
|
164
|
+
with:
|
|
165
|
+
name: native-wheels-macos-${{ matrix.python-version }}-${{ matrix.architecture }}
|
|
166
|
+
path: wheelhouse/*.whl
|
|
167
|
+
|
|
168
|
+
# pyurd pins pyurd-native exactly; the wheel built above stands in for the one on PyPI.
|
|
169
|
+
build_pyurd:
|
|
170
|
+
needs: build_native_wheels_linux
|
|
171
|
+
runs-on: ubuntu-latest
|
|
172
|
+
|
|
173
|
+
steps:
|
|
174
|
+
- name: Checkout repository
|
|
175
|
+
uses: actions/checkout@v6
|
|
176
|
+
|
|
177
|
+
- name: Set up Python
|
|
178
|
+
uses: actions/setup-python@v6
|
|
179
|
+
with:
|
|
180
|
+
python-version: "3.13"
|
|
181
|
+
|
|
182
|
+
- name: Download the Linux pyurd-native wheel
|
|
183
|
+
uses: actions/download-artifact@v5
|
|
184
|
+
with:
|
|
185
|
+
name: native-wheels-linux-cp311-x86_64
|
|
186
|
+
path: native-wheels
|
|
187
|
+
|
|
188
|
+
- name: Install build frontend
|
|
189
|
+
run: |
|
|
190
|
+
python -m pip install --upgrade pip
|
|
191
|
+
python -m pip install build
|
|
192
|
+
|
|
193
|
+
- name: Build source distribution and wheel
|
|
194
|
+
run: python -m build
|
|
195
|
+
env:
|
|
196
|
+
PIP_FIND_LINKS: ${{ github.workspace }}/native-wheels
|
|
197
|
+
|
|
198
|
+
- name: Install the wheel and find urd through it
|
|
199
|
+
run: |
|
|
200
|
+
python -m pip install --find-links native-wheels dist/*.whl "cmake>=3.21"
|
|
201
|
+
mkdir -p "$RUNNER_TEMP/consumer"
|
|
202
|
+
printf '%s\n' 'cmake_minimum_required(VERSION 3.21)' 'project(consumer CXX)' 'find_package(urd CONFIG REQUIRED)' \
|
|
203
|
+
'add_library(consumer INTERFACE)' 'target_link_libraries(consumer INTERFACE urd::urd)' > "$RUNNER_TEMP/consumer/CMakeLists.txt"
|
|
204
|
+
cmake -S "$RUNNER_TEMP/consumer" -B "$RUNNER_TEMP/consumer/build" \
|
|
205
|
+
-DCMAKE_PREFIX_PATH="$(python -m pyurd --prefix);$(python -m pyurd_native --prefix)"
|
|
206
|
+
|
|
207
|
+
- name: Upload pyurd artifact
|
|
208
|
+
uses: actions/upload-artifact@v5
|
|
209
|
+
with:
|
|
210
|
+
name: pyurd
|
|
211
|
+
path: dist/*
|
|
212
|
+
|
|
213
|
+
validate_release:
|
|
214
|
+
needs:
|
|
215
|
+
- build_corresponding_source
|
|
216
|
+
- build_native_wheels_linux
|
|
217
|
+
- build_native_wheels_macos
|
|
218
|
+
- build_pyurd
|
|
219
|
+
runs-on: ubuntu-latest
|
|
220
|
+
|
|
221
|
+
steps:
|
|
222
|
+
- name: Download pyurd-native wheels
|
|
223
|
+
uses: actions/download-artifact@v5
|
|
224
|
+
with:
|
|
225
|
+
pattern: native-wheels-*
|
|
226
|
+
path: native-dist
|
|
227
|
+
merge-multiple: true
|
|
228
|
+
|
|
229
|
+
- name: Download pyurd-native source distribution
|
|
230
|
+
uses: actions/download-artifact@v5
|
|
231
|
+
with:
|
|
232
|
+
name: native-sdist
|
|
233
|
+
path: native-dist
|
|
234
|
+
|
|
235
|
+
- name: Download pyurd
|
|
236
|
+
uses: actions/download-artifact@v5
|
|
237
|
+
with:
|
|
238
|
+
name: pyurd
|
|
239
|
+
path: dist
|
|
240
|
+
|
|
241
|
+
- name: Download corresponding-source bundle
|
|
242
|
+
uses: actions/download-artifact@v5
|
|
243
|
+
with:
|
|
244
|
+
name: corresponding-source
|
|
245
|
+
path: release-assets
|
|
246
|
+
|
|
247
|
+
- name: Validate release assets
|
|
248
|
+
run: |
|
|
249
|
+
test "$(find native-dist -maxdepth 1 -type f -name 'pyurd_native-*.whl' | wc -l)" -eq 2
|
|
250
|
+
test "$(find native-dist -maxdepth 1 -type f -name 'pyurd_native-*.tar.gz' | wc -l)" -eq 1
|
|
251
|
+
test "$(find dist -maxdepth 1 -type f -name 'pyurd-*.tar.gz' | wc -l)" -eq 1
|
|
252
|
+
test "$(find dist -maxdepth 1 -type f -name 'pyurd-*-py3-none-any.whl' | wc -l)" -eq 1
|
|
253
|
+
test "$(find release-assets -maxdepth 1 -type f -name '*-corresponding-source.tar.gz' | wc -l)" -eq 1
|
|
254
|
+
tar -tzf release-assets/*-corresponding-source.tar.gz >/dev/null
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
# The documentation (docs/, Sphinx), built with warnings as errors on every pull request; main's is published on
|
|
4
|
+
# GitHub Pages (https://planning-and-learning.github.io/urd/), where the README links.
|
|
5
|
+
on:
|
|
6
|
+
pull_request:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
concurrency:
|
|
15
|
+
group: docs-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-24.04
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
# The category diagrams are drawn by Graphviz's dot.
|
|
24
|
+
- run: sudo apt-get update && sudo apt-get install -y graphviz
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.12"
|
|
28
|
+
- run: pip install -r docs/requirements.txt
|
|
29
|
+
- run: sphinx-build -W --keep-going -b html docs build/docs/html
|
|
30
|
+
- uses: actions/upload-pages-artifact@v3
|
|
31
|
+
if: github.ref == 'refs/heads/main'
|
|
32
|
+
with:
|
|
33
|
+
path: build/docs/html
|
|
34
|
+
|
|
35
|
+
deploy:
|
|
36
|
+
if: github.ref == 'refs/heads/main'
|
|
37
|
+
needs: build
|
|
38
|
+
runs-on: ubuntu-24.04
|
|
39
|
+
permissions:
|
|
40
|
+
pages: write
|
|
41
|
+
id-token: write
|
|
42
|
+
environment:
|
|
43
|
+
name: github-pages
|
|
44
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
45
|
+
steps:
|
|
46
|
+
- id: deployment
|
|
47
|
+
uses: actions/deploy-pages@v4
|