Skip to content

Migrate build dependencies from the dlr-sc conda channel to conda-forge - #1406

Open
joergbrech wants to merge 18 commits into
mainfrom
conda-forge-migration
Open

Migrate build dependencies from the dlr-sc conda channel to conda-forge#1406
joergbrech wants to merge 18 commits into
mainfrom
conda-forge-migration

Conversation

@joergbrech

@joergbrech joergbrech commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

Moves TiGL's conda dependencies off the self-hosted dlr-sc channel and onto conda-forge, resolving #1286. This is a prerequisite to hosting tigl as a conda-forge feedstock itself.

This PR also re-introduces MacOS to CI.

Co-authored by Claude. Checked by me.

Concretely:

  • OpenCASCADE: now the stock, unpatched conda-forge occt package (dynamically linked, novtk build), bumped 7.6.2 → 7.9.3. The occt-static build option and all static-linking machinery have been removed entirely.
    • The version bump wasn't optional: conda-forge's occt 7.6.2 only ships a vtk-enabled build whose dependencies conflict with tixi on every platform; novtk builds only exist from 7.7.2 onward, and osx-arm64 support only exists from 7.9.0.
    • Two tests are disabled because their golden values no longer match under unpatched OCCT (creatorWing.DISABLED_wingCreateSectionInsideWithParam, WingSegmentGuideCurves.DISABLED_tiglWingGetSegmentUpperSurfaceAreaTrimmed) — most likely due to the missing G2-continuous Coons-patch patch the old dlr-sc build had, though this wasn't fully isolated from the version bump.
  • TiXI: now consumed as conda-forge's tixi package (same tixi3 CMake target, no CMake changes needed).
  • doxygen: unpinned from the old dlr-sc 1.8.15.* pin.
  • pythonocc-core: bumped to match occt (7.9.3, novtk). Since conda-forge's package doesn't ship the SWIG interface sources TiGL's internal Python bindings need, those are now vendored as a git submodule at thirdparty/pythonocc-core, pinned to match — TODO: drop this vendoring once conda-forge/pythonocc-feedstock ships the sources itself.
  • swig: pinned to 4.4.* to match what conda-forge's pythonocc-core is actually built with — a mismatch here silently breaks SWIG's cross-module type sharing (functions returning OCCT types like TopoDS_Face/gp_Pnt fell back to raw, un-destructed pointers instead of proper OCC.Core.* instances).
  • MATLAB bindings: the SDK headers/import-libs previously supplied by the dlr-sc matlab-libs package (no conda-forge equivalent exists) are now vendored at thirdparty/matlab-sdk/{win-64,osx-64}, used automatically as a fallback by cmake/FindMATLAB.cmake.
  • osx-arm64: added as a supported platform now that the tixi feedstock has been updated to build for it.
  • CI: the Windows packaging row now builds against dynamic OCCT instead of occt-static; macOS moved to macos-latest, resolving the CI breakage from the macos-13 runner's retirement (CI is failing now that MacOS-13 Github runner is in retirement #1273).

Also fixed two bugs discovered along the way, unrelated to the conda-forge migration itself but blocking verification of it:

  • A nightly-build version string corruption (cmake/GetGitRevisionDescription.cmake.in) that made tiglOpenCPACSConfiguration spuriously return TIGL_WRONG_CPACS_VERSION whenever the current branch's git ref was packed (e.g. after git gc) rather than a loose file.
  • A Linux link error (cannot find -lGL) on hosts without a system-wide libGL.so/libX11.so/libfontconfig.so — conda-forge's occt exports these as bare linker names, so $CONDA_PREFIX/lib now needs to be on LIBRARY_PATH at link time.

