Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
ac2a14e
Update runner images
jdumas Jun 25, 2025
b79cc21
Update runner images
jdumas Jun 25, 2025
456453e
Update runner images
jdumas Jun 25, 2025
a9bf32a
Merge branch 'main' into jedumas/runners
jdumas Nov 13, 2025
afe5925
Silence gcc warning.
jdumas Nov 13, 2025
4c69226
Sync with 96afce5 (#76)
jdumas Nov 13, 2025
5828f00
Update Eigen to patch release.
jdumas Nov 13, 2025
1629c36
Try to use /Zi with sccache...
jdumas Nov 13, 2025
bd96fdd
Fix syntax.
jdumas Nov 13, 2025
79a5175
Fix syntax again.
jdumas Nov 13, 2025
fe6f41c
Update OneTBB version.
jdumas Nov 13, 2025
fc3e6f8
Run ncdu after build
jdumas Nov 13, 2025
f2e40ab
Print disk usage.
jdumas Nov 13, 2025
86db1de
Move build folder to D:/ on Windows.
jdumas Nov 13, 2025
bbff515
Hide eigen warnings.
jdumas Nov 14, 2025
63d511b
Update macro.
jdumas Nov 14, 2025
51d2c11
Update Eigen warnings.
jdumas Nov 14, 2025
bf621e7
Update Eigen warnings.
jdumas Nov 14, 2025
691f433
Merge branch 'main' into jedumas/runners
jdumas Nov 14, 2025
604f0a7
Update macOS images and Xcode versions.
jdumas Nov 14, 2025
b561bcf
Switch to Embree4 by default and add WinArm GH runner.
jdumas Nov 14, 2025
c89e260
Run CI check on all target branches
jdumas Nov 14, 2025
83ec151
Revert.
jdumas Nov 14, 2025
4312983
Update build type.
jdumas Nov 14, 2025
5109ac3
Update config.
jdumas Nov 14, 2025
727aa72
Update sccache setup.
jdumas Nov 15, 2025
99acb1d
Update sscache winarm action.
jdumas Nov 15, 2025
d4c0c3d
Set build dir for winarm
jdumas Nov 15, 2025
8010e9e
Patch boost context for winarm.
jdumas Nov 15, 2025
9512ca5
Fix patch.
jdumas Nov 15, 2025
38a0c32
Update patch.
jdumas Nov 15, 2025
25e206a
Update vs dev prompt setup.
jdumas Nov 15, 2025
7afbec6
Fix line break.
jdumas Nov 15, 2025
c0593e9
Update config.
jdumas Nov 15, 2025
5c8c476
Merge remote-tracking branch 'origin/main' into HEAD
jdumas Feb 20, 2026
31d6d15
Update sscache action.
jdumas Feb 20, 2026
b2cd333
Change LAGRANGE_RAYCASTING to LAGRANGE_MODULE_RAYCASTING
jdumas Feb 20, 2026
dbc800f
Merge remote-tracking branch 'origin/main' into jdumas/embree4
jdumas Mar 9, 2026
d82459b
Cleanup.
jdumas Mar 9, 2026
1385250
Cleanup.
jdumas Mar 9, 2026
94da4b7
Merge remote-tracking branch 'origin/main' into jdumas/embree4
jdumas May 4, 2026
be33f2e
Testing Adobe fork for embree winarm.
jdumas May 4, 2026
650921b
Add debug message.
jdumas May 4, 2026
b353250
Don't set embree isa manually.
jdumas May 5, 2026
de35c01
Update gklib version.
jdumas May 5, 2026
7d44b9c
Update gklib cmake.
jdumas May 6, 2026
d0e3f34
Restore isa selection on unix platforms.
jdumas May 6, 2026
1933a58
Fix for winarm gklib.
jdumas May 6, 2026
95c2ad6
Update simde.
jdumas May 6, 2026
cf50850
Update simde.
jdumas May 6, 2026
6a8ecec
Winarm patch.
jdumas May 6, 2026
ca6ad68
🐛 Fix Windows ARM64 build: Embree intrinsics patch + SIMDe types
jdumas May 6, 2026
f92d2f8
🐛 Fix embree-winarm.patch hunk line counts for strict patch.exe
jdumas May 6, 2026
645a118
🐛 Replace patch-file approach with CMake string replacement for embre…
jdumas May 6, 2026
2b4ca1e
🐛 Disable Python bindings on Windows ARM64 CI
jdumas May 6, 2026
41a38ab
🐛 Allow -DLAGRANGE_MODULE_X=OFF to override LAGRANGE_ALL=ON
jdumas May 6, 2026
7ca8b10
🐛 Fix Python bindings on Windows ARM64 CI
jdumas May 6, 2026
5bd9489
🐛 Fix Python bindings on Windows ARM64 CI
jdumas May 6, 2026
7dd8ddb
🐛 Fix Python bindings on Windows ARM64 CI
jdumas May 6, 2026
2f03d2d
🐛 Use Eigen solver on Windows ARM64 (no MKL support)
jdumas May 7, 2026
5d520a3
🎨 Cleanup WinARM fixes: proper patches, no hacks
jdumas May 7, 2026
286cc66
🐛 Fix embree-winarm.patch minus lines to match trailing spaces in dou…
jdumas May 7, 2026
b3ff847
🐛 Fix winding-number-winarm.patch: use space for empty context lines,…
jdumas May 7, 2026
f5b8d57
🐛 Fix vm_shuffle ambiguity: add explicit V4SF() casts at ambiguous ca…
jdumas May 7, 2026
694fa21
🔍 [TEMP] Diagnose Eigen alignment assert on Windows ARM64
jdumas May 7, 2026
a6b32db
🔍 Diagnose Eigen alignment assert with cpptrace on Win ARM64
jdumas May 7, 2026
00661ba
🔧 Diag: scope Eigen3 link to lagrange_eigen_align_diag with BUILD_INT…
jdumas May 7, 2026
ff4ad3b
🔧 Diag: add missing <iostream> for std::cerr in eigen_alignment_diag
jdumas May 7, 2026
5028be8
🔍 Diag: route cpptrace through fprintf with frame count + exception g…
jdumas May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 72 additions & 21 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
####################

Unix:
if: false # DIAGNOSTIC: temporarily disabled to iterate fast on Windows ARM64 Debug Eigen alignment investigation
name: ${{ matrix.os }} (${{ matrix.compiler }}, ${{ matrix.config }}, ${{ matrix.sanitizer }}Sanitizer)
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -195,14 +196,17 @@ jobs:
####################

Windows:
name: windows-2025 (${{ matrix.config }})
runs-on: windows-2025
name: ${{ matrix.os }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
env:
SCCACHE_GHA_ENABLED: "true"
strategy:
fail-fast: false
matrix:
config: [Release, Debug]
# DIAGNOSTIC: only the failing config (Win ARM64 Debug) while we hunt the
# Eigen alignment issue in serialization2.
os: [windows-11-arm]
config: [Debug]
steps:
- name: Show disk space
run: Get-PSDrive
Expand All @@ -214,9 +218,26 @@ jobs:
fetch-depth: 0

- uses: actions/setup-python@v5
if: matrix.os != 'windows-11-arm'
with:
python-version: 3.13

# On windows-11-arm the hostedtoolcache Python ships only the interpreter binary;
# it lacks include/ headers and libs/python3XX.lib, so CMake cannot satisfy the
# Development.Module component. Use uv instead: it pulls python-build-standalone
# distributions which include full dev files. uv defaults to x64-emulated Python
# on ARM64 Windows (uv PR #13724), so we must pin the aarch64 specifier.
- uses: astral-sh/setup-uv@v6
if: matrix.os == 'windows-11-arm'

- name: Install native ARM64 Python via uv
if: matrix.os == 'windows-11-arm'
shell: pwsh
run: |
uv python install cpython-3.13-windows-aarch64
$pyExe = (uv python find cpython-3.13-windows-aarch64).Trim()
echo "PYTHON_ARM64_EXE=$($pyExe -replace '\\', '/')" >> $env:GITHUB_ENV

- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master

Expand All @@ -227,33 +248,61 @@ jobs:
# starving sccache of requests until the default 600s timeout kills the server.
echo "SCCACHE_IDLE_TIMEOUT=0" >> ${env:GITHUB_ENV}

- name: Select embree isa (Windows)
if: runner.os == 'Windows'
run: echo "embree_max_isa=AVX2" >> ${env:GITHUB_ENV}

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores

- name: Sccache
uses: mozilla-actions/sccache-action@v0.0.10

# We run configure + build in the same step, since they both need to call VsDevCmd
# Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
- name: Configure and build
shell: cmd
- name: Set x64 vars
if: matrix.os == 'windows-2025'
run: |
echo "BUILD_DIR=D:/build" >> ${env:GITHUB_ENV}
echo "ARCH=x64" >> ${env:GITHUB_ENV}

- name: Set arm64 vars
if: matrix.os == 'windows-11-arm'
run: |
echo "BUILD_DIR=C:/build" >> ${env:GITHUB_ENV}
echo "ARCH=arm64" >> ${env:GITHUB_ENV}

- name: Setup MSVC Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ env.ARCH }}

