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
1 change: 1 addition & 0 deletions .codespellexclude
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
mErrors.clear();
if (pIndex >= mErrors.size()) {
return mErrors[pIndex];
mErrors.push_back(std::move(issue));
4 changes: 2 additions & 2 deletions .github/workflows/buildThirdPartyLibrary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
arch: amd64_arm64
build_type: Debug
- name: 'Linux (Intel)'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
- name: 'Linux (ARM)'
os: ubuntu-22.04-arm
os: ubuntu-24.04-arm
build_type: Release
- name: 'macOS (Intel)'
os: macos-15-intel
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ jobs:
build_type: Debug
shared_libs: ON
- name: 'Linux static library (Intel)'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
shared_libs: OFF
- name: 'Linux shared library (Intel)'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
shared_libs: ON
- name: 'Linux static library (ARM)'
os: ubuntu-22.04-arm
os: ubuntu-24.04-arm
build_type: Release
shared_libs: OFF
- name: 'Linux shared library (ARM)'
os: ubuntu-22.04-arm
os: ubuntu-24.04-arm
build_type: Release
shared_libs: ON
- name: 'macOS static library (Intel)'
Expand Down Expand Up @@ -137,9 +137,9 @@ jobs:
os: windows-11-arm
arch: amd64_arm64
- name: 'Linux Python wheels (Intel)'
os: ubuntu-22.04
os: ubuntu-24.04
- name: 'Linux Python wheels (ARM)'
os: ubuntu-22.04-arm
os: ubuntu-24.04-arm
- name: 'macOS Python wheels (Intel)'
os: macos-15-intel
- name: 'macOS Python wheels (ARM)'
Expand Down Expand Up @@ -168,10 +168,10 @@ jobs:
env:
CIBW_ARCHS: auto64
CIBW_BUILD: 'cp312-* cp313-* cp314-*'
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=13.0
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=14.0
# Note #1: the value of CIBW_ENVIRONMENT_MACOS must be in sync with that of MACOS_DEPLOYMENT_TARGET in
# CMakelists.txt.
# Note #2: for some reasons, we need to specify the minor version, hence using 13.0 rather than 13.
# Note #2: for some reasons, we need to specify the minor version, hence using 14.0 rather than 14.
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_34
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_34
CIBW_SKIP: '*musllinux*'
Expand All @@ -188,7 +188,7 @@ jobs:
python_pypi:
needs: [python_wheels]
name: Publish to PyPI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
environment: pypi
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
steps:
Expand All @@ -202,7 +202,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
webassembly:
name: WebAssembly
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
BUILDCACHE_ACCURACY: STRICT
BUILDCACHE_COMPRESS_FORMAT: ZSTD
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
install_uninstall_and_package: ON
copy_dll: ON
- name: 'Linux static library (Intel)'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -86,7 +86,7 @@ jobs:
install_uninstall_and_package: ON
use_install_prefix: ON
- name: 'Linux shared library (Intel)'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -100,7 +100,7 @@ jobs:
install_uninstall_and_package: ON
use_install_prefix: ON
- name: 'Linux static library (ARM)'
os: ubuntu-22.04-arm
os: ubuntu-24.04-arm
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -114,7 +114,7 @@ jobs:
install_uninstall_and_package: ON
use_install_prefix: ON
- name: 'Linux shared library (ARM)'
os: ubuntu-22.04-arm
os: ubuntu-24.04-arm
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
install_uninstall_and_package: ON
use_install_prefix: ON
- name: 'JavaScript bindings'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -210,7 +210,7 @@ jobs:
target: python_unit_testing
pip_install_test_and_uninstall: ON
- name: 'Linux Python bindings'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
pip_install_prerequisites: sudo uv pip install --system cmake scikit-build
pip_install_test_and_uninstall: ON
- name: 'Code formatting'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -251,7 +251,7 @@ jobs:
context: PATH=$GITHUB_WORKSPACE:$PATH
target: check_code_formatting
- name: 'JavaScript code formatting'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -263,7 +263,7 @@ jobs:
unit_testing: OFF
target: javascript_check_code_formatting
- name: 'Python code formatting'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand All @@ -275,7 +275,7 @@ jobs:
unit_testing: OFF
target: python_check_code_formatting
- name: 'Code analysis'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: ON
code_coverage: OFF
Expand All @@ -300,7 +300,7 @@ jobs:
context: PATH=/opt/homebrew/opt/llvm@20/bin:$PATH CC=/opt/homebrew/opt/llvm@20/bin/clang CXX=/opt/homebrew/opt/llvm@20/bin/clang++
target: code_coverage
- name: 'Memory checks'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Debug
code_analysis: OFF
code_coverage: OFF
Expand All @@ -312,7 +312,7 @@ jobs:
unit_testing: ON
target: memory_checks
- name: 'Documentation'
os: ubuntu-22.04
os: ubuntu-24.04
build_type: Release
code_analysis: OFF
code_coverage: OFF
Expand Down Expand Up @@ -487,7 +487,7 @@ jobs:
run: uv pip uninstall --system libopencor
spell_check:
name: Spell check
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ if(EMSCRIPTEN)

add_subdirectory(src)
else()
# On macOS, deploy on macOS 13 and later.
# On macOS, deploy on macOS 14 and later.
# Note: the value of MACOS_DEPLOYMENT_TARGET must be in sync with that of CIBW_ENVIRONMENT_MACOS in
# .github/workflows/cd.yml.

if(APPLE)
Comment thread
agarny marked this conversation as resolved.
set(MACOS_DEPLOYMENT_TARGET 13)
set(MACOS_DEPLOYMENT_TARGET 14)

if("${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
set(CMAKE_OSX_DEPLOYMENT_TARGET ${MACOS_DEPLOYMENT_TARGET})
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.20260409.1
0.20260416.0
2 changes: 1 addition & 1 deletion cmake/packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function(retrieve_package PACKAGE_NAME PACKAGE_VERSION PACKAGE_REPOSITORY RELEAS
set(PACKAGE_URL "https://github.com/opencor/${PACKAGE_REPOSITORY}/releases/download/${RELEASE_TAG}/${PACKAGE_FILE}")

if("${PACKAGE_NAME}" STREQUAL "libCellML")
set(PACKAGE_URL "https://github.com/agarny/${PACKAGE_REPOSITORY}/releases/download/8cfa98e/${PACKAGE_FILE}")
set(PACKAGE_URL "https://github.com/agarny/${PACKAGE_REPOSITORY}/releases/download/6c970b7/${PACKAGE_FILE}")
endif()

set(ATTEMPT 1)
Expand Down
20 changes: 10 additions & 10 deletions src/3rdparty/libCellML/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,49 +34,49 @@ if(LIBOPENCOR_PREBUILT_LIBCELLML)
if(EMSCRIPTEN)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
45feae9508ee694b27f813b43ede20b29521d1d5)
5cb4721d595594e82506c2b100642f34a7426e67)
else()
if(WIN32)
if(RELEASE_MODE)
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
52a5e21ec7c83526853175cfc996631bebbbc22d)
727b7dc43a9f125965105d340be0d5da3b0ca107)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
17a4405f8ce5dec66cd18eb881335a882de36e70)
8efb6f27fb2487cae75e4f2001058e987084e520)
endif()
else()
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
49da1cc047be6caace7e011e71aa28acf11f77b0)
e65148844e68d800f6542a1aaf9e1803f8abb10f)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
eea3705a481e9b703d544b5bb8c438d2cc25c0bb)
89a0a89adba941858aa269e0ee1ca88f385c01e3)
endif()
endif()
elseif(APPLE)
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
4abb7649dd9410bdc8ee466b28fbab33d12cadbe)
a825eaa30456ae131d146174b4575d247173a603)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
2a49cdf98ecb277b32976bf7db1c4831d408bb8d)
8afff08fe254df1e1599a8b2aae5c1061de06728)
endif()
else()
if(INTEL_MODE)
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
6253f25c88f6e88d316a8c9b04e0096aaeb387b1)
a6972bf4124a2fd24bc4323383e1f4af5a0e1a05)
else()
retrieve_package(${PACKAGE_NAME} ${PACKAGE_VERSION}
${PACKAGE_REPOSITORY} ${RELEASE_TAG}
bc9b411b9863cea950186edead96b8ef739fc6a1)
e973eabfc82f250fe1f4512f43d16091e61146fc)
endif()
endif()
endif()
Expand All @@ -86,7 +86,7 @@ elseif(NOT ONLY_BUILD_JAVASCRIPT_THIRD_PARTY_LIBRARIES)
build_package(${PACKAGE_NAME}
URL
# https://github.com/opencor/${PACKAGE_REPOSITORY}/archive/refs/tags/${RELEASE_TAG}.tar.gz
https://github.com/agarny/${PACKAGE_REPOSITORY}/archive/refs/tags/8cfa98e.tar.gz
https://github.com/agarny/${PACKAGE_REPOSITORY}/archive/refs/tags/6c970b7.tar.gz
DOWNLOAD_NO_PROGRESS ON
CMAKE_ARGS
-DBINDINGS_PYTHON=OFF
Expand Down
6 changes: 6 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ if(BUILDING_USING_MSVC)
endif()
endif()

# Prefer maximum optimisation for native non-MSVC release builds.

if(RELEASE_MODE AND NOT BUILDING_USING_MSVC)
replace_compiler_flag("-O2" "-O3")
endif()

# Build our different third-party libraries.

add_subdirectory(3rdparty)
Expand Down
18 changes: 9 additions & 9 deletions src/api/libopencor/file.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The file name, as a @c std::string, of this file.
*/

std::string fileName() const;
const std::string &fileName() const;

/**
* @brief Get the URL of this file.
Expand All @@ -132,7 +132,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The URL, as a @c std::string, of this file.
*/

std::string url() const;
const std::string &url() const;

/**
* @brief Get the path of this file.
Expand All @@ -145,7 +145,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The path, as a @c std::string, of this file.
*/

std::string path() const;
const std::string &path() const;

/**
* @brief Get the contents of this file.
Expand All @@ -155,7 +155,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The contents, as an @ref UnsignedChars, of this file.
*/

UnsignedChars contents();
const UnsignedChars &contents();

/**
* @brief Set the contents of this file.
Expand Down Expand Up @@ -195,7 +195,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The child file names, as a @ref Strings.
*/

Strings childFileNames() const;
const Strings &childFileNames() const;

/**
* @brief Return the child files.
Expand All @@ -205,7 +205,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The child files, as a @ref FilePtrs.
*/

FilePtrs childFiles() const;
const FilePtrs &childFiles() const;

/**
* @brief Return a child file.
Expand All @@ -217,7 +217,7 @@ class LIBOPENCOR_EXPORT File: public Logger
* @return The file, as a @ref FilePtr, if it is a child file of this file, @c nullptr otherwise.
*/

FilePtr childFile(size_t pIndex) const;
const FilePtr &childFile(size_t pIndex) const;

/**
* @brief Return a child file.
Expand All @@ -230,9 +230,9 @@ class LIBOPENCOR_EXPORT File: public Logger
*/

#ifdef __EMSCRIPTEN__
FilePtr childFileFromFileName(const std::string &pFileName) const;
const FilePtr &childFileFromFileName(const std::string &pFileName) const;
#else
FilePtr childFile(const std::string &pFileName) const;
const FilePtr &childFile(const std::string &pFileName) const;
#endif

private:
Expand Down
Loading
Loading