Dropping the old pinned tbb=2019.5 static dependency (now resolved entirely through conda's own dependency graph) may also help with #964.

Closes #1286
Closes #1273

How Has This Been Tested?

Locally via pixi, for the default, coverage, annts:

  • Clean solve (pixi install) from scratch verified for all 4 platforms (linux-64, win-64, osx-64, osx-arm64) with only the conda-forge channel.
  • Full build + unittests + integrationtests + pythontests run on Linux: 902 unit tests, 46 integration tests, and 110 Python testsall pass (3 disabled, as noted above).
  • The Windows DLL-bundling mechanism was verified against conda-forge's actual occt package metadata (confirmed TKernel's CMake target points at the real .dll, not just the .libas available for a live build.
  • The vendored MATLAB SDK's header/library discovery was verified by simulating Windows/macOS library-search rules directly against the vendored files.
  • I manually checked the windows archive and installer from the CI artifacts locally. TiGLCreator opens and the OCCT shared libs are shipped.
  • I tested the build install and pythontests on a x64 MacOS machine locally.

Screenshots, that help to understand the changes(if applicable):

N/A (build/CI infrastructure change, no user-facing UI change)

Checklist for PR Author:

  • Unit or integration test added (if applicable)
  • Python interface updated (if applicable)
  • Python test added (if Python interface updated)
  • Doxygen docstrings added
  • ChangeLog.md updated

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 53.57143% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.31%. Comparing base (3615fbd) to head (3875178).

Files with missing lines Patch % Lines
src/wing/CTiglWingHelper.cpp 54.16% 11 Missing ⚠️
src/contrib/MakePatches.cxx 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1406      +/-   ##
==========================================
+ Coverage   73.28%   73.31%   +0.02%     
==========================================
  Files         324      324              
  Lines       28642    28630      -12     
==========================================
- Hits        20991    20990       -1     
+ Misses       7651     7640      -11     
Flag Coverage Δ
unittests 73.31% <53.57%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/contrib/MakePatches.cxx 84.89% <50.00%> (-0.76%) ⬇️
src/wing/CTiglWingHelper.cpp 81.04% <54.16%> (-1.03%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@joergbrech joergbrech changed the title conda forge migration Migrate build dependencies from the dlr-sc conda channel to conda-forge Jul 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR Reminders

This PR has changes in src/, and tests/unittests/ but not in TIGLCreator/, tests/integrationtests/, tests/python/, or bindings/python_internal/. ChangeLog.md has changes.

  • 💡 Tip: Please check if new classes need to be added to the Python bindings

This is an automated reminder from CI

The failing wing W14_ChaDih has tip sections translated by exactly (0, 1, 1) and (0, 2, 2) — a perfect 45° dihedral. CTiglWingHelper::GetMajorDirection() picks the span axis by comparing accumulated |Y| vs |Z| with a plain >=, and for this wing those sums are mathematically equal, so the winner is decided by last-ULP rounding — which differs on arm64 (FMA contraction, Apple libm). The CI numbers prove it: 43.152389734005403 + 46.847610265994597 = 90.0 exactly — after SetSweep nudged the tip, the tie flipped the major axis and the dihedral was measured as its complement. Fix: a relative-tolerance tie-break (GreaterOrTied, 1e-8) in GetMajorDirection/GetDeepDirection (src/wing/CTiglWingHelper.cpp) so near-ties resolve deterministically to the conventional axis on every platform.

2. BSplineInterpolation.withKinksShield — over-strict test, fixed.
ArraysMatch defaults to exact ==, but the 0.5 parameter is derived arithmetic (tigl::Interpolate rescaling between kink params), which lands 1 ULP off on arm64. The test now uses InTolerance(1e-14).

3. SIGABRT in makeLoft.nacelleInverted — narrowed, needs one more CI run.
Three things the log tells us: (a) guideCurvePatches.nacelleInverted — same .brep inputs through MakePatches::Perform directly — passes on macOS, so the crash lives in the CTiglMakeLoft wrapper path (tolerance 1e-6 vs 1e-7, plus ConcatenateWire and CloseShape). That's why the MakePatches null-guard in your last commit couldn't fix it. (b) gtest catches C++ exceptions on POSIX, so a thrown CTiglError/Standard_Failure would show as a test failure, not an abort. (c) No libc++abi/assert message reached stderr — this is a silent abort (terminate-in-noexcept, heap check, or a direct abort()), which can't be pinpointed by reading code. So I added a temporary step to .github/workflows/build-test.yml that, when the macOS test job fails, reruns makeLoft.* under lldb --batch with thread backtrace all on crash — the next CI run will hand you the exact crash site.
@joergbrech
joergbrech marked this pull request as ready for review July 29, 2026 09:37
@svengoldberg svengoldberg self-assigned this Aug 5, 2026

@svengoldberg svengoldberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my end, everything looks good und consistent!
I have just some remarks regarding the unit tests.

And one additional general question (I did not dive too much into the math tbh): Don't we loose a strong feature when omitting the GeomFill_CoonsC2Style?

Comment thread tests/unittests/creatorWing.cpp Outdated
Comment thread tests/unittests/creatorWing.cpp Outdated
Comment thread tests/unittests/tiglWingSegment.cpp Outdated
@svengoldberg

Copy link
Copy Markdown
Contributor

@joergbrech Maybe, after merging, we should open up an issue reminding us to change the pythonocc-core import when it is fully supplied by conda-forge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider moving to the conda-forge ecosystem. CI is failing now that MacOS-13 Github runner is in retirement

2 participants