Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 16 additions & 6 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Builds

#TODO: Linux ARM64, Windows ARM64
#TODO: Windows ARM64

on:
# release:
Expand All @@ -17,15 +17,22 @@ jobs:
docker_image: 'pmeira/manylinux_wheel_fpc322_x86_64'
extra_cmake_flags: ''
klusolve_linux32: ''
gh_image: ubuntu-latest
- arch: x86
docker_image: 'pmeira/manylinux_wheel_fpc322_i686'
extra_cmake_flags: '-DCMAKE_CXX_COMPILER_ARG1=-m32 -DCMAKE_C_COMPILER_ARG1=-m32'
klusolve_linux32: linux32
gh_image: ubuntu-latest
- arch: arm64
docker_image: 'pmeira/manylinux_wheel_fpc322_aarch64'
extra_cmake_flags: ''
klusolve_linux32: ''
gh_image: ubuntu-24.04-arm

runs-on: ubuntu-latest
runs-on: ${{ matrix.gh_image }}
env:
KLUSOLVE_OS: linux
EIGEN_VERSION : "3.4.0"
EIGEN_VERSION : "5.0.0"
DOCKER_IMAGE: ${{ matrix.docker_image }}
KLUSOLVE_ARCH: ${{ matrix.arch }}
KLUSOLVE_EXTRA_CMAKE_FLAGS: ${{ matrix.extra_cmake_flags }}
Expand Down Expand Up @@ -64,16 +71,19 @@ jobs:
strategy:
matrix:
include:
- os: macos-13
- os: macos-15-intel
arch: x64
extra_cmake_flags: '-DCMAKE_POLICY_VERSION_MINIMUM=3.5'
- os: macos-latest
arch: arm64
extra_cmake_flags: '-DCMAKE_POLICY_VERSION_MINIMUM=3.5'

runs-on: ${{ matrix.os }}
env:
KLUSOLVE_OS: darwin
KLUSOLVE_ARCH: ${{ matrix.arch }}
EIGEN_VERSION : "3.4.0"
EIGEN_VERSION : "5.0.0"
KLUSOLVE_EXTRA_CMAKE_FLAGS: ${{ matrix.extra_cmake_flags }}
steps:
- uses: "actions/checkout@v4"
with:
Expand Down Expand Up @@ -121,7 +131,7 @@ jobs:
KLUSOLVE_OS_IMAGE: ${{ matrix.os }}
KLUSOLVE_ARCH: ${{ matrix.arch }}
KLUSOLVE_COMPILER: ${{ matrix.compiler }}
EIGEN_VERSION: "3.4.0"
EIGEN_VERSION: "5.0.0"
steps:
- uses: "actions/checkout@v4"
with:
Expand Down
22 changes: 11 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (C) 2012-2024 Paulo Meira
# Copyright (C) 2019-2024 DSS-Extensions contributors
# Copyright (C) 2012-2026 Paulo Meira
# Copyright (C) 2019-2026 DSS-Extensions contributors
# This augmented KLUSolve CMakeLists.txt is based on a personal script to
# build SuiteSparse on Windows. This will be updated to a simpler version
# when newer SuiteSparse versions are adopted.
Expand All @@ -14,7 +14,7 @@ endif()

SET(USE_SYSTEM_SUITESPARSE ON CACHE BOOL "Use system SuiteSparse.")
SET(DSS_EXTENSIONS OFF CACHE BOOL "If building for distribution on DSS-Extensions, enable this. It tweaks the output folders.")
SET(USE_SYSTEM_EIGEN ON CACHE BOOL "Use system Eigen3 (v3.4 recommended).")
SET(USE_SYSTEM_EIGEN ON CACHE BOOL "Use system Eigen3 (v5.0 recommended).")

# Moved from KLUSOLVEX_LIB_TYPE to BUILD_SHARED_LIBS to simplify the build process when
# integrating with other build tools
Expand All @@ -35,7 +35,7 @@ endif ()
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
SET(KLUSOLVEX_OUT_DIR_PREFIX "win")
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 14)
SET(KLUSOLVEX_OUT_DIR_PREFIX "darwin")
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
SET(KLUSOLVEX_OUT_DIR_PREFIX "linux")
Expand All @@ -57,7 +57,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/include")

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.4)
set (CMAKE_CXX_STANDARD 11)
set (CMAKE_CXX_STANDARD 14)
endif()
endif()

Expand Down Expand Up @@ -86,14 +86,14 @@ else ()
STRING(REGEX REPLACE "\\\\" "/" EIGEN3_DIR ${EIGEN3_DIR})
endif()
ELSE()
set(TARGET_EIGEN_VERSION "3.4.0")
set(TARGET_EIGEN_VERSION "5.0.0")
IF (NOT EXISTS "${CMAKE_BINARY_DIR}/eigen-${TARGET_EIGEN_VERSION}/Eigen/Eigen")
message(STATUS "Downloading Eigen3 source code...")
file(DOWNLOAD "https://gitlab.com/libeigen/eigen/-/archive/${TARGET_EIGEN_VERSION}/eigen-${TARGET_EIGEN_VERSION}.tar.gz" "${CMAKE_BINARY_DIR}/eigen3.tar.gz")
message(STATUS "Unpacking Eigen3...")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf "eigen3.tar.gz" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
message(STATUS "Downloading Eigen source code...")
file(DOWNLOAD "https://gitlab.com/libeigen/eigen/-/archive/${TARGET_EIGEN_VERSION}/eigen-${TARGET_EIGEN_VERSION}.tar.gz" "${CMAKE_BINARY_DIR}/eigen.tar.gz")
message(STATUS "Unpacking Eigen...")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar zxf "eigen.tar.gz" WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
ELSE()
message(STATUS "Eigen3 already exists, skipping download.")
message(STATUS "Eigen already exists, skipping download.")
ENDIF()
SET(EIGEN3_DIR "${CMAKE_BINARY_DIR}/eigen-${TARGET_EIGEN_VERSION}")
ENDIF()
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Changes include:

For binary distributions, basic descriptions of the dependencies and licensing information is reproduced below. When building from source, be sure to check the licenses of the components.

**Currently tested with Eigen 3.4.0 and SuiteSparse 5.6.0.** KLU, which is distributed in SuiteSparse, is very stable, so this library should be forward compatible. We will eventually integrate with the current SuiteSparse (CMake) build setup, but for now our build scripts provide a more streamlined setup when building from source.
**Currently tested with Eigen 5.0.0 and SuiteSparse 5.6.0.** KLU, which is distributed in SuiteSparse, is very stable, so this library should be forward compatible. We will eventually integrate with the current SuiteSparse (CMake) build setup, but for now our build scripts provide a more streamlined setup when building from source.

# Credits / Acknowledgment

Expand All @@ -34,9 +34,9 @@ Since we don't include the code for KLU or SuiteSparse in this repository anymor

KLUSolveX

Copyright (c) 2017-2024, Paulo Meira
Copyright (c) 2017-2026, Paulo Meira

Copyright (c) 2019-2024, DSS Extensions contributors
Copyright (c) 2019-2026, DSS-Extensions contributors

Copyright (c) 2008, EnerNex Corporation

Expand Down