Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 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
195867a
Try out winarm branch for embree.
jdumas Nov 18, 2025
eb0b0b6
Merge branch 'main' into jdumas/winarm
jdumas Dec 10, 2025
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
69 changes: 38 additions & 31 deletions .github/workflows/continuous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04, macos-15-intel, macos-15]
config: [RelwithDebInfo, Debug]
config: [RelWithDebInfo, Debug]
compiler: [gcc, apple, llvm]
sanitizer: ["Address", "Thread"] # TODO: Add Memory+Undefined Sanitizer
exclude:
Expand Down Expand Up @@ -157,11 +157,12 @@ jobs:
####################

Windows:
name: windows-2025 (${{ matrix.config }})
runs-on: windows-2025
name: ${{ matrix.os }} (${{ matrix.config }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2025, windows-11-arm]
config: [Release, Debug]
steps:
- name: Show disk space
Expand All @@ -179,47 +180,53 @@ jobs:
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master

- name: Set env variable for sccache
run: |
echo "appdata=$env:LOCALAPPDATA" >> ${env:GITHUB_ENV}

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

- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: ${{ env.appdata }}\Mozilla\sccache
key: ${{ runner.os }}-${{ matrix.config }}-cache
- name: Configure sccache
run: echo "SCCACHE_GHA_ENABLED=true" >> ${env:GITHUB_ENV}

- name: Prepare sccache
# Re-enable official action one https://github.com/Mozilla-Actions/sccache-action/pull/225 is merged
# uses: mozilla-actions/[email protected]
uses: Vee99BR/[email protected]

- 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: |
iwr -useb 'https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1' -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop install sccache --global
# Scoop modifies the PATH so we make it available for the next steps of the job
echo "${env:PATH}" >> ${env:GITHUB_PATH}

# 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
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
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 ^
-B "D:/build" ^
cmake -G Ninja `
-DCMAKE_BUILD_TYPE=${{ matrix.config }} `
-DLAGRANGE_JENKINS=ON `
-DLAGRANGE_MODULE_RAYCASTING=ON `
-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: Show disk space
if: always()
run: Get-PSDrive

- name: Tests
run: cd "D:/build"; ctest --verbose -j ${{ steps.cpu-cores.outputs.count }}
run: cd ${{ env.BUILD_DIR }}; ctest --verbose -j ${{ steps.cpu-cores.outputs.count }}
26 changes: 26 additions & 0 deletions cmake/lagrange/lagrange_find_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ function(lagrange_find_package name)
elseif(${name} STREQUAL algcmake)
find_package(${name} ${ARGN})
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
elseif(${name} STREQUAL embree)
if(${ARGC} LESS 2)
message(FATAL_ERROR "lagrange_find_package(embree ...) requires at least 1 argument for the version number, ${ARGC} given")
endif()
if(${ARGV1} EQUAL 3)
# Defer to vcpkg port
find_package(${name} ${ARGN})
elseif(${ARGV1} EQUAL 4)
# Use internal embree4.cmake recipe
include(embree4)
else()
message(FATAL_ERROR "Unsupported embree version number: ${ARGV1}")
endif()
else()
find_package(${name} ${ARGN})
endif()
Expand All @@ -74,6 +87,19 @@ function(lagrange_find_package name)
${algcmake_SOURCE_DIR}/modules
)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
elseif(${name} STREQUAL embree)
if(${ARGC} LESS 2)
message(FATAL_ERROR "lagrange_find_package(embree ...) requires at least 1 argument for the version number, ${ARGC} given")
endif()
if(${ARGV1} EQUAL 3)
# Redirect to embree3.cmake
include(embree3)
elseif(${ARGV1} EQUAL 4)
# Redirect to embree4.cmake
include(embree4)
else()
message(FATAL_ERROR "Unsupported embree version number: ${ARGV1}")
endif()
else()
include(${name})
endif()
Expand Down
9 changes: 6 additions & 3 deletions cmake/recipes/external/Boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,15 @@ if(SKBUILD)
set(BUILD_SHARED_LIBS ON)
endif()

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 @@ -101,7 +104,7 @@ CPMAddPackage(
GITHUB_REPOSITORY "boostorg/boost"
GIT_TAG "boost-1.84.0"
EXCLUDE_FROM_ALL ON
${BOOST_PATCHES}
PATCHES ${BOOST_PATCHES}
)

if(SKBUILD)
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
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ function(embree_import_target)
lagrange_find_package(TBB CONFIG REQUIRED)
ignore_package(TBB)
get_target_property(TBB_INCLUDE_DIRS TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
add_library(TBB INTERFACE)
target_link_libraries(TBB INTERFACE TBB::tbb)
if(NOT TARGET TBB)
add_library(TBB INTERFACE)
target_link_libraries(TBB INTERFACE TBB::tbb)
endif()
set(TBB_LIBRARIES TBB)

# Ready to include embree's atrocious CMake
Expand All @@ -105,7 +107,7 @@ function(embree_import_target)
# Patch for emscripten compatibility. Fix available upstream in Embree 4+.
# https://github.com/RenderKit/embree/pull/365
# https://github.com/RenderKit/embree/issues/486
embree.patch
embree3.patch
)

unignore_package(TBB)
Expand Down
Loading
Loading