openscad-cpp-evaluator 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.
- openscad_cpp_evaluator-0.1.0/.github/workflows/ci.yml +67 -0
- openscad_cpp_evaluator-0.1.0/.github/workflows/wheels.yml +152 -0
- openscad_cpp_evaluator-0.1.0/.gitignore +6 -0
- openscad_cpp_evaluator-0.1.0/.gitmodules +3 -0
- openscad_cpp_evaluator-0.1.0/CLAUDE.md +929 -0
- openscad_cpp_evaluator-0.1.0/CMakeLists.txt +183 -0
- openscad_cpp_evaluator-0.1.0/LICENSE +21 -0
- openscad_cpp_evaluator-0.1.0/PKG-INFO +111 -0
- openscad_cpp_evaluator-0.1.0/README.md +91 -0
- openscad_cpp_evaluator-0.1.0/bindings/CMakeLists.txt +26 -0
- openscad_cpp_evaluator-0.1.0/bindings/module.cpp +368 -0
- openscad_cpp_evaluator-0.1.0/examples/CMakeLists.txt +20 -0
- openscad_cpp_evaluator-0.1.0/examples/eval_perf_benchmark.cpp +78 -0
- openscad_cpp_evaluator-0.1.0/examples/manifold_cache_reuse.cpp +79 -0
- openscad_cpp_evaluator-0.1.0/examples/minimal_debugger.cpp +124 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/.github/workflows/ci.yml +47 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/.gitignore +1 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/CLAUDE.md +109 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/CMakeLists.txt +77 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/README.md +139 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/api.hpp +103 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/ast_node.hpp +139 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/comments.hpp +38 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/declarations.hpp +71 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/expression.hpp +345 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/module_instantiation.hpp +162 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/scope_builder.hpp +27 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast/vector_element.hpp +124 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/ast.hpp +12 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/comments.hpp +27 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/position.hpp +20 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/pretty_print.hpp +16 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/scope.hpp +99 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/serialization.hpp +35 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/include/openscad_cpp_parser/source_map.hpp +72 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/CMakeLists.txt +44 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/api.cpp +245 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/ast_node.cpp +77 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/declarations.cpp +80 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/expression.cpp +336 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/format_utils.hpp +35 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/module_instantiation.cpp +205 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/scope_builder.cpp +28 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/ast/vector_element.cpp +96 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/comment_attach_internal.hpp +38 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/comments.cpp +204 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/grammar/driver.cpp +222 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/grammar/driver.hpp +137 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/grammar/lexer.l +165 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/grammar/lexer_api.hpp +12 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/grammar/oscad_location.hpp +20 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/grammar/parser.y +478 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/inline_comment_attach.cpp +672 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/position.cpp +10 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/pretty_print.cpp +924 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/scope.cpp +25 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/serialization/json_io.cpp +674 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/serialization/yaml_io.cpp +279 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/src/source_map.cpp +426 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/CMakeLists.txt +32 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_assignments.cpp +170 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_ast_generation.cpp +435 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_comments_and_files.cpp +140 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_const_borrow.cpp +69 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_control.cpp +265 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_expressions.cpp +277 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_functions.cpp +205 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_helpers.hpp +24 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_inline_comments.cpp +282 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_lexical.cpp +365 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_modules.cpp +386 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_node_str.cpp +235 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_pretty_print.cpp +517 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_scope.cpp +757 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_serialization.cpp +85 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_smoke.cpp +114 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_source_map.cpp +114 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_use_include.cpp +101 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tests/test_vectors.cpp +368 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tools/cli/CMakeLists.txt +2 -0
- openscad_cpp_evaluator-0.1.0/external/openscad_cpp_parser/tools/cli/main.cpp +156 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/bound_args.hpp +58 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/bundled_font_path.hpp.in +6 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/bytecode.hpp +267 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/bytecode_compiler.hpp +22 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/bytecode_vm.hpp +107 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/call_args.hpp +100 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/colored_body.hpp +52 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/csg_node.hpp +47 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/css_colors.hpp +19 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/debug_hooks.hpp +131 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/debug_repl.hpp +228 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/dispatch.hpp +70 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/dxf_svg_import.hpp +27 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/eval_context.hpp +116 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/eval_error.hpp +111 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/eval_use.hpp +51 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/evaluator.hpp +852 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/export.hpp +39 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/font_provider.hpp +73 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/function_builtins.hpp +57 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/import_builtin.hpp +20 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/manifold_cache.hpp +58 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/mesh_import.hpp +27 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/osc_range.hpp +19 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/profile.hpp +43 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/scope_trail.hpp +487 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/segments.hpp +19 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/stb_font_provider.hpp +31 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/surface_load.hpp +16 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/text_metrics.hpp +36 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/value.hpp +287 -0
- openscad_cpp_evaluator-0.1.0/include/openscad_cpp_evaluator/zip_stored.hpp +46 -0
- openscad_cpp_evaluator-0.1.0/pyproject.toml +47 -0
- openscad_cpp_evaluator-0.1.0/python/openscad_cpp_evaluator/__init__.py +207 -0
- openscad_cpp_evaluator-0.1.0/resources/fonts/LICENSE +102 -0
- openscad_cpp_evaluator-0.1.0/resources/fonts/LiberationSans-Regular.ttf +0 -0
- openscad_cpp_evaluator-0.1.0/src/CMakeLists.txt +54 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/booleans.cpp +241 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/builtins.hpp +177 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/call_args.cpp +134 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/color.cpp +58 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/control.cpp +176 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/extrude.cpp +194 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/function_builtins.cpp +646 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/import.cpp +307 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/modifiers.cpp +35 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/primitives_2d.cpp +135 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/primitives_3d.cpp +294 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/registry.cpp +81 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/roof.cpp +464 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/segments.cpp +31 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/surface.cpp +132 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/text.cpp +100 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/topology.cpp +114 -0
- openscad_cpp_evaluator-0.1.0/src/builtins/transforms.cpp +201 -0
- openscad_cpp_evaluator-0.1.0/src/bytecode_compiler.cpp +830 -0
- openscad_cpp_evaluator-0.1.0/src/bytecode_vm.cpp +667 -0
- openscad_cpp_evaluator-0.1.0/src/colored_body.cpp +45 -0
- openscad_cpp_evaluator-0.1.0/src/csg_generate.cpp +82 -0
- openscad_cpp_evaluator-0.1.0/src/csg_resolve.cpp +232 -0
- openscad_cpp_evaluator-0.1.0/src/css_colors.cpp +208 -0
- openscad_cpp_evaluator-0.1.0/src/debug/debug_repl.cpp +675 -0
- openscad_cpp_evaluator-0.1.0/src/debug_profile.cpp +175 -0
- openscad_cpp_evaluator-0.1.0/src/eval_context.cpp +73 -0
- openscad_cpp_evaluator-0.1.0/src/eval_error.cpp +50 -0
- openscad_cpp_evaluator-0.1.0/src/eval_use.cpp +93 -0
- openscad_cpp_evaluator-0.1.0/src/export.cpp +226 -0
- openscad_cpp_evaluator-0.1.0/src/expr_eval.cpp +692 -0
- openscad_cpp_evaluator-0.1.0/src/import/dxf_import.cpp +115 -0
- openscad_cpp_evaluator-0.1.0/src/import/mesh_import.cpp +237 -0
- openscad_cpp_evaluator-0.1.0/src/import/surface_load.cpp +76 -0
- openscad_cpp_evaluator-0.1.0/src/import/svg_import.cpp +468 -0
- openscad_cpp_evaluator-0.1.0/src/manifold_cache.cpp +134 -0
- openscad_cpp_evaluator-0.1.0/src/stmt_eval.cpp +248 -0
- openscad_cpp_evaluator-0.1.0/src/text/stb_font_provider.cpp +174 -0
- openscad_cpp_evaluator-0.1.0/src/text/text_metrics.cpp +87 -0
- openscad_cpp_evaluator-0.1.0/src/user_calls.cpp +623 -0
- openscad_cpp_evaluator-0.1.0/src/value.cpp +366 -0
- openscad_cpp_evaluator-0.1.0/src/zip_stored.cpp +310 -0
- openscad_cpp_evaluator-0.1.0/tests/CMakeLists.txt +44 -0
- openscad_cpp_evaluator-0.1.0/tests/test_booleans.cpp +175 -0
- openscad_cpp_evaluator-0.1.0/tests/test_bytecode_compiler.cpp +693 -0
- openscad_cpp_evaluator-0.1.0/tests/test_cli.cpp +918 -0
- openscad_cpp_evaluator-0.1.0/tests/test_control_flow.cpp +972 -0
- openscad_cpp_evaluator-0.1.0/tests/test_csg_tree.cpp +157 -0
- openscad_cpp_evaluator-0.1.0/tests/test_debug_hooks.cpp +170 -0
- openscad_cpp_evaluator-0.1.0/tests/test_dxf_svg_import.cpp +421 -0
- openscad_cpp_evaluator-0.1.0/tests/test_eval_context.cpp +125 -0
- openscad_cpp_evaluator-0.1.0/tests/test_export.cpp +123 -0
- openscad_cpp_evaluator-0.1.0/tests/test_expr_eval.cpp +541 -0
- openscad_cpp_evaluator-0.1.0/tests/test_extrude_roof.cpp +245 -0
- openscad_cpp_evaluator-0.1.0/tests/test_function_builtins.cpp +423 -0
- openscad_cpp_evaluator-0.1.0/tests/test_helpers.hpp +67 -0
- openscad_cpp_evaluator-0.1.0/tests/test_import_export.cpp +265 -0
- openscad_cpp_evaluator-0.1.0/tests/test_manifold_cache.cpp +201 -0
- openscad_cpp_evaluator-0.1.0/tests/test_multi_color_merge.cpp +111 -0
- openscad_cpp_evaluator-0.1.0/tests/test_primitives.cpp +146 -0
- openscad_cpp_evaluator-0.1.0/tests/test_profiling.cpp +127 -0
- openscad_cpp_evaluator-0.1.0/tests/test_scoping.cpp +185 -0
- openscad_cpp_evaluator-0.1.0/tests/test_surface.cpp +132 -0
- openscad_cpp_evaluator-0.1.0/tests/test_tail_calls.cpp +228 -0
- openscad_cpp_evaluator-0.1.0/tests/test_text.cpp +152 -0
- openscad_cpp_evaluator-0.1.0/tests/test_transforms.cpp +296 -0
- openscad_cpp_evaluator-0.1.0/tests/test_use.cpp +116 -0
- openscad_cpp_evaluator-0.1.0/tests/test_value.cpp +379 -0
- openscad_cpp_evaluator-0.1.0/tests/test_viewport_params.cpp +101 -0
- openscad_cpp_evaluator-0.1.0/tests/test_zip_stored.cpp +171 -0
- openscad_cpp_evaluator-0.1.0/tools/cli/CMakeLists.txt +9 -0
- openscad_cpp_evaluator-0.1.0/tools/cli/cli_lib.cpp +400 -0
- openscad_cpp_evaluator-0.1.0/tools/cli/cli_lib.hpp +24 -0
- openscad_cpp_evaluator-0.1.0/tools/cli/main.cpp +9 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
strategy:
|
|
11
|
+
fail-fast: false
|
|
12
|
+
matrix:
|
|
13
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
14
|
+
runs-on: ${{ matrix.os }}
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
with:
|
|
18
|
+
submodules: recursive
|
|
19
|
+
|
|
20
|
+
- name: Install bison/flex (Linux)
|
|
21
|
+
if: runner.os == 'Linux'
|
|
22
|
+
run: sudo apt-get update && sudo apt-get install -y bison flex
|
|
23
|
+
|
|
24
|
+
- name: Install bison/flex (macOS)
|
|
25
|
+
if: runner.os == 'macOS'
|
|
26
|
+
# The hosted macOS runner image ships with an untrusted `aws/tap`
|
|
27
|
+
# pre-tapped (unrelated to anything this workflow uses) -- any brew
|
|
28
|
+
# command then prints a "taps are not trusted" warning for it.
|
|
29
|
+
# Untap it first (non-fatal: `|| true` in case a future runner
|
|
30
|
+
# image doesn't have it) rather than reaching for the deprecated
|
|
31
|
+
# HOMEBREW_NO_REQUIRE_TAP_TRUST escape hatch.
|
|
32
|
+
run: |
|
|
33
|
+
brew untap aws/tap || true
|
|
34
|
+
brew install bison flex
|
|
35
|
+
|
|
36
|
+
- name: Install bison/flex (Windows)
|
|
37
|
+
if: runner.os == 'Windows'
|
|
38
|
+
# windows-latest ships MSYS2 pre-installed at C:\msys64 (not on
|
|
39
|
+
# PATH). Its bison (3.8.2+) satisfies the submodule grammar's
|
|
40
|
+
# %require "3.8" -- the Chocolatey winflexbison3 package is stuck
|
|
41
|
+
# on bison 3.7.4 and fails that check. The submodule's own
|
|
42
|
+
# CMakeLists.txt WIN32 block points BISON_EXECUTABLE/
|
|
43
|
+
# FLEX_EXECUTABLE straight at the MSYS2 binaries.
|
|
44
|
+
run: C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm bison flex"
|
|
45
|
+
|
|
46
|
+
- name: Configure
|
|
47
|
+
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
|
|
48
|
+
|
|
49
|
+
# --config/-C Release: a no-op on the single-config generators
|
|
50
|
+
# Linux/macOS use (CMAKE_BUILD_TYPE already picked the config), but
|
|
51
|
+
# required on Windows's default multi-config Visual Studio
|
|
52
|
+
# generator, which ignores CMAKE_BUILD_TYPE entirely.
|
|
53
|
+
- name: Build
|
|
54
|
+
run: cmake --build build --config Release -j
|
|
55
|
+
|
|
56
|
+
# Bytecode VM on (the default as of the Phase 5 rollout decision --
|
|
57
|
+
# see evaluator.hpp's own bytecodeVmEnabled() comment) and off
|
|
58
|
+
# (OSCAD_BYTECODE_VM=0), so a regression in either the compiled or
|
|
59
|
+
# the interpreted path fails CI, not just whichever happens to be
|
|
60
|
+
# default at the time.
|
|
61
|
+
- name: Test (bytecode VM on, the default)
|
|
62
|
+
run: ctest --test-dir build --output-on-failure -C Release
|
|
63
|
+
|
|
64
|
+
- name: Test (bytecode VM off)
|
|
65
|
+
run: ctest --test-dir build --output-on-failure -C Release
|
|
66
|
+
env:
|
|
67
|
+
OSCAD_BYTECODE_VM: "0"
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
name: Wheels
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- 'v*'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
sdist:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v7
|
|
14
|
+
with:
|
|
15
|
+
submodules: recursive
|
|
16
|
+
|
|
17
|
+
- name: Build sdist
|
|
18
|
+
run: pipx run build --sdist
|
|
19
|
+
|
|
20
|
+
- name: Check metadata
|
|
21
|
+
run: pipx run twine check dist/*
|
|
22
|
+
|
|
23
|
+
- uses: actions/upload-artifact@v7
|
|
24
|
+
with:
|
|
25
|
+
name: sdist
|
|
26
|
+
path: dist/*.tar.gz
|
|
27
|
+
|
|
28
|
+
build_wheels:
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
include:
|
|
33
|
+
- runner: ubuntu-latest
|
|
34
|
+
name: manylinux-x86_64
|
|
35
|
+
- runner: ubuntu-24.04-arm
|
|
36
|
+
name: manylinux-aarch64
|
|
37
|
+
- runner: macos-latest
|
|
38
|
+
name: macos-arm64
|
|
39
|
+
- runner: macos-15-intel
|
|
40
|
+
name: macos-x86_64
|
|
41
|
+
- runner: windows-latest
|
|
42
|
+
name: windows-x86_64
|
|
43
|
+
runs-on: ${{ matrix.runner }}
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v7
|
|
46
|
+
with:
|
|
47
|
+
submodules: recursive
|
|
48
|
+
|
|
49
|
+
- name: Build wheel
|
|
50
|
+
uses: pypa/cibuildwheel@v4.1.1
|
|
51
|
+
env:
|
|
52
|
+
# STABLE_ABI (bindings/CMakeLists.txt) needs CPython >=3.12; build
|
|
53
|
+
# once against cp312 and the resulting abi3 wheel covers every
|
|
54
|
+
# later 3.x. Skip musllinux -- Manifold/Boost.Polygon are untested
|
|
55
|
+
# against musl.
|
|
56
|
+
CIBW_BUILD: "cp312-*"
|
|
57
|
+
CIBW_SKIP: "*-musllinux*"
|
|
58
|
+
# cibuildwheel builds win32 in addition to win_amd64 by default;
|
|
59
|
+
# this project only targets 64-bit Windows.
|
|
60
|
+
CIBW_ARCHS_WINDOWS: AMD64
|
|
61
|
+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
|
|
62
|
+
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
|
|
63
|
+
# manylinux_2_28 (AlmaLinux 8) uses dnf, not apt -- but its default
|
|
64
|
+
# AppStream repo only has bison 3.0.4, and the parser submodule's
|
|
65
|
+
# grammar requires %require "3.8". No newer bison package is
|
|
66
|
+
# available via dnf on this base image, so build one from source
|
|
67
|
+
# (fast: a few seconds) rather than switching manylinux images.
|
|
68
|
+
CIBW_BEFORE_ALL_LINUX: >-
|
|
69
|
+
dnf install -y flex &&
|
|
70
|
+
curl -fsSL https://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.gz -o /tmp/bison.tar.gz &&
|
|
71
|
+
cd /tmp && tar xzf bison.tar.gz && cd bison-3.8.2 &&
|
|
72
|
+
./configure --prefix=/usr/local && make -j$(nproc) && make install
|
|
73
|
+
# Mirrors ci.yml's macOS step: the hosted runner image ships an
|
|
74
|
+
# untrusted aws/tap pre-tapped; untap before installing.
|
|
75
|
+
CIBW_BEFORE_ALL_MACOS: "brew untap aws/tap || true; brew install bison flex"
|
|
76
|
+
# openscad_cpp_parser's expression.cpp uses std::to_chars for
|
|
77
|
+
# floats, which Apple's libc++ marks unavailable below macOS 13.3
|
|
78
|
+
# (independent of SDK/compiler version) -- cibuildwheel's default
|
|
79
|
+
# deployment target (11.0) trips this. Bump it for both macOS archs.
|
|
80
|
+
CIBW_ENVIRONMENT_MACOS: "MACOSX_DEPLOYMENT_TARGET=13.3"
|
|
81
|
+
# Mirrors ci.yml's Windows step: windows-latest ships MSYS2 at
|
|
82
|
+
# C:\msys64 (not on PATH); its bison/flex satisfy the parser
|
|
83
|
+
# submodule's grammar version requirement.
|
|
84
|
+
CIBW_BEFORE_ALL_WINDOWS: 'C:\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm bison flex"'
|
|
85
|
+
CIBW_TEST_COMMAND: "python -c \"import openscad_cpp_evaluator\""
|
|
86
|
+
|
|
87
|
+
- uses: actions/upload-artifact@v7
|
|
88
|
+
with:
|
|
89
|
+
name: wheel-${{ matrix.name }}
|
|
90
|
+
path: wheelhouse/*.whl
|
|
91
|
+
|
|
92
|
+
publish-testpypi:
|
|
93
|
+
needs: [sdist, build_wheels]
|
|
94
|
+
runs-on: ubuntu-latest
|
|
95
|
+
environment: testpypi
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/download-artifact@v8
|
|
98
|
+
with:
|
|
99
|
+
path: dist
|
|
100
|
+
pattern: sdist
|
|
101
|
+
merge-multiple: true
|
|
102
|
+
- uses: actions/download-artifact@v8
|
|
103
|
+
with:
|
|
104
|
+
path: dist
|
|
105
|
+
pattern: wheel-*
|
|
106
|
+
merge-multiple: true
|
|
107
|
+
|
|
108
|
+
# Token auth, not OIDC trusted publishing: GitHub's newer "immutable
|
|
109
|
+
# subject claims" format (any repo created after 2026-07-15, no
|
|
110
|
+
# opt-out -- this repo was created 2026-07-24) isn't yet recognized by
|
|
111
|
+
# PyPI/TestPyPI's trusted-publisher matcher ("invalid-publisher: valid
|
|
112
|
+
# token, but no corresponding publisher" on every attempt). Switch back
|
|
113
|
+
# to trusted publishing once that's resolved on PyPI's end.
|
|
114
|
+
- name: Publish to TestPyPI
|
|
115
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
116
|
+
with:
|
|
117
|
+
repository-url: https://test.pypi.org/legacy/
|
|
118
|
+
packages-dir: dist
|
|
119
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
120
|
+
# TestPyPI is a dry-run index we iterate against under the same
|
|
121
|
+
# version while fixing build issues; a filename already uploaded
|
|
122
|
+
# from an earlier attempt (e.g. the sdist, which is unaffected by
|
|
123
|
+
# wheel-only fixes) isn't a real problem, just re-upload noise.
|
|
124
|
+
# Never set this on publish-pypi below -- a real PyPI collision
|
|
125
|
+
# should fail loudly, not skip silently.
|
|
126
|
+
skip-existing: true
|
|
127
|
+
|
|
128
|
+
publish-pypi:
|
|
129
|
+
needs: [publish-testpypi]
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
# Requires a "pypi" GitHub Environment with a required-reviewer
|
|
132
|
+
# protection rule, so this job pauses for manual approval after the
|
|
133
|
+
# TestPyPI publish above has been verified.
|
|
134
|
+
environment: pypi
|
|
135
|
+
steps:
|
|
136
|
+
- uses: actions/download-artifact@v8
|
|
137
|
+
with:
|
|
138
|
+
path: dist
|
|
139
|
+
pattern: sdist
|
|
140
|
+
merge-multiple: true
|
|
141
|
+
- uses: actions/download-artifact@v8
|
|
142
|
+
with:
|
|
143
|
+
path: dist
|
|
144
|
+
pattern: wheel-*
|
|
145
|
+
merge-multiple: true
|
|
146
|
+
|
|
147
|
+
# Token auth -- see the comment on publish-testpypi above.
|
|
148
|
+
- name: Publish to PyPI
|
|
149
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
150
|
+
with:
|
|
151
|
+
packages-dir: dist
|
|
152
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|