8971279494
The modeling API (shapes, operators, sketches, products, queries, the reactive graph) is implemented in C++20 on OpenCASCADE (src/cpp) and ships inside the wheel as simplecadapi._cpp. The Python layers that stay Python (runtime, build, artifacts, editor, inspect, exporter, translators, scene) run on it unchanged; the previous Python test suite passes on the new engine. Layout: src/cpp and src/simplecadapi side by side, one distribution built by scikit-build-core. simplecadapi.core, .operators.*, .ql, .std.* and the other legacy modules are real forwarding modules; the Python adapter layer is simplecadapi/_glue. OCP is no longer a dependency and nothing imports it. Release: .github/workflows/release.yml builds wheels for Linux x86_64 and aarch64, macOS arm64 and Windows x86_64 (Python 3.10-3.13) against one static OCCT, runs the test suite on the Linux wheels and publishes to GitHub and PyPI; ci.yml caches the static OCCT for the test jobs. Errors: every message the library writes is English; the tag-validation and semantic-query errors render in full with possible causes and fixes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
120 lines
3.5 KiB
YAML
120 lines
3.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- dev
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- dev
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ci-${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
occt:
|
|
# The C++ module links a static OpenCASCADE built from source (the same build the release wheels use). It is built
|
|
# once per version of the build script and cached; the jobs below restore it.
|
|
name: Static OpenCASCADE
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
|
|
- name: Restore the static OpenCASCADE build
|
|
id: cache
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: ~/occt
|
|
key: occt-ci-linux-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
|
|
|
- name: Build OpenCASCADE
|
|
if: steps.cache.outputs.cache-hit != 'true'
|
|
run: python3 src/cpp/tools/build_occt.py --prefix "$HOME/occt"
|
|
|
|
test:
|
|
name: Python ${{ matrix.python-version }}
|
|
needs: occt
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version:
|
|
- "3.10"
|
|
- "3.11"
|
|
- "3.12"
|
|
- "3.13"
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
enable-cache: true
|
|
cache-python: true
|
|
|
|
- name: Restore the static OpenCASCADE build
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: ~/occt
|
|
key: occt-ci-linux-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Install locked dependencies and build the C++ module
|
|
run: CMAKE_ARGS="-DSCAD_OCCT_PREFIX=$HOME/occt" uv sync --locked --group dev
|
|
- name: Verify headless rendering support
|
|
run: command -v xvfb-run
|
|
|
|
|
|
- name: Compile package
|
|
run: uv run python -m compileall -q src/simplecadapi
|
|
|
|
- name: Run tests
|
|
run: xvfb-run --auto-servernum uv run pytest test tests -q
|
|
|
|
editor-e2e:
|
|
needs: occt
|
|
# The editor tests that boot a real marimo kernel (about a minute); the main
|
|
# job runs the rest of test/test_editor.py without it.
|
|
name: Editor end to end
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
env:
|
|
SCA_EDITOR_E2E: "1"
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
|
|
|
- name: Install uv and Python
|
|
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
cache-python: true
|
|
|
|
- name: Restore the static OpenCASCADE build
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
|
with:
|
|
path: ~/occt
|
|
key: occt-ci-linux-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
|
fail-on-cache-miss: true
|
|
|
|
- name: Install locked dependencies and build the C++ module
|
|
run: CMAKE_ARGS="-DSCAD_OCCT_PREFIX=$HOME/occt" uv sync --locked --group dev
|
|
|
|
- name: Run the editor tests, kernel included
|
|
run: uv run pytest test/test_editor.py -q
|