# Cmd uses ^ to break commands into multiple lines, powershell uses `
- name: Configure
if: matrix.os != 'windows-11-arm'
run: |
cmake --version
cmake -G Ninja `
-DCMAKE_BUILD_TYPE=${{ matrix.config }} `
-DLAGRANGE_JENKINS=ON `
-DLAGRANGE_ALL=ON `
-DLAGRANGE_POLYSCOPE_MOCK_BACKEND=ON `
-B ${{ env.BUILD_DIR }} `
-S .

# DIAGNOSTIC: minimal configure for Win ARM64 — enable only the failing module
# (serialization2) so we get a fast iteration loop while we capture cpptrace
# stack traces for the Eigen alignment assertion. LAGRANGE_ALL=OFF, no Python.
- name: Configure (ARM64)
if: matrix.os == 'windows-11-arm'
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
cmake --version
cmake -G Ninja ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-DLAGRANGE_JENKINS=ON ^
-DLAGRANGE_ALL=ON ^
-DLAGRANGE_POLYSCOPE_MOCK_BACKEND=ON ^
-DEMBREE_MAX_ISA=${{ env.embree_max_isa }} ^
-B "D:/build" ^
cmake -G Ninja `
-DCMAKE_BUILD_TYPE=${{ matrix.config }} `
-DLAGRANGE_JENKINS=ON `
-DLAGRANGE_ALL=OFF `
-DLAGRANGE_MODULE_SERIALIZATION2=ON `
-DLAGRANGE_MODULE_PYTHON=OFF `
-B ${{ env.BUILD_DIR }} `
-S .
cmake --build "D:/build" -j ${{ steps.cpu-cores.outputs.count }}

- name: Build
run: cmake --build ${{ env.BUILD_DIR }} -j ${{ steps.cpu-cores.outputs.count }}

- name: Sccache stats
if: always()
Expand All @@ -265,4 +314,6 @@ jobs:
run: Get-PSDrive

- name: Tests
run: cd "D:/build"; ctest --verbose -j ${{ steps.cpu-cores.outputs.count }}
# DIAGNOSTIC: scope ctest to the serialization2 suite (the only one firing the assert).
# --verbose is critical: cpptrace writes to stderr and we need it captured in the log.
run: cd ${{ env.BUILD_DIR }}; ctest --verbose -j ${{ steps.cpu-cores.outputs.count }} -R "serialization2|serialize_"
9 changes: 6 additions & 3 deletions cmake/recipes/external/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,15 @@ option(BOOST_IOSTREAMS_ENABLE_BZIP2 "Boost.Iostreams: Enable BZip2 support" OFF)
option(BOOST_IOSTREAMS_ENABLE_LZMA "Boost.Iostreams: Enable LZMA support" OFF)
option(BOOST_IOSTREAMS_ENABLE_ZSTD "Boost.Iostreams: Enable Zstd support" OFF)

set(BOOST_PATCHES "")
set(BOOST_PATCHES)
if(EMSCRIPTEN)
# Wasm doesn't have rounding mode control yet, so we trick Boost::interval into thinking it has.
# https://github.com/WebAssembly/rounding-mode-control
# https://github.com/boostorg/interval/issues/44
set(BOOST_PATCHES PATCHES Boost.wasm.patch)
list(APPEND BOOST_PATCHES Boost.wasm.patch)
endif()
if(WIN32)
list(APPEND BOOST_PATCHES Boost.winarm.patch)
endif()

# Modern CMake target support was added in Boost 1.82.0
Expand All @@ -95,7 +98,7 @@ CPMAddPackage(
URL https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.xz
URL_HASH SHA256=2e64e5d79a738d0fa6fb546c6e5c2bd28f88d268a2a080546f74e5ff98f29d0e
EXCLUDE_FROM_ALL ON
${BOOST_PATCHES}
PATCHES ${BOOST_PATCHES}
)

# Due to MKL, we may require the release runtime (/MD) even when compiling in Debug mode.
Expand Down
132 changes: 132 additions & 0 deletions cmake/recipes/external/Boost.winarm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
Submodule libs/context contains modified content
diff --git i/libs/context/CMakeLists.txt w/libs/context/CMakeLists.txt
index dca5349..bd064b1 100644
--- i/libs/context/CMakeLists.txt
+++ w/libs/context/CMakeLists.txt
@@ -12,7 +12,7 @@ list(APPEND CMAKE_MODULE_PATH ${boost_context_SOURCE_DIR}/cmake)

## Binary format

-if(WIN32)
+if(WIN32 OR CYGWIN)
set(_default_binfmt pe)
elseif(APPLE)
set(_default_binfmt mach-o)
@@ -31,7 +31,7 @@ math(EXPR _bits "${CMAKE_SIZEOF_VOID_P}*8")

if(CMAKE_SYSTEM_PROCESSOR MATCHES "^[Aa][Rr][Mm]" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(_default_abi aapcs)
-elseif(WIN32)
+elseif(WIN32 OR CYGWIN)
set(_default_abi ms)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
if(_bits EQUAL 32)
@@ -60,6 +60,8 @@ elseif(_bits EQUAL 32)
set(_default_arch arm)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(_default_arch mips32)
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc32)")
+ set(_default_arch ppc32)
else()
set(_default_arch i386)
endif()
@@ -69,6 +71,8 @@ else()
set(_default_arch arm64)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^mips")
set(_default_arch mips64)
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc64)")
+ set(_default_arch ppc64)
else()
set(_default_arch x86_64)
endif()
@@ -89,18 +93,22 @@ if(MSVC)
else()
set(_default_asm masm)
endif()
+elseif(BOOST_CONTEXT_ARCHITECTURE STREQUAL arm64 AND MINGW)
+ set(_default_asm armclang)
else()
set(_default_asm gas)
endif()

-set(BOOST_CONTEXT_ASSEMBLER "${_default_asm}" CACHE STRING "Boost.Context assembler (masm, gas, armasm)")
-set_property(CACHE BOOST_CONTEXT_ASSEMBLER PROPERTY STRINGS masm gas armasm)
+set(BOOST_CONTEXT_ASSEMBLER "${_default_asm}" CACHE STRING "Boost.Context assembler (masm, gas, armasm, armclang)")
+set_property(CACHE BOOST_CONTEXT_ASSEMBLER PROPERTY STRINGS masm gas armasm armclang)

unset(_default_asm)

## Assembler source suffix

-if(BOOST_CONTEXT_BINARY_FORMAT STREQUAL pe)
+if(BOOST_CONTEXT_ASSEMBLER STREQUAL armclang)
+ set(_default_ext .S)
+elseif(BOOST_CONTEXT_BINARY_FORMAT STREQUAL pe)
set(_default_ext .asm)
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
set(_default_ext .S)
@@ -133,18 +141,22 @@ message(STATUS "Boost.Context: "
"implementation ${BOOST_CONTEXT_IMPLEMENTATION}")

# Enable the right assembler
-
+set(ASM_LANGUAGE)
if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")
- if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas)
+ if(BOOST_CONTEXT_ASSEMBLER STREQUAL gas OR BOOST_CONTEXT_ASSEMBLER STREQUAL armclang)
if(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
- enable_language(ASM-ATT)
+ set(ASM_LANGUAGE ASM-ATT)
else()
- enable_language(ASM)
+ set(ASM_LANGUAGE ASM)
endif()
elseif(BOOST_CONTEXT_ASSEMBLER STREQUAL armasm)
- enable_language(ASM_ARMASM)
+ if(MSVC)
+ set(ASM_LANGUAGE ASM_MARMASM)
+ else()
+ set(ASM_LANGUAGE ASM_ARMASM)
+ endif()
else()
- enable_language(ASM_MASM)
+ set(ASM_LANGUAGE ASM_MASM)
endif()
endif()

@@ -170,13 +182,29 @@ if(BOOST_CONTEXT_IMPLEMENTATION STREQUAL "fcontext")

set(IMPL_SOURCES ${ASM_SOURCES})

- if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm AND BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
- set_source_files_properties(${ASM_SOURCES} PROPERTIES COMPILE_FLAGS "/safeseh")
- endif()
+ if(BOOST_CONTEXT_ASSEMBLER STREQUAL masm)

- if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
- endif()
+ set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/nologo")
+
+ if(MSVC AND NOT(MSVC_VERSION LESS 1936) AND NOT(CMAKE_CXX_SIMULATE_VERSION))
+ set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/quiet")
+ endif()
+
+ if(BOOST_CONTEXT_ARCHITECTURE STREQUAL i386)
+ set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "/safeseh")
+ endif()
+
+ # armasm doesn't support most of these options
+ elseif(NOT BOOST_CONTEXT_ASSEMBLER STREQUAL armasm) # masm
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-x" "assembler-with-cpp")
+ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set_property(SOURCE ${ASM_SOURCES} APPEND PROPERTY COMPILE_OPTIONS "-Wno-unused-command-line-argument")
+ endif()
+ endif() # masm
+
+ enable_language(${ASM_LANGUAGE})
+ set_source_files_properties(${ASM_SOURCES} PROPERTIES LANGUAGE ${ASM_LANGUAGE})
else()
set(IMPL_SOURCES
src/continuation.cpp
30 changes: 30 additions & 0 deletions cmake/recipes/external/Eigen3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,36 @@ if(EIGEN_DONT_VECTORIZE)
target_compile_definitions(Eigen3_Eigen INTERFACE EIGEN_DONT_VECTORIZE)
endif()

# Diagnostic only — TEMPORARY: on Windows ARM64 Debug, force-include a header that overrides
# eigen_assert with a non-fatal handler. When the assertion comes from DenseStorage.h (i.e. the
# plain_array<> alignment check) we capture a cpptrace stack trace so we can pinpoint the call
# site that constructs a misaligned fixed-size Eigen object. All other eigen_assert failures
# still abort, so unrelated invariants are not masked.
#
# The cpptrace dependency stays in a separate static library (lagrange_eigen_align_diag) so it
# does not leak into every Eigen consumer's interface.
if(WIN32 AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64" AND MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug")
include(cpptrace)
add_library(lagrange_eigen_align_diag STATIC
${CMAKE_CURRENT_LIST_DIR}/eigen_alignment_diag.cpp
${CMAKE_CURRENT_LIST_DIR}/eigen_alignment_diag.h
)
target_include_directories(lagrange_eigen_align_diag PUBLIC ${CMAKE_CURRENT_LIST_DIR})
target_compile_definitions(lagrange_eigen_align_diag PUBLIC LAGRANGE_DIAG_EIGEN_ALIGN=1)
target_link_libraries(lagrange_eigen_align_diag PRIVATE cpptrace::cpptrace)
set_target_properties(lagrange_eigen_align_diag PROPERTIES FOLDER third_party)

set(_lagrange_eigen_diag_header "${CMAKE_CURRENT_LIST_DIR}/eigen_alignment_diag.h")
# Wrap with $<BUILD_INTERFACE:> so install(EXPORT Eigen_Targets) does not see the
# diagnostic target (which is intentionally not part of the export set).
target_compile_options(Eigen3_Eigen INTERFACE
"$<BUILD_INTERFACE:/FI${_lagrange_eigen_diag_header}>")
target_compile_definitions(Eigen3_Eigen INTERFACE
$<BUILD_INTERFACE:LAGRANGE_DIAG_EIGEN_ALIGN=1>)
target_link_libraries(Eigen3_Eigen INTERFACE
$<BUILD_INTERFACE:lagrange_eigen_align_diag>)
endif()

if(EIGEN_WITH_MKL)
# TODO: Checks that, on 64bits systems, `MKL::MKL` is using the LP64 interface
# (by looking at the compile definition of the target)
Expand Down
Loading
Loading