From 79e36697d6d9ba7cb20b8dabacbaadc59d0bc9dd Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Mon, 23 May 2022 21:35:47 +0200 Subject: [PATCH 01/47] BLD: Don't unset CMAKE_INSTALL_PREFIX unless in dev mode --- cmake/ClearOptions.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/ClearOptions.cmake b/cmake/ClearOptions.cmake index 2a80c58a..71a7ed57 100644 --- a/cmake/ClearOptions.cmake +++ b/cmake/ClearOptions.cmake @@ -1,3 +1,6 @@ +IF (CARMA_DEV_MODE OR CARMA_DEV_DEBUG_MODE) + UNSET(CMAKE_INSTALL_PREFIX CACHE) +ENDIF() UNSET(CARMA_DEV_DEBUG_MODE CACHE) UNSET(CARMA_BUILD_TESTS CACHE) UNSET(ENABLE_CARMA_EXTRA_DEBUG CACHE) @@ -5,7 +8,6 @@ UNSET(ENABLE_CARMA_SOFT_STEAL CACHE) UNSET(ENABLE_CARMA_HARD_STEAL CACHE) UNSET(ENABLE_CARMA_DONT_REQUIRE_OWNDATA CACHE) UNSET(ENABLE_CARMA_DONT_REQUIRE_F_CONTIGUOUS CACHE) -UNSET(CMAKE_INSTALL_PREFIX CACHE) SET(CMAKE_EXPORT_COMPILE_COMMANDS 0) UNSET(BUILD_NATIVE_TESTS CACHE) UNSET(BUILD_PYTHON_TESTS CACHE) From 2380e41914d0d39af088adfd2dcc24d6179be831 Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 27 Jun 2022 02:52:07 +0000 Subject: [PATCH 02/47] update armadillo gitlab branch to 11.2.x --- cmake/GetArmadillo.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 218082fe..201f7c23 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -1,12 +1,12 @@ include(FetchContent) -SET(DEFAULT_ARMA_VERSION 11.1.x) +SET(DEFAULT_ARMA_VERSION 11.2.x) IF (NOT USE_ARMA_VERSION) MESSAGE(STATUS "carma: Setting Armadillo version to 'v${DEFAULT_ARMA_VERSION}' as none was specified.") SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.1.x" + "10.6.x" "10.8.x" "11.2.x" ) ENDIF () From 5673bc713e9515a00fba0c7378375fc075bdc693 Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 27 Jun 2022 02:53:26 +0000 Subject: [PATCH 03/47] update armadillo gitlab branch to 11.2.x --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index f10cee86..7e4fe253 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.1.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x"] pybind: ["v2.6.0", "v2.9.2"] steps: From d1bb7d2d0d74a70e078dbeb89161c0ed36baa701 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Tue, 16 Aug 2022 09:21:53 +0200 Subject: [PATCH 04/47] CICD: Update minimum Numpy version to one with wheel support --- .github/workflows/test_numpy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index 21a5a95c..590dc48c 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -49,7 +49,7 @@ jobs: cxx: "g++-9", generators: "Ninja", target: "all", - numpy: "numpy==1.14.6" + numpy: "numpy==1.18.5" } - { name: "Latest Numpy version", @@ -59,7 +59,7 @@ jobs: cxx: "g++-9", generators: "Ninja", target: "all", - numpy: "numpy>1.14.6" + numpy: "numpy" } steps: From 4e9da1b980a50d4b580861041c793ccf5d61acad Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 5 Oct 2022 13:39:46 +0200 Subject: [PATCH 05/47] BLD: update armadillo gitlab branch to 11.4.x --- cmake/GetArmadillo.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 201f7c23..2c8f982c 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -1,12 +1,12 @@ include(FetchContent) -SET(DEFAULT_ARMA_VERSION 11.2.x) +SET(DEFAULT_ARMA_VERSION 11.4.x) IF (NOT USE_ARMA_VERSION) MESSAGE(STATUS "carma: Setting Armadillo version to 'v${DEFAULT_ARMA_VERSION}' as none was specified.") SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.2.x" + "10.6.x" "10.8.x" "11.2.x" "11.4.x" ) ENDIF () From 2fcf1229981e8b427a2c65704c8c82918b1a3adc Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 5 Oct 2022 13:40:15 +0200 Subject: [PATCH 06/47] CICD: Update latest Pybind11 and Armadillo versions --- .github/workflows/dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 7e4fe253..8f168d8b 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,8 +35,8 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x"] - pybind: ["v2.6.0", "v2.9.2"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x"] + pybind: ["v2.6.0", "v2.10.0"] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it From efbe05237a6764f546ef6b0da8b308078f29650f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mr=C3=A1zek?= Date: Wed, 19 Oct 2022 15:30:30 +0200 Subject: [PATCH 07/47] FIX: Support fixed-size matrices --- include/carma_bits/converters.h | 25 +++++++++++++++++++++++++ include/carma_bits/typecheck.h | 5 ++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/include/carma_bits/converters.h b/include/carma_bits/converters.h index b8a865c6..dea7d377 100644 --- a/include/carma_bits/converters.h +++ b/include/carma_bits/converters.h @@ -685,6 +685,31 @@ inline py::array_t to_numpy(armaT* src, int copy = 0) { return details::construct_array(data); } /* to_numpy */ +template = 4> +inline py::array_t to_numpy(armaT& src, int copy = 0) { + // if not copy we steal + armaT* data; + if (!copy) { + data = new armaT(std::move(src)); + } else { + data = new armaT(src.memptr()); + } + return details::construct_array(data); +} /* to_numpy */ + +template = 4> +inline py::array_t to_numpy(armaT* src, int copy = 0) { + // if not copy we steal + armaT* data; + if (!copy) { + data = new armaT(std::move(*src)); + } else { + data = new armaT(src->memptr()); + } + return details::construct_array(data); +} /* to_numpy */ + + /* ---------------------------------- to_numpy_view ---------------------------------- */ template inline py::array_t to_numpy_view(const armaT& src) { diff --git a/include/carma_bits/typecheck.h b/include/carma_bits/typecheck.h index a0b63e5b..0807c0db 100644 --- a/include/carma_bits/typecheck.h +++ b/include/carma_bits/typecheck.h @@ -34,7 +34,10 @@ using is_Vec = std::enable_if_t::value, int>; template using is_Mat = std::enable_if_t::value, int>; template -using is_Mat_only = std::enable_if_t::value, int>; +using is_Mat_only = std::enable_if_t< arma::is_Mat_only::value && + !arma::is_Mat_fixed_only::value, int>; +template +using is_Mat_fixed_only = std::enable_if_t::value, int>; template struct is_mat : std::false_type {}; From 2df0a6ee1f6afdebab3c7b5fb1dff6e490cfed3e Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:16:45 +0100 Subject: [PATCH 08/47] CICD: Update Python versions to include 3.11 --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e473fbd9..57fcfd32 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] config: - { name: "Ubuntu (Clang-10)", diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 38701276..f0f215d7 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] config: - { name: "macOS (Clang)", diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 1661ae0f..2a0c34e4 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9"] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] config: - { name: "Windows (MSVC)", From 46774aa60a9f0098c70b47f76d6397c11511e477 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:18:31 +0100 Subject: [PATCH 09/47] CICD: Bump checkout and setup-python versions --- .github/workflows/asan.yml | 8 +++----- .github/workflows/coverage.yml | 6 +++--- .github/workflows/dependencies.yml | 6 +++--- .github/workflows/install_test.yml | 6 +++--- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- .github/workflows/mre.yml | 6 +++--- .github/workflows/test_matrix.yml | 6 +++--- .github/workflows/test_numpy.yml | 6 +++--- .github/workflows/windows.yml | 4 ++-- 10 files changed, 27 insertions(+), 29 deletions(-) diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 763066fb..ddb89793 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -24,18 +24,16 @@ jobs: needs: pre_job if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest - strategy: - fail-fast: True steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: "3.10" - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 39e1bc6b..00d40b6b 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -74,13 +74,13 @@ jobs: } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 8f168d8b..429b0d25 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -40,13 +40,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: false - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/install_test.yml b/.github/workflows/install_test.yml index ab31a862..c650f3d4 100644 --- a/.github/workflows/install_test.yml +++ b/.github/workflows/install_test.yml @@ -77,13 +77,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 57fcfd32..5ca5418c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -60,11 +60,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index f0f215d7..047a70ab 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -51,11 +51,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/mre.yml b/.github/workflows/mre.yml index 5eb899a0..d33d0867 100644 --- a/.github/workflows/mre.yml +++ b/.github/workflows/mre.yml @@ -89,13 +89,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/test_matrix.yml b/.github/workflows/test_matrix.yml index 4381739d..067a3e19 100644 --- a/.github/workflows/test_matrix.yml +++ b/.github/workflows/test_matrix.yml @@ -69,13 +69,13 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index 590dc48c..b31051cc 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -63,13 +63,13 @@ jobs: } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 2a0c34e4..84ee0ecc 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -52,11 +52,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} From 49d5f771bb5f50af014841b0717078cde586d2af Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:20:47 +0100 Subject: [PATCH 10/47] CICD: Update compiler versions of Clang and GCC --- .github/workflows/asan.yml | 6 +++--- .github/workflows/coverage.yml | 16 ++++++++-------- .github/workflows/install_test.yml | 12 ++++++------ .github/workflows/linux.yml | 12 ++++++------ .github/workflows/mre.yml | 18 +++++++++--------- .github/workflows/test_matrix.yml | 12 ++++++------ .github/workflows/test_numpy.yml | 8 ++++---- .github/workflows/valgrind.yml | 22 +++++++++++----------- 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index ddb89793..8d62ad15 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -20,7 +20,7 @@ jobs: # All of these options are optional, so you can remove them if you are happy with the defaults cancel_others: 'true' build: - name: "Asan Python (Clang-10)" + name: "Asan Python (Clang-14)" needs: pre_job if: ${{ needs.pre_job.outputs.should_skip != 'true' }} runs-on: ubuntu-latest @@ -64,8 +64,8 @@ jobs: -DCARMA_BUILD_TESTS=ON \ -DBUILD_NATIVE_TESTS=OFF \ -DBUILD_PYTHON_TESTS=ON \ - -DCMAKE_C_COMPILER=clang-10 \ - -DCMAKE_CXX_COMPILER=clang++-10 \ + -DCMAKE_C_COMPILER=clang-14 \ + -DCMAKE_CXX_COMPILER=clang++-14 \ -DCMAKE_INSTALL_PREFIX:PATH=. \ -DPython3_EXECUTABLE=${PY_CMD} \ -DCMAKE_BUILD_TYPE=Asan \ diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 00d40b6b..b2e7ff24 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -36,8 +36,8 @@ jobs: name: "Default settings", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "" @@ -46,8 +46,8 @@ jobs: name: "Hard steal", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "-DENABLE_CARMA_HARD_STEAL=ON" @@ -56,8 +56,8 @@ jobs: name: "Soft steal", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "-DENABLE_CARMA_SOFT_STEAL=ON" @@ -66,8 +66,8 @@ jobs: name: "Not own data", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "-DENABLE_CARMA_DONT_REQUIRE_OWNDATA=ON" diff --git a/.github/workflows/install_test.yml b/.github/workflows/install_test.yml index c650f3d4..93e0f0c3 100644 --- a/.github/workflows/install_test.yml +++ b/.github/workflows/install_test.yml @@ -48,20 +48,20 @@ jobs: target: "ALL_BUILD" } - { - name: "Ubuntu (Clang-10)", + name: "Ubuntu (Clang-14)", os: ubuntu-latest, build_type: "Release", - cc: "clang-10", - cxx: "clang++-10", + cc: "clang-14", + cxx: "clang++-14", generators: "Ninja", target: "all" } - { - name: "Ubuntu (GCC-9)", + name: "Ubuntu (GCC-11)", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all" } diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5ca5418c..a1c2efd0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -40,20 +40,20 @@ jobs: python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] config: - { - name: "Ubuntu (Clang-10)", + name: "Ubuntu (Clang-14)", os: ubuntu-latest, build_type: "Release", - cc: "clang-10", - cxx: "clang++-10", + cc: "clang-14", + cxx: "clang++-14", generators: "Ninja", target: "all" } - { - name: "Ubuntu (GCC-9)", + name: "Ubuntu (GCC-11)", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all" } diff --git a/.github/workflows/mre.yml b/.github/workflows/mre.yml index d33d0867..15e5c882 100644 --- a/.github/workflows/mre.yml +++ b/.github/workflows/mre.yml @@ -51,29 +51,29 @@ jobs: target: "ALL_BUILD" } - { - name: "Ubuntu (Clang-10)", + name: "Ubuntu (Clang-12)", os: ubuntu-latest, build_type: "Release", - cc: "clang-10", - cxx: "clang++-10", + cc: "clang-14", + cxx: "clang++-14", generators: "Ninja", target: "all" } - { - name: "Ubuntu (Clang-11)", + name: "Ubuntu (Clang-14)", os: ubuntu-latest, build_type: "Release", - cc: "clang-11", - cxx: "clang++-11", + cc: "clang-14", + cxx: "clang++-14", generators: "Ninja", target: "all" } - { - name: "Ubuntu (GCC-9)", + name: "Ubuntu (GCC-11)", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all" } diff --git a/.github/workflows/test_matrix.yml b/.github/workflows/test_matrix.yml index 067a3e19..f4ab8a98 100644 --- a/.github/workflows/test_matrix.yml +++ b/.github/workflows/test_matrix.yml @@ -40,20 +40,20 @@ jobs: target: "ALL_BUILD" } - { - name: "Ubuntu (Clang-10)", + name: "Ubuntu (Clang-14)", os: ubuntu-latest, build_type: "Release", - cc: "clang-10", - cxx: "clang++-10", + cc: "clang-14", + cxx: "clang++-14", generators: "Ninja", target: "all" } - { - name: "Ubuntu (GCC-9)", + name: "Ubuntu (GCC-11)", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all" } diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index b31051cc..664c223e 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -45,8 +45,8 @@ jobs: name: "Minimum Numpy version", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", numpy: "numpy==1.18.5" @@ -55,8 +55,8 @@ jobs: name: "Latest Numpy version", os: ubuntu-latest, build_type: "Release", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", numpy: "numpy" diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index a912520c..bef3151a 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -43,8 +43,8 @@ jobs: name: "Default settings", os: ubuntu-latest, build_type: "Debug", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "" @@ -53,8 +53,8 @@ jobs: name: "Hard steal", os: ubuntu-latest, build_type: "Debug", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "-DENABLE_CARMA_HARD_STEAL=ON" @@ -63,8 +63,8 @@ jobs: name: "Soft steal", os: ubuntu-latest, build_type: "Debug", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "-DENABLE_CARMA_HARD_STEAL=ON" @@ -73,21 +73,21 @@ jobs: name: "Not own data", os: ubuntu-latest, build_type: "Debug", - cc: "gcc-9", - cxx: "g++-9", + cc: "gcc-11", + cxx: "g++-11", generators: "Ninja", target: "all", options: "-DENABLE_CARMA_DONT_REQUIRE_OWNDATA=ON" } steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: '3.10' - uses: seanmiddleditch/gha-setup-ninja@master From c230baa946da5ee2bb5adb6d6fe0bf8e94219f0f Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:39:13 +0100 Subject: [PATCH 11/47] CICD: Install Ninja manually to prevent usage of outdated Github action --- .github/workflows/asan.yml | 4 +--- .github/workflows/coverage.yml | 4 +--- .github/workflows/dependencies.yml | 8 +++----- .github/workflows/install_test.yml | 8 +++----- .github/workflows/linux.yml | 4 +--- .github/workflows/macos.yml | 4 +--- .github/workflows/mre.yml | 8 +++----- .github/workflows/test_matrix.yml | 8 +++----- .github/workflows/test_numpy.yml | 4 +--- .github/workflows/valgrind.yml | 4 +--- .github/workflows/windows.yml | 4 +--- 11 files changed, 19 insertions(+), 41 deletions(-) diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 8d62ad15..0c0cbdad 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -35,8 +35,6 @@ jobs: with: python-version: "3.10" - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -44,7 +42,7 @@ jobs: - name: Install dependencies run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja ninja --version cmake --version diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b2e7ff24..b3347d9e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -82,8 +82,6 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -91,7 +89,7 @@ jobs: - name: Install dependencies on ubuntu run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja sudo apt install -y lcov ninja --version cmake --version diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 429b0d25..1cd8d29f 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -48,8 +48,6 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -57,7 +55,7 @@ jobs: - name: Install dependencies on ubuntu run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja ninja --version cmake --version @@ -77,8 +75,8 @@ jobs: -DCARMA_BUILD_TESTS=ON \ -DUSE_ARMA_VERSION=${{ matrix.armadillo }} \ -DUSE_PYBIND11_VERSION=${{ matrix.pybind }} \ - -DCMAKE_C_COMPILER=clang-10 \ - -DCMAKE_CXX_COMPILER=clang++-10 \ + -DCMAKE_C_COMPILER=clang-14 \ + -DCMAKE_CXX_COMPILER=clang++-14 \ -DCMAKE_INSTALL_PREFIX:PATH=. \ -DPython3_EXECUTABLE=${PY_CMD} \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/.github/workflows/install_test.yml b/.github/workflows/install_test.yml index 93e0f0c3..fb80abcf 100644 --- a/.github/workflows/install_test.yml +++ b/.github/workflows/install_test.yml @@ -85,8 +85,6 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -95,21 +93,21 @@ jobs: - name: Install dependencies on windows if: startsWith(matrix.config.os, 'windows') run: | - choco install cmake + choco install cmake ninja ninja --version cmake --version - name: Install dependencies on ubuntu if: runner.os == 'Linux' run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja ninja --version cmake --version - name: Install dependencies on macos if: startsWith(matrix.config.os, 'macos') run: | - python -m pip install cmake + python -m pip install cmake ninja ninja --version cmake --version diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a1c2efd0..5c32b05e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -68,8 +68,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -77,7 +75,7 @@ jobs: - name: Install dependencies on ubuntu run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja ninja --version cmake --version diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 047a70ab..3cee1f3c 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -59,8 +59,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -68,7 +66,7 @@ jobs: - name: Install dependencies on macos run: | - python -m pip install cmake + python -m pip install cmake ninja ninja --version cmake --version diff --git a/.github/workflows/mre.yml b/.github/workflows/mre.yml index 15e5c882..f4240a33 100644 --- a/.github/workflows/mre.yml +++ b/.github/workflows/mre.yml @@ -97,8 +97,6 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -107,7 +105,7 @@ jobs: - name: Install dependencies on windows if: startsWith(matrix.config.os, 'windows') run: | - choco install cmake + choco install cmake ninja ninja --version cmake --version @@ -121,14 +119,14 @@ jobs: - name: Install dependencies on ubuntu if: runner.os == 'Linux' run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja ninja --version cmake --version - name: Install dependencies on macos if: startsWith(matrix.config.os, 'macos') run: | - python -m pip install cmake + python -m pip install cmake ninja ninja --version cmake --version diff --git a/.github/workflows/test_matrix.yml b/.github/workflows/test_matrix.yml index f4ab8a98..7f73065a 100644 --- a/.github/workflows/test_matrix.yml +++ b/.github/workflows/test_matrix.yml @@ -77,8 +77,6 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -87,21 +85,21 @@ jobs: - name: Install dependencies on windows if: startsWith(matrix.config.os, 'windows') run: | - choco install cmake + choco install cmake ninja ninja --version cmake --version - name: Install dependencies on ubuntu if: runner.os == 'Linux' run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja ninja --version cmake --version - name: Install dependencies on macos if: startsWith(matrix.config.os, 'macos') run: | - python -m pip install cmake + python -m pip install cmake ninja ninja --version cmake --version diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index 664c223e..43b4abc2 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -71,12 +71,10 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install pytest cmake + python -m pip install pytest cmake ninja python -m pip install ${{ matrix.config.numpy }} sudo apt install -y libopenblas-dev ninja --version diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index bef3151a..85fac634 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -89,8 +89,6 @@ jobs: with: python-version: '3.10' - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -98,7 +96,7 @@ jobs: - name: Install dependencies on ubuntu run: | - python -m pip install --upgrade cmake + python -m pip install --upgrade cmake ninja sudo apt install -y valgrind ninja --version cmake --version diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 84ee0ecc..331a1639 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -60,8 +60,6 @@ jobs: with: python-version: ${{ matrix.python-version }} - - uses: seanmiddleditch/gha-setup-ninja@master - - name: Print env run: | echo github.event.action: ${{ github.event.action }} @@ -69,7 +67,7 @@ jobs: - name: Install dependencies on windows run: | - choco install cmake + choco install cmake ninja ninja --version cmake --version From 2a3c414c3766842e09354c9a205b257f56e7927e Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:42:41 +0100 Subject: [PATCH 12/47] FIX: Fix lack off size_t on Windows with Python >= 3.10 --- include/carma | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/carma b/include/carma index df46c33d..78dbdba0 100644 --- a/include/carma +++ b/include/carma @@ -20,6 +20,14 @@ #include +#if defined(_MSC_VER) +#pragma warning(push) +#pragma warning( \ + disable : 4127) // warning C4127: Conditional expression is constant +#include +typedef SSIZE_T ssize_t; +#endif + #if defined(CARMA_ARMA_ALIEN_MEM_FUNCTIONS_SET) #if (defined(ARMA_ALIEN_MEM_ALLOC_FUNCTION) && !defined(ARMA_ALIEN_MEM_FREE_FUNCTION)) || (!defined(ARMA_ALIEN_MEM_ALLOC_FUNCTION) && defined(ARMA_ALIEN_MEM_FREE_FUNCTION)) #error "carma: ARMA_ALIEN_MEM_ALLOC_FUNCTION and or ARMA_ALIEN_MEM_FREE_FUNCTION not set while CARMA_ARMA_ALIEN_MEM_FUNCTIONS_SET is" From bd34554e1ede35012007eed2f2c29116d18f9aa4 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:51:40 +0100 Subject: [PATCH 13/47] CICD: Use Python 3.8 for minimum Numpy build --- .github/workflows/test_numpy.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index 43b4abc2..30cdfcd1 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -49,7 +49,8 @@ jobs: cxx: "g++-11", generators: "Ninja", target: "all", - numpy: "numpy==1.18.5" + numpy: "numpy==1.18.5", + python-version: "3.8" } - { name: "Latest Numpy version", @@ -59,7 +60,8 @@ jobs: cxx: "g++-11", generators: "Ninja", target: "all", - numpy: "numpy" + numpy: "numpy", + python-version: "3.11" } steps: @@ -69,7 +71,7 @@ jobs: - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: ${{ matrix.config.python-version }} - name: Install dependencies run: | From 8e696b4e7742268e0195d748fa6dd1085c0a402e Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Thu, 8 Dec 2022 21:54:06 +0100 Subject: [PATCH 14/47] CICD: Raise minimum Python version in tests to 3.7 --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5c32b05e..83a0a0e5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] config: - { name: "Ubuntu (Clang-14)", diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3cee1f3c..d189f14e 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] config: - { name: "macOS (Clang)", diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 331a1639..404b8736 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] config: - { name: "Windows (MSVC)", From da1dee2538f10eefd36ae4795288f0d2b5407d8a Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 20 Feb 2023 06:29:23 +0000 Subject: [PATCH 15/47] add armadillo 12.0.x branch --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 1cd8d29f..a219e1b9 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.0.x"] pybind: ["v2.6.0", "v2.10.0"] steps: From c51d392ed4ac9c1a3712754ee7ccd6f885143cab Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 20 Feb 2023 06:30:34 +0000 Subject: [PATCH 16/47] add armadillo 12.0.x branch --- cmake/GetArmadillo.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 2c8f982c..1c0151ed 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -1,12 +1,12 @@ include(FetchContent) -SET(DEFAULT_ARMA_VERSION 11.4.x) +SET(DEFAULT_ARMA_VERSION 12.0.x) IF (NOT USE_ARMA_VERSION) MESSAGE(STATUS "carma: Setting Armadillo version to 'v${DEFAULT_ARMA_VERSION}' as none was specified.") SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.2.x" "11.4.x" + "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.0.x" ) ENDIF () From 8405bafc40b1bf06795e7004c7898a08963b688c Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Sat, 1 Apr 2023 13:08:17 +0200 Subject: [PATCH 17/47] REL: Release of v0.6.7 --- CMakeLists.txt | 398 +++++++++++++++++++++----------------------- docs/source/conf.py | 32 ++-- include/carma | 4 +- 3 files changed, 204 insertions(+), 230 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 94e768ea..444b18ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,228 +1,202 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 3.16) - -SET(CARMA_VERSION_MAJOR 0) -SET(CARMA_VERSION_MINOR 6) -SET(CARMA_VERSION_PATCH 6) -SET(CARMA_VERSION_INFO "${CARMA_VERSION_MAJOR}.${CARMA_VERSION_MINOR}.${CARMA_VERSION_PATCH}") - -PROJECT( - carma - VERSION ${CARMA_VERSION_INFO} - LANGUAGES CXX -) -INCLUDE(GNUInstallDirs) - -SET(CMAKE_MODULE_PATH_SAVED ${CMAKE_MODULE_PATH}) -LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake") +cmake_minimum_required(VERSION 3.16) + +set(CARMA_VERSION_MAJOR 0) +set(CARMA_VERSION_MINOR 6) +set(CARMA_VERSION_PATCH 7) +set(CARMA_VERSION_INFO + "${CARMA_VERSION_MAJOR}.${CARMA_VERSION_MINOR}.${CARMA_VERSION_PATCH}") + +project( + carma + VERSION ${CARMA_VERSION_INFO} + LANGUAGES CXX) +include(GNUInstallDirs) + +set(CMAKE_MODULE_PATH_SAVED ${CMAKE_MODULE_PATH}) +list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake") # ############################################################################## -# SETTINGS # +# SETTINGS # # ############################################################################## -OPTION(CARMA_INSTALL_LIB "Install CARMA headers" OFF) -SET(CARMA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/carma") +option(CARMA_INSTALL_LIB "Install CARMA headers" OFF) +set(CARMA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/carma") -SET(DEFAULT_BUILD_TYPE "Release") +set(DEFAULT_BUILD_TYPE "Release") # Set build type to Release if not specified -INCLUDE(BuildType) +include(BuildType) -IF (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") - # workaround like https://github.com/nlohmann/json/issues/1408 - # to avoid error like: carma\...\include\armadillo_bits/arma_str.hpp(194): - # error C2039: '_snprintf': is not a member of 'std' - ADD_DEFINITIONS(-DHAVE_SNPRINTF) -ENDIF () +if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # workaround like https://github.com/nlohmann/json/issues/1408 to avoid error + # like: carma\...\include\armadillo_bits/arma_str.hpp(194): error C2039: + # '_snprintf': is not a member of 'std' + add_definitions(-DHAVE_SNPRINTF) +endif() -OPTION(CARMA_DEV_MODE "Enable additional definitions for development" OFF) -OPTION(CARMA_DEV_DEBUG_MODE "Turn on all debugging definitions" OFF) -OPTION(CARMA_BUILD_TESTS "Build tests for carma" OFF) -OPTION(CARMA_BUILD_EXAMPLES "Build examples for carma" OFF) +option(CARMA_DEV_MODE "Enable additional definitions for development" OFF) +option(CARMA_DEV_DEBUG_MODE "Turn on all debugging definitions" OFF) +option(CARMA_BUILD_TESTS "Build tests for carma" OFF) +option(CARMA_BUILD_EXAMPLES "Build examples for carma" OFF) # collect user settable options -INCLUDE(${PROJECT_SOURCE_DIR}/carma_config.cmake) -INCLUDE(ParseOptions) -CONFIGURE_FILE( - ${PROJECT_SOURCE_DIR}/include/carma_bits/config.h.in - ${PROJECT_BINARY_DIR}/include/carma_bits/generated_config.h - @ONLY -) +include(${PROJECT_SOURCE_DIR}/carma_config.cmake) +include(ParseOptions) +configure_file( + ${PROJECT_SOURCE_DIR}/include/carma_bits/config.h.in + ${PROJECT_BINARY_DIR}/include/carma_bits/generated_config.h @ONLY) # ############################################################################## -# TARGET # +# TARGET # # ############################################################################## -ADD_LIBRARY(carma INTERFACE) -ADD_LIBRARY(carma::carma ALIAS carma) - -TARGET_COMPILE_DEFINITIONS(carma - INTERFACE - CARMA_USE_GENERATED_CONFIG=1 - CARMA_VERSION_MAJOR=${CARMA_VERSION_MAJOR} - CARMA_VERSION_MINOR=${CARMA_VERSION_MINOR} - CARMA_VERSION_PATCH=${CARMA_VERSION_PATCH} - CARMA_VERSION_NAME=${CARMA_VERSION_INFO} - "$<$:${CARMA_RELEASE_DEFINITIONS}>" -) -TARGET_COMPILE_FEATURES(carma INTERFACE cxx_std_14) - -IF(CARMA_DEV_MODE) - TARGET_COMPILE_OPTIONS(carma - INTERFACE - -Wall - -Wextra - -Wunused-variable - -Wunused-const-variable - ) -ENDIF() - -TARGET_INCLUDE_DIRECTORIES(carma - INTERFACE - $ - $ - $ -) - -TARGET_LINK_LIBRARIES(carma - INTERFACE - armadillo::armadillo - Python3::NumPy - Python3::Module - pybind11::pybind11 -) - -ADD_LIBRARY(carma_headers INTERFACE) -ADD_LIBRARY(carma::headers ALIAS carma_headers) - -TARGET_COMPILE_DEFINITIONS(carma_headers - INTERFACE - CARMA_VERSION_MAJOR=${CARMA_VERSION_MAJOR} - CARMA_VERSION_MINOR=${CARMA_VERSION_MINOR} - CARMA_VERSION_PATCH=${CARMA_VERSION_PATCH} - CARMA_VERSION_NAME=${CARMA_VERSION_INFO} -) -TARGET_COMPILE_FEATURES(carma_headers INTERFACE cxx_std_14) - -TARGET_INCLUDE_DIRECTORIES(carma_headers - INTERFACE - $ - $ - $ -) - +add_library(carma INTERFACE) +add_library(carma::carma ALIAS carma) + +target_compile_definitions( + carma + INTERFACE CARMA_USE_GENERATED_CONFIG=1 + CARMA_VERSION_MAJOR=${CARMA_VERSION_MAJOR} + CARMA_VERSION_MINOR=${CARMA_VERSION_MINOR} + CARMA_VERSION_PATCH=${CARMA_VERSION_PATCH} + CARMA_VERSION_NAME=${CARMA_VERSION_INFO} + "$<$:${CARMA_RELEASE_DEFINITIONS}>") +target_compile_features(carma INTERFACE cxx_std_14) + +if(CARMA_DEV_MODE) + target_compile_options(carma INTERFACE -Wall -Wextra -Wunused-variable + -Wunused-const-variable) +endif() + +target_include_directories( + carma + INTERFACE $ + $ + $) + +target_link_libraries(carma INTERFACE armadillo::armadillo Python3::NumPy + Python3::Module pybind11::pybind11) + +add_library(carma_headers INTERFACE) +add_library(carma::headers ALIAS carma_headers) + +target_compile_definitions( + carma_headers + INTERFACE CARMA_VERSION_MAJOR=${CARMA_VERSION_MAJOR} + CARMA_VERSION_MINOR=${CARMA_VERSION_MINOR} + CARMA_VERSION_PATCH=${CARMA_VERSION_PATCH} + CARMA_VERSION_NAME=${CARMA_VERSION_INFO}) +target_compile_features(carma_headers INTERFACE cxx_std_14) + +target_include_directories( + carma_headers + INTERFACE $ + $ + $) # Only install the headers -IF (CARMA_INSTALL_LIB) - # modified from https://dominikberner.ch/cmake-interface-lib/ - - # locations are provided by GNUInstallDirs - INSTALL( - TARGETS carma - EXPORT carma_Targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) - - INSTALL( - TARGETS carma_headers - EXPORT carma_Header_Targets - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) - - INCLUDE(CMakePackageConfigHelpers) - write_basic_package_version_file( - "carmaConfigVersion.cmake" - VERSION ${PROJECT_VERSION} - COMPATIBILITY SameMinorVersion - ) - - configure_package_config_file( - "${PROJECT_SOURCE_DIR}/cmake/carmaConfig.cmake.in" - "${PROJECT_BINARY_DIR}/carmaConfig.cmake" - INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake - ) - - INSTALL( - EXPORT carma_Targets - FILE carmaCarmaTargets.cmake - NAMESPACE carma:: - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake - ) - - INSTALL( - EXPORT carma_Header_Targets - FILE carmaHeaderTargets.cmake - NAMESPACE carma:: - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake - ) - - INSTALL( - FILES - "${PROJECT_BINARY_DIR}/carmaConfig.cmake" - "${PROJECT_BINARY_DIR}/carmaConfigVersion.cmake" - "${PROJECT_SOURCE_DIR}/cmake/carmaDependencyTargets.cmake" - DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake - ) - - INSTALL( - FILES "${PROJECT_SOURCE_DIR}/include/carma" - DESTINATION ${CARMA_INCLUDE_INSTALL_DIR} - ) - - INSTALL( - DIRECTORY ${PROJECT_SOURCE_DIR}/include/carma_bits - DESTINATION ${CARMA_INCLUDE_INSTALL_DIR} - FILES_MATCHING - PATTERN "*.h" - ) - - INSTALL( - FILES ${PROJECT_BINARY_DIR}/include/carma_bits/generated_config.h - DESTINATION ${CARMA_INCLUDE_INSTALL_DIR}/carma_bits - ) - -ELSE() - # ############################################################################## - # REQUIREMENTS # - # ############################################################################## - FIND_PACKAGE(Python3 COMPONENTS Development NumPy QUIET) - IF (NOT Python3_FOUND) - FIND_PACKAGE(Python3 COMPONENTS Development.Module NumPy REQUIRED) - ENDIF() - - # Needed to ensure the same Python executable is found by Pybind11 - IF (NOT DEFINED PYTHON_EXECUTABLE) - SET(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) - ENDIF () - - # create armadillo and or pybind11 target if not defined - INCLUDE(ThirdPartyTargets) - - TARGET_PRECOMPILE_HEADERS(carma - INTERFACE - ${PROJECT_SOURCE_DIR}/include/carma_bits/cnalloc.h - ) -ENDIF() +if(CARMA_INSTALL_LIB) + # modified from https://dominikberner.ch/cmake-interface-lib/ + + # locations are provided by GNUInstallDirs + install( + TARGETS carma + EXPORT carma_Targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + install( + TARGETS carma_headers + EXPORT carma_Header_Targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + + include(CMakePackageConfigHelpers) + write_basic_package_version_file( + "carmaConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMinorVersion) + + configure_package_config_file( + "${PROJECT_SOURCE_DIR}/cmake/carmaConfig.cmake.in" + "${PROJECT_BINARY_DIR}/carmaConfig.cmake" + INSTALL_DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake) + + install( + EXPORT carma_Targets + FILE carmaCarmaTargets.cmake + NAMESPACE carma:: + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake) + + install( + EXPORT carma_Header_Targets + FILE carmaHeaderTargets.cmake + NAMESPACE carma:: + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake) + + install( + FILES "${PROJECT_BINARY_DIR}/carmaConfig.cmake" + "${PROJECT_BINARY_DIR}/carmaConfigVersion.cmake" + "${PROJECT_SOURCE_DIR}/cmake/carmaDependencyTargets.cmake" + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/carma/cmake) + + install(FILES "${PROJECT_SOURCE_DIR}/include/carma" + DESTINATION ${CARMA_INCLUDE_INSTALL_DIR}) + + install( + DIRECTORY ${PROJECT_SOURCE_DIR}/include/carma_bits + DESTINATION ${CARMA_INCLUDE_INSTALL_DIR} + FILES_MATCHING + PATTERN "*.h") + + install(FILES ${PROJECT_BINARY_DIR}/include/carma_bits/generated_config.h + DESTINATION ${CARMA_INCLUDE_INSTALL_DIR}/carma_bits) + +else() + # ############################################################################ + # REQUIREMENTS # + # ############################################################################ + find_package( + Python3 + COMPONENTS Development NumPy + QUIET) + if(NOT Python3_FOUND) + find_package( + Python3 + COMPONENTS Development.Module NumPy + REQUIRED) + endif() + + # Needed to ensure the same Python executable is found by Pybind11 + if(NOT DEFINED PYTHON_EXECUTABLE) + set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) + endif() + + # create armadillo and or pybind11 target if not defined + include(ThirdPartyTargets) + + target_precompile_headers(carma INTERFACE + ${PROJECT_SOURCE_DIR}/include/carma_bits/cnalloc.h) +endif() # ############################################################################## -# TEST TARGETS # +# TEST TARGETS # # ############################################################################## -IF(CARMA_BUILD_TESTS OR CARMA_BUILD_EXAMPLES) - SET(CMAKE_CXX_STANDARD 14) -ENDIF() - -IF(CARMA_BUILD_TESTS) - INCLUDE(CTest) - ENABLE_TESTING() - INCLUDE(GetCatch2) - ADD_SUBDIRECTORY(tests) - INCLUDE(ClangFormatTarget) - INCLUDE(CoverageTarget) -ENDIF() - -IF(CARMA_BUILD_EXAMPLES) - ADD_SUBDIRECTORY(examples) -ENDIF() -#------------------------------------------------------ -INCLUDE(ClearOptions) -SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_SAVED}) -UNSET(CMAKE_MODULE_PATH_SAVED) +if(CARMA_BUILD_TESTS OR CARMA_BUILD_EXAMPLES) + set(CMAKE_CXX_STANDARD 14) +endif() + +if(CARMA_BUILD_TESTS) + include(CTest) + enable_testing() + include(GetCatch2) + add_subdirectory(tests) + include(ClangFormatTarget) + include(CoverageTarget) +endif() + +if(CARMA_BUILD_EXAMPLES) + add_subdirectory(examples) +endif() +# ------------------------------------------------------ +include(ClearOptions) +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH_SAVED}) +unset(CMAKE_MODULE_PATH_SAVED) diff --git a/docs/source/conf.py b/docs/source/conf.py index 32226cdc..98e58889 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -11,18 +11,19 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. import os import sys -sys.path.insert(0, os.path.abspath('../')) + +sys.path.insert(0, os.path.abspath("../")) sys.setrecursionlimit(1500) # -- Project information ----------------------------------------------------- -project = 'carma' -copyright = '2020, R. Urlus' -author = 'R. Urlus' +project = "carma" +copyright = "2020, R. Urlus" +author = "R. Urlus" # The full version, including alpha/beta/rc tags -release = '0.6.0' +release = "0.6.7" # -- General configuration --------------------------------------------------- @@ -31,16 +32,16 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.doctest', - 'sphinx.ext.coverage', - 'sphinx.ext.ifconfig', - 'sphinxcontrib.napoleon', - 'sphinx.ext.autosectionlabel', + "sphinx.ext.autodoc", + "sphinx.ext.doctest", + "sphinx.ext.coverage", + "sphinx.ext.ifconfig", + "sphinxcontrib.napoleon", + "sphinx.ext.autosectionlabel", ] # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -54,11 +55,10 @@ # a list of builtin themes. # import sphinx_rtd_theme + html_theme = "sphinx_rtd_theme" html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] -html_theme_options = { - 'logo_only': True -} +html_theme_options = {"logo_only": True} html_logo = "carma_logo.png" html_show_sourcelink = True @@ -66,6 +66,6 @@ # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = [] -master_doc = 'index' +master_doc = "index" # -- Extension configuration ------------------------------------------------- diff --git a/include/carma b/include/carma index 78dbdba0..84a55107 100644 --- a/include/carma +++ b/include/carma @@ -42,8 +42,8 @@ typedef SSIZE_T ssize_t; #ifndef CARMA_VERSION_MAJOR #define CARMA_VERSION_MAJOR 0 #define CARMA_VERSION_MINOR 6 - #define CARMA_VERSION_PATCH 6 - #define CARMA_VERSION_NAME "0.6.6 HO" + #define CARMA_VERSION_PATCH 7 + #define CARMA_VERSION_NAME "0.6.7 HO" #endif namespace carma { From 65fc27c565d3241f93e7aa3708dc4c3fe95bcfbd Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Sat, 1 Apr 2023 13:36:05 +0200 Subject: [PATCH 18/47] PKG: Add citation file and DOI badge --- CITATION.cff | 10 ++++++++++ README.md | 2 ++ 2 files changed, 12 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..28d80d6c --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,10 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- family-names: "Urlus" + given-names: "Ralph" +title: "CARMA: bidirectional conversions between Numpy and Armadillo" +version: 0.6.7 +doi: 10.5281/zenodo.7791193 +date-released: 2023-04-01 +url: "https://github.com/RUrlus/carma" diff --git a/README.md b/README.md index 6b76395b..32e2f090 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ [![Documentation Status](https://readthedocs.org/projects/carma/badge/?version=latest)](https://carma.readthedocs.io/en/latest/?badge=latest) [![License](https://img.shields.io/github/license/RUrlus/carma)](https://github.com/RUrlus/carma/blob/stable/LICENSE) [![Release](https://img.shields.io/github/v/release/rurlus/carma)](https://github.com/RUrlus/carma/releases) +[![DOI](https://zenodo.org/badge/235867993.svg)](https://zenodo.org/badge/latestdoi/235867993) + ## Introduction From 608e00ec9e10281ef6f71c491599d5f3245d9b4b Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 10 Apr 2023 15:41:18 +0200 Subject: [PATCH 19/47] update armadillo 12 branch --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index a219e1b9..9329cf5a 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.0.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.2.x"] pybind: ["v2.6.0", "v2.10.0"] steps: From 2fbc2e6faf2e40e41003c06cbb13744405732b5f Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 10 Apr 2023 15:42:20 +0200 Subject: [PATCH 20/47] update armadillo 12 branch --- cmake/GetArmadillo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 1c0151ed..8465f157 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -6,7 +6,7 @@ IF (NOT USE_ARMA_VERSION) SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.0.x" + "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.2.x" ) ENDIF () From d6d4d3a0210a64861dd627d18c014110b3fd4126 Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 19 Jun 2023 03:21:57 +0000 Subject: [PATCH 21/47] update to armadillo 12.4.x --- cmake/GetArmadillo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 8465f157..83ca2d6c 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -6,7 +6,7 @@ IF (NOT USE_ARMA_VERSION) SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.2.x" + "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.4.x" ) ENDIF () From cb008295d955d7f95f42df655995e02ffea5370f Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 19 Jun 2023 03:23:05 +0000 Subject: [PATCH 22/47] update to armadillo 12.4.x --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 9329cf5a..8140d51b 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.2.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x"] pybind: ["v2.6.0", "v2.10.0"] steps: From 0ff5479f0c2230612f6caa766a34d62900f1d559 Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Sat, 12 Aug 2023 16:37:11 +0200 Subject: [PATCH 23/47] add armadillo 12.6.x --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 8140d51b..bbc0086e 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x" "12.6.x"] pybind: ["v2.6.0", "v2.10.0"] steps: From ea31512d444e0e66f0dbec3c933120691a335b40 Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Sat, 12 Aug 2023 16:38:36 +0200 Subject: [PATCH 24/47] add armadillo 12.6.x --- cmake/GetArmadillo.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 83ca2d6c..ff3613f3 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -1,12 +1,12 @@ include(FetchContent) -SET(DEFAULT_ARMA_VERSION 12.0.x) +SET(DEFAULT_ARMA_VERSION 12.6.x) IF (NOT USE_ARMA_VERSION) MESSAGE(STATUS "carma: Setting Armadillo version to 'v${DEFAULT_ARMA_VERSION}' as none was specified.") SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.4.x" + "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.4.x" "12.6.x" ) ENDIF () From 1a984a44e849fa632315d196dd71f8f29e670534 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Tue, 22 Aug 2023 09:47:40 +0200 Subject: [PATCH 25/47] CICD: Fix missing comma --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index bbc0086e..e26e3261 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x" "12.6.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x", "12.6.x"] pybind: ["v2.6.0", "v2.10.0"] steps: From 22f8bd0471355d9c82b385c65a9f72947a0cbcec Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 18 Mar 2024 01:29:20 +0100 Subject: [PATCH 26/47] add armadillo 12.8.x --- .github/workflows/dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index e26e3261..78cda8ae 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x", "12.6.x"] + armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x", "12.6.x", "12.8.x"] pybind: ["v2.6.0", "v2.10.0"] steps: From 420b755921085439060d457acf5234cc529198ec Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 18 Mar 2024 01:31:05 +0100 Subject: [PATCH 27/47] add armadillo 12.8.x --- cmake/GetArmadillo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index ff3613f3..65c55183 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -6,7 +6,7 @@ IF (NOT USE_ARMA_VERSION) SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_ARMA_VERSION PROPERTY STRINGS - "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.4.x" "12.6.x" + "10.6.x" "10.8.x" "11.2.x" "11.4.x" "12.4.x" "12.6.x" "12.8.x" ) ENDIF () From 2345756e4bd9957d90af3338981d82268ac2d6ec Mon Sep 17 00:00:00 2001 From: conradsnicta Date: Mon, 18 Mar 2024 01:31:49 +0100 Subject: [PATCH 28/47] change default version to 12.8.x --- cmake/GetArmadillo.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/GetArmadillo.cmake b/cmake/GetArmadillo.cmake index 65c55183..2dbb2c5b 100644 --- a/cmake/GetArmadillo.cmake +++ b/cmake/GetArmadillo.cmake @@ -1,6 +1,6 @@ include(FetchContent) -SET(DEFAULT_ARMA_VERSION 12.6.x) +SET(DEFAULT_ARMA_VERSION 12.8.x) IF (NOT USE_ARMA_VERSION) MESSAGE(STATUS "carma: Setting Armadillo version to 'v${DEFAULT_ARMA_VERSION}' as none was specified.") SET(USE_ARMA_VERSION "${DEFAULT_ARMA_VERSION}" CACHE STRING "Choose the version of Armadillo." FORCE) From 271001aa13114b2850678f21767c35c013cf29d8 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Mon, 18 Mar 2024 13:06:00 +0100 Subject: [PATCH 29/47] CICD: Remove unsupported armadillo and pybind11 versions --- .github/workflows/dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index 78cda8ae..d7dead9e 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -35,8 +35,8 @@ jobs: strategy: fail-fast: false matrix: - armadillo: ["10.6.x", "10.8.x", "11.2.x", "11.4.x", "12.4.x", "12.6.x", "12.8.x"] - pybind: ["v2.6.0", "v2.10.0"] + armadillo: ["10.8.x", "11.4.x", "12.4.x", "12.6.x", "12.8.x"] + pybind: ["v2.10.4", "v2.11.1"] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it From f2a987780315eaa4e28b247cf40d4c1811329a8b Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Mon, 18 Mar 2024 13:06:28 +0100 Subject: [PATCH 30/47] DEP: Update default Pybind11 version to the lastest one --- cmake/GetPybind11.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/GetPybind11.cmake b/cmake/GetPybind11.cmake index 9df241e8..e6293011 100644 --- a/cmake/GetPybind11.cmake +++ b/cmake/GetPybind11.cmake @@ -1,12 +1,12 @@ include(FetchContent) -SET(DEFAULT_PYBIND11_VERSION v2.9.2) +SET(DEFAULT_PYBIND11_VERSION v2.11.1) IF (NOT USE_PYBIND11_VERSION) - MESSAGE(STATUS "carma: Setting Pybind11 version to '${DEFAULT_PYBIND11_VERSION}' as none was specified.") - SET(USE_PYBIND11_VERSION "${DEFAULT_PYBIND11_VERSION}" CACHE STRING "Choose the version of Pybind11." FORCE) + MESSAGE(STATUS "carma: Setting Pybind11 version to '${DEFAULT_PYBIND11_VERSION}' as none was specified.") + SET(USE_PYBIND11_VERSION "${DEFAULT_PYBIND11_VERSION}" CACHE STRING "Choose the version of Pybind11." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_PYBIND11_VERSION PROPERTY STRINGS - "v2.6.0" "v2.6.1" "v2.6.2" "v2.7.1" "v2.8.1" "v2.9.0" "v2.9.1" "v2.9.2" + "v2.6.2" "v2.7.1" "v2.8.1" "v2.9.0" "v2.9.1" "v2.9.2" "v2.10.4" "v2.11.1" ) ENDIF () From 6461e9ea2a632cef4761658adb3e676d4f8a1480 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Mon, 18 Mar 2024 13:17:16 +0100 Subject: [PATCH 31/47] CICD: Update integration test dependency versions --- integration_test/CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integration_test/CMakeLists.txt b/integration_test/CMakeLists.txt index 665d96b4..eef38451 100644 --- a/integration_test/CMakeLists.txt +++ b/integration_test/CMakeLists.txt @@ -11,7 +11,7 @@ SET(MODNAME "integration_test_carma") # -- EXTERNAL INCLUDE(FetchContent) -SET(USE_PYBIND11_VERSION "v2.6.2") +SET(USE_PYBIND11_VERSION v2.11.1) # Pybind11 FetchContent_Declare( @@ -25,14 +25,14 @@ FetchContent_GetProperties(Pybind11Repo) STRING(TOLOWER "Pybind11Repo" lcName) IF (NOT ${lcName}_POPULATED) - MESSAGE(STATUS "carma: collecting Pybind11 ${USE_PYBIND11_VERSION}") - # Fetch the content using previously declared details - FetchContent_Populate(Pybind11Repo) + MESSAGE(STATUS "carma: collecting Pybind11 ${USE_PYBIND11_VERSION}") + # Fetch the content using previously declared details + FetchContent_Populate(Pybind11Repo) ENDIF () ADD_SUBDIRECTORY(extern/pybind11) -SET(USE_ARMA_VERSION 10.6.x) +SET(USE_ARMA_VERSION 12.8.x) FetchContent_Declare( CarmaArmadillo GIT_REPOSITORY https://gitlab.com/conradsnicta/armadillo-code.git From d24661e58259954fbd495ec9492a7928d1d3e121 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 20 Mar 2024 09:56:47 +0100 Subject: [PATCH 32/47] CICD: Update read the docs configuration --- .readthedocs.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index c9c61617..1f2b89db 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,13 @@ +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +sphinx: + configuration: docs/source/conf.py + python: - version: 3 -requirements_file: docs/requirements.txt + install: + - requirements: docs/requirements.txt From da905f7e42b734451065af9de537a79490bac08c Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 20 Mar 2024 09:59:54 +0100 Subject: [PATCH 33/47] CICD: Lower python version for RTD --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 1f2b89db..798ddae4 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -3,7 +3,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.12" + python: "3.8" sphinx: configuration: docs/source/conf.py From 6195ae7d3a405c01ae4f6467a806b420bfbcf175 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 27 Mar 2024 14:44:42 +0100 Subject: [PATCH 34/47] REL: Release v0.7.0 --- CHANGELOG.md | 7 +++++++ CMakeLists.txt | 20 ++++++++++---------- docs/source/conf.py | 2 +- include/carma | 6 +++--- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 460d959c..46cb3d7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.7.0] - 2024-03-27 + +### Changes + +* Update default Armadillo version to 12.8.x +* Update default Pybind11 version 2.11.1 + ## [0.6.6] - 2022-05-22 ### Changes diff --git a/CMakeLists.txt b/CMakeLists.txt index 444b18ca..f9236b67 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ cmake_minimum_required(VERSION 3.16) set(CARMA_VERSION_MAJOR 0) -set(CARMA_VERSION_MINOR 6) -set(CARMA_VERSION_PATCH 7) +set(CARMA_VERSION_MINOR 7) +set(CARMA_VERSION_PATCH 0) set(CARMA_VERSION_INFO "${CARMA_VERSION_MAJOR}.${CARMA_VERSION_MINOR}.${CARMA_VERSION_PATCH}") @@ -14,9 +14,9 @@ include(GNUInstallDirs) set(CMAKE_MODULE_PATH_SAVED ${CMAKE_MODULE_PATH}) list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake") -# ############################################################################## +# # ############################################################################# # SETTINGS # -# ############################################################################## +# # ############################################################################# option(CARMA_INSTALL_LIB "Install CARMA headers" OFF) set(CARMA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/carma") @@ -43,9 +43,9 @@ configure_file( ${PROJECT_SOURCE_DIR}/include/carma_bits/config.h.in ${PROJECT_BINARY_DIR}/include/carma_bits/generated_config.h @ONLY) -# ############################################################################## +# # ############################################################################# # TARGET # -# ############################################################################## +# # ############################################################################# add_library(carma INTERFACE) add_library(carma::carma ALIAS carma) @@ -151,9 +151,9 @@ if(CARMA_INSTALL_LIB) DESTINATION ${CARMA_INCLUDE_INSTALL_DIR}/carma_bits) else() - # ############################################################################ + # # ########################################################################### # REQUIREMENTS # - # ############################################################################ + # # ########################################################################### find_package( Python3 COMPONENTS Development NumPy @@ -176,9 +176,9 @@ else() target_precompile_headers(carma INTERFACE ${PROJECT_SOURCE_DIR}/include/carma_bits/cnalloc.h) endif() -# ############################################################################## +# # ############################################################################# # TEST TARGETS # -# ############################################################################## +# # ############################################################################# if(CARMA_BUILD_TESTS OR CARMA_BUILD_EXAMPLES) set(CMAKE_CXX_STANDARD 14) diff --git a/docs/source/conf.py b/docs/source/conf.py index 98e58889..561f9427 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ author = "R. Urlus" # The full version, including alpha/beta/rc tags -release = "0.6.7" +release = "0.7.0" # -- General configuration --------------------------------------------------- diff --git a/include/carma b/include/carma index 84a55107..f017fbab 100644 --- a/include/carma +++ b/include/carma @@ -41,9 +41,9 @@ typedef SSIZE_T ssize_t; #ifndef CARMA_VERSION_MAJOR #define CARMA_VERSION_MAJOR 0 - #define CARMA_VERSION_MINOR 6 - #define CARMA_VERSION_PATCH 7 - #define CARMA_VERSION_NAME "0.6.7 HO" + #define CARMA_VERSION_MINOR 7 + #define CARMA_VERSION_PATCH 0 + #define CARMA_VERSION_NAME "0.7.0 HO" #endif namespace carma { From 68fcf83029c918d7dc5ceb089d37259d6b3ca544 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 20:37:27 +0200 Subject: [PATCH 35/47] CICD: Update checkout to v4 and Python-version to v5 --- .github/workflows/asan.yml | 4 ++-- .github/workflows/coverage.yml | 4 ++-- .github/workflows/dependencies.yml | 4 ++-- .github/workflows/install_test.yml | 4 ++-- .github/workflows/linux.yml | 4 ++-- .github/workflows/macos.yml | 4 ++-- .github/workflows/mre.yml | 4 ++-- .github/workflows/test_matrix.yml | 4 ++-- .github/workflows/test_numpy.yml | 4 ++-- .github/workflows/valgrind.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 0c0cbdad..21de510a 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -27,11 +27,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.10" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b3347d9e..7bd487c8 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -74,11 +74,11 @@ jobs: } steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index d7dead9e..dce6f702 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -40,11 +40,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: false - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/install_test.yml b/.github/workflows/install_test.yml index fb80abcf..dd848650 100644 --- a/.github/workflows/install_test.yml +++ b/.github/workflows/install_test.yml @@ -77,11 +77,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 83a0a0e5..648679b0 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -60,11 +60,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index d189f14e..3b856271 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -51,11 +51,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/mre.yml b/.github/workflows/mre.yml index f4240a33..7940ecfc 100644 --- a/.github/workflows/mre.yml +++ b/.github/workflows/mre.yml @@ -89,11 +89,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/test_matrix.yml b/.github/workflows/test_matrix.yml index 7f73065a..75f64116 100644 --- a/.github/workflows/test_matrix.yml +++ b/.github/workflows/test_matrix.yml @@ -69,11 +69,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index 30cdfcd1..6bc3eb41 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -65,11 +65,11 @@ jobs: } steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.config.python-version }} diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 85fac634..29385168 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -81,11 +81,11 @@ jobs: } steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.10' diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 404b8736..5c296531 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -52,11 +52,11 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} From 012ab43929efcada34dfde289b38906e165d5b62 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 20:42:44 +0200 Subject: [PATCH 36/47] CICD: Sudo install on MacOS and on Linux --- .github/workflows/install_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install_test.yml b/.github/workflows/install_test.yml index dd848650..88aabbeb 100644 --- a/.github/workflows/install_test.yml +++ b/.github/workflows/install_test.yml @@ -117,7 +117,8 @@ jobs: python -m pip install numpy pytest - name: Install CARMA - if: runner.os == 'Linux' + # install with sudo + if: runner.os == 'Linux' || matrix.config.os == 'macos-latest' run: | mkdir build cd build @@ -136,7 +137,7 @@ jobs: sudo cmake --build . --config Release --target install - name: Install CARMA - if: runner.os != 'Linux' + if: startsWith(matrix.config.os, 'windows') run: | mkdir build cd build From 2f40b8c6b341e256e13161f15490f336aaa57f64 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 20:43:11 +0200 Subject: [PATCH 37/47] CICD: Don't test CPython 3.7 on ARM based runners --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 3b856271..16c2228d 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] config: - { name: "macOS (Clang)", From 4c966bf690c6d4b57f3b5cb73850b5999f7d1ffa Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 21:24:00 +0200 Subject: [PATCH 38/47] CHG: Make vendored Numpy api compatable with Numpy v2 --- include/carma_bits/numpyapi.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/carma_bits/numpyapi.h b/include/carma_bits/numpyapi.h index 01c74cd7..ecef2e62 100644 --- a/include/carma_bits/numpyapi.h +++ b/include/carma_bits/numpyapi.h @@ -58,7 +58,7 @@ struct npy_api { API_PyArray_Free = 165, API_PyArray_Size = 59, API_PyArray_NewCopy = 85, - API_PyArray_CopyInto = 82, + API_PyArray_CopyInto = 50, API_PyArray_NewLikeArray = 277, API_PyArray_NewFromDescr = 94, API_PyDataMem_NEW = 288, @@ -66,13 +66,13 @@ struct npy_api { }; static npy_api lookup() { - py::module m = py::module::import("numpy.core.multiarray"); + pybind11::module_ m = pybind11::detail::import_numpy_core_submodule("multiarray"); auto c = m.attr("_ARRAY_API"); -#if PY_MAJOR_VERSION >= 3 - void **api_ptr = reinterpret_cast(PyCapsule_GetPointer(c.ptr(), nullptr)); -#else - void **api_ptr = reinterpret_cast(PyCObject_AsVoidPtr(c.ptr())); -#endif + void** api_ptr = (void**)PyCapsule_GetPointer(c.ptr(), nullptr); + if (api_ptr == nullptr) { + pybind11::raise_from(PyExc_SystemError, "FAILURE obtaining numpy _ARRAY_API pointer."); + throw pybind11::error_already_set(); + } npy_api api; #define DECL_NPY_API(Func) api.Func##_ = (decltype(api.Func##_)) api_ptr[API_##Func]; DECL_NPY_API(PyArray_Free); From 3c505c9b6ce9e1070692bbd3726dc4756c43a275 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 21:24:20 +0200 Subject: [PATCH 39/47] CICD: Add test for Numpy v2 --- .github/workflows/test_numpy.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test_numpy.yml b/.github/workflows/test_numpy.yml index 6bc3eb41..c79fca7a 100644 --- a/.github/workflows/test_numpy.yml +++ b/.github/workflows/test_numpy.yml @@ -10,6 +10,7 @@ on: - unstable schedule: - cron: '0 23 * * 1' + workflow_dispatch: defaults: run: @@ -63,6 +64,17 @@ jobs: numpy: "numpy", python-version: "3.11" } + - { + name: "Numpy v2", + os: ubuntu-latest, + build_type: "Release", + cc: "gcc-11", + cxx: "g++-11", + generators: "Ninja", + target: "all", + numpy: "numpy==2.0.0rc1", + python-version: "3.11" + } steps: - uses: actions/checkout@v4 From 3f22135afeb347f0a13a8f199ba4b75afa624596 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 21:38:54 +0200 Subject: [PATCH 40/47] DEP: Update minimum support Pybind11 version to 2.12 --- .github/workflows/dependencies.yml | 2 +- cmake/GetPybind11.cmake | 4 ++-- integration_test/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependencies.yml b/.github/workflows/dependencies.yml index dce6f702..2599c42b 100644 --- a/.github/workflows/dependencies.yml +++ b/.github/workflows/dependencies.yml @@ -36,7 +36,7 @@ jobs: fail-fast: false matrix: armadillo: ["10.8.x", "11.4.x", "12.4.x", "12.6.x", "12.8.x"] - pybind: ["v2.10.4", "v2.11.1"] + pybind: ["v2.12.0"] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/cmake/GetPybind11.cmake b/cmake/GetPybind11.cmake index e6293011..bbfb1576 100644 --- a/cmake/GetPybind11.cmake +++ b/cmake/GetPybind11.cmake @@ -1,12 +1,12 @@ include(FetchContent) -SET(DEFAULT_PYBIND11_VERSION v2.11.1) +SET(DEFAULT_PYBIND11_VERSION v2.12.0) IF (NOT USE_PYBIND11_VERSION) MESSAGE(STATUS "carma: Setting Pybind11 version to '${DEFAULT_PYBIND11_VERSION}' as none was specified.") SET(USE_PYBIND11_VERSION "${DEFAULT_PYBIND11_VERSION}" CACHE STRING "Choose the version of Pybind11." FORCE) # Set the possible values of build type for cmake-gui SET_PROPERTY(CACHE USE_PYBIND11_VERSION PROPERTY STRINGS - "v2.6.2" "v2.7.1" "v2.8.1" "v2.9.0" "v2.9.1" "v2.9.2" "v2.10.4" "v2.11.1" + "v2.12.0" ) ENDIF () diff --git a/integration_test/CMakeLists.txt b/integration_test/CMakeLists.txt index eef38451..0698e7f5 100644 --- a/integration_test/CMakeLists.txt +++ b/integration_test/CMakeLists.txt @@ -11,7 +11,7 @@ SET(MODNAME "integration_test_carma") # -- EXTERNAL INCLUDE(FetchContent) -SET(USE_PYBIND11_VERSION v2.11.1) +SET(USE_PYBIND11_VERSION v2.12.0) # Pybind11 FetchContent_Declare( From 746420eaabc692de223dc4d3be3eeddd67f5fe4e Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 21:39:18 +0200 Subject: [PATCH 41/47] DOC: Document updated Pybind11 version requirements --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 32e2f090..416d6c89 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,11 @@ CARMA provides a number of configurations that can be set in the `carma_config.c ## Requirements -CARMA >= v0.5 requires a compiler with support for C++14 and supports: +CARMA >= v0.8 requires a compiler with support for C++14 and supports: -* Python 3.6 -- 3.9 +* Python 3.8 -- 3.12 * Numpy >= 1.14 -* Pybind11 >= v2.6.0 +* Pybind11 >= v2.12.0 * Armadillo >= 10.5.2 CARMA makes use of Armadillo's `ARMA_ALIEN_MEM_ALLOC` and `ARMA_ALIEN_MEM_FREE` functionality introduced in version 10.5.2 to use Numpy's (de)allocator. From 7a8fbbea1b1febbb7b4462d8217c2bc84cd31ba4 Mon Sep 17 00:00:00 2001 From: Ralph Urlus Date: Wed, 12 Jun 2024 22:30:08 +0200 Subject: [PATCH 42/47] REL: Release v0.8.0 --- CHANGELOG.md | 7 +++++++ CMakeLists.txt | 18 +++++++++--------- README.md | 11 +++++++++-- docs/source/conf.py | 2 +- include/carma | 4 ++-- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46cb3d7d..60a09dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.8.0] - 2024-06-12 + +### Changes + +* Adds support for Numpy v2 +* BREAKING Minimum Pybind11 version is 2.12.0 + ## [0.7.0] - 2024-03-27 ### Changes diff --git a/CMakeLists.txt b/CMakeLists.txt index f9236b67..51702e5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) set(CARMA_VERSION_MAJOR 0) -set(CARMA_VERSION_MINOR 7) +set(CARMA_VERSION_MINOR 8) set(CARMA_VERSION_PATCH 0) set(CARMA_VERSION_INFO "${CARMA_VERSION_MAJOR}.${CARMA_VERSION_MINOR}.${CARMA_VERSION_PATCH}") @@ -14,9 +14,9 @@ include(GNUInstallDirs) set(CMAKE_MODULE_PATH_SAVED ${CMAKE_MODULE_PATH}) list(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_SOURCE_DIR}/cmake") -# # ############################################################################# +# # # ############################################################################ # SETTINGS # -# # ############################################################################# +# # # ############################################################################ option(CARMA_INSTALL_LIB "Install CARMA headers" OFF) set(CARMA_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/carma") @@ -43,9 +43,9 @@ configure_file( ${PROJECT_SOURCE_DIR}/include/carma_bits/config.h.in ${PROJECT_BINARY_DIR}/include/carma_bits/generated_config.h @ONLY) -# # ############################################################################# +# # # ############################################################################ # TARGET # -# # ############################################################################# +# # # ############################################################################ add_library(carma INTERFACE) add_library(carma::carma ALIAS carma) @@ -151,9 +151,9 @@ if(CARMA_INSTALL_LIB) DESTINATION ${CARMA_INCLUDE_INSTALL_DIR}/carma_bits) else() - # # ########################################################################### + # # # ########################################################################## # REQUIREMENTS # - # # ########################################################################### + # # # ########################################################################## find_package( Python3 COMPONENTS Development NumPy @@ -176,9 +176,9 @@ else() target_precompile_headers(carma INTERFACE ${PROJECT_SOURCE_DIR}/include/carma_bits/cnalloc.h) endif() -# # ############################################################################# +# # # ############################################################################ # TEST TARGETS # -# # ############################################################################# +# # # ############################################################################ if(CARMA_BUILD_TESTS OR CARMA_BUILD_EXAMPLES) set(CMAKE_CXX_STANDARD 14) diff --git a/README.md b/README.md index 416d6c89..36c9be66 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,18 @@ CARMA provides a number of configurations that can be set in the `carma_config.c ## Requirements -CARMA >= v0.8 requires a compiler with support for C++14 and supports: +Numpy v2.* is supported by CARMA >= v0.8.0 which requires a compiler with support for C++14 and supports: * Python 3.8 -- 3.12 * Numpy >= 1.14 -* Pybind11 >= v2.12.0 +* **Pybind11 >= v2.12.0** +* Armadillo >= 10.5.2 + +CARMA <= v0.7 requires a compiler with support for C++14 and supports: + +* Python 3.8 -- 3.12 +* **Numpy >= 1.14 < 2.0** +* **Pybind11 >= v2.6.0 < v2.12.0** * Armadillo >= 10.5.2 CARMA makes use of Armadillo's `ARMA_ALIEN_MEM_ALLOC` and `ARMA_ALIEN_MEM_FREE` functionality introduced in version 10.5.2 to use Numpy's (de)allocator. diff --git a/docs/source/conf.py b/docs/source/conf.py index 561f9427..83ae9208 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,7 +23,7 @@ author = "R. Urlus" # The full version, including alpha/beta/rc tags -release = "0.7.0" +release = "0.8.0" # -- General configuration --------------------------------------------------- diff --git a/include/carma b/include/carma index f017fbab..83341324 100644 --- a/include/carma +++ b/include/carma @@ -41,9 +41,9 @@ typedef SSIZE_T ssize_t; #ifndef CARMA_VERSION_MAJOR #define CARMA_VERSION_MAJOR 0 - #define CARMA_VERSION_MINOR 7 + #define CARMA_VERSION_MINOR 8 #define CARMA_VERSION_PATCH 0 - #define CARMA_VERSION_NAME "0.7.0 HO" + #define CARMA_VERSION_NAME "0.8.0 HO" #endif namespace carma { From 61b717b5ae2dc727a57600d1daf31ef093e8400e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20HAV=C3=89?= Date: Fri, 28 May 2021 18:11:22 +0200 Subject: [PATCH 43/47] Do not unset global CMake variables --- cmake/ClearOptions.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/ClearOptions.cmake b/cmake/ClearOptions.cmake index 71a7ed57..2427e1cd 100644 --- a/cmake/ClearOptions.cmake +++ b/cmake/ClearOptions.cmake @@ -8,7 +8,7 @@ UNSET(ENABLE_CARMA_SOFT_STEAL CACHE) UNSET(ENABLE_CARMA_HARD_STEAL CACHE) UNSET(ENABLE_CARMA_DONT_REQUIRE_OWNDATA CACHE) UNSET(ENABLE_CARMA_DONT_REQUIRE_F_CONTIGUOUS CACHE) -SET(CMAKE_EXPORT_COMPILE_COMMANDS 0) +#SET(CMAKE_EXPORT_COMPILE_COMMANDS 0) UNSET(BUILD_NATIVE_TESTS CACHE) UNSET(BUILD_PYTHON_TESTS CACHE) SET(CARMA_RELEASE_DEFINITIONS ${ORIGINAL_CARMA_RELEASE_DEFINITIONS}) From 4d0e73f6043cf9fca679826b562e8e346fa743e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Have=CC=81?= Date: Thu, 2 Sep 2021 16:38:54 +0200 Subject: [PATCH 44/47] Customize: add a smooth policy using macro to drive carma mem functions Main C++ code should be able to drive memory management of armadillo even for independent compilation units (i.e. not header only) --- include/carma_bits/cnalloc.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/carma_bits/cnalloc.h b/include/carma_bits/cnalloc.h index 26658772..0e85bb1c 100644 --- a/include/carma_bits/cnalloc.h +++ b/include/carma_bits/cnalloc.h @@ -47,9 +47,11 @@ inline void npy_free(void* ptr) { } // namespace cnalloc +#ifndef CARMA_DO_NOT_EXPORT_ALIEN_MEM_FUNCTIONS #define ARMA_ALIEN_MEM_ALLOC_FUNCTION cnalloc::npy_malloc #define ARMA_ALIEN_MEM_FREE_FUNCTION cnalloc::npy_free #ifndef CARMA_ARMA_ALIEN_MEM_FUNCTIONS_SET #define CARMA_ARMA_ALIEN_MEM_FUNCTIONS_SET #endif +#endif // CARMA_DO_NOT_EXPORT_ALIEN_MEM_FUNCTIONS #endif // INCLUDE_CARMA_BITS_CNALLOC_H_ From f45f6f124cba502c39314300ccf610cdb3ff9140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Have=CC=81?= Date: Tue, 15 Nov 2022 16:18:36 +0100 Subject: [PATCH 45/47] Explicity namespace for ssize_t in pybind11 --- include/carma_bits/armatonumpy.h | 52 ++++++++++++++++---------------- include/carma_bits/arraystore.h | 12 ++++---- include/carma_bits/cnumpy.h | 2 +- include/carma_bits/numpytoarma.h | 8 ++--- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/include/carma_bits/armatonumpy.h b/include/carma_bits/armatonumpy.h index 7e408a7f..a08b5579 100644 --- a/include/carma_bits/armatonumpy.h +++ b/include/carma_bits/armatonumpy.h @@ -61,13 +61,13 @@ inline py::capsule create_dummy_capsule(const armaT* data) { template inline py::array_t construct_array(arma::Row* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto ncols = static_cast(data->n_cols); + constexpr auto tsize = static_cast(sizeof(T)); + auto ncols = static_cast(data->n_cols); py::capsule base = create_capsule>(data); return py::array_t( - {static_cast(1), ncols}, // shape + {static_cast(1), ncols}, // shape {tsize, tsize}, // F-style contiguous strides data->memptr(), // the data pointer base // numpy array references this parent @@ -76,13 +76,13 @@ inline py::array_t construct_array(arma::Row* data) { template inline py::array_t construct_array(arma::Col* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto nrows = static_cast(data->n_rows); + constexpr auto tsize = static_cast(sizeof(T)); + auto nrows = static_cast(data->n_rows); py::capsule base = create_capsule>(data); return py::array_t( - {nrows, static_cast(1)}, // shape + {nrows, static_cast(1)}, // shape {tsize, nrows * tsize}, // F-style contiguous strides data->memptr(), // the data pointer base // numpy array references this parent @@ -91,9 +91,9 @@ inline py::array_t construct_array(arma::Col* data) { template inline py::array_t construct_array(arma::Mat* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto nrows = static_cast(data->n_rows); - auto ncols = static_cast(data->n_cols); + constexpr auto tsize = static_cast(sizeof(T)); + auto nrows = static_cast(data->n_rows); + auto ncols = static_cast(data->n_cols); py::capsule base = create_capsule>(data); @@ -107,10 +107,10 @@ inline py::array_t construct_array(arma::Mat* data) { template inline py::array_t construct_array(arma::Cube* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto nrows = static_cast(data->n_rows); - auto ncols = static_cast(data->n_cols); - auto nslices = static_cast(data->n_slices); + constexpr auto tsize = static_cast(sizeof(T)); + auto nrows = static_cast(data->n_rows); + auto ncols = static_cast(data->n_cols); + auto nslices = static_cast(data->n_slices); return py::array_t( // shape @@ -126,13 +126,13 @@ inline py::array_t construct_array(arma::Cube* data) { template inline py::array_t construct_array(const arma::Row* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto ncols = static_cast(data->n_cols); + constexpr auto tsize = static_cast(sizeof(T)); + auto ncols = static_cast(data->n_cols); py::capsule base = create_dummy_capsule>(data); auto arr = py::array_t( - {static_cast(1), ncols}, // shape + {static_cast(1), ncols}, // shape {tsize, tsize}, // F-style contiguous strides data->memptr(), // the data pointer base // numpy array references this parent @@ -143,13 +143,13 @@ inline py::array_t construct_array(const arma::Row* data) { template inline py::array_t construct_array(const arma::Col* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto nrows = static_cast(data->n_rows); + constexpr auto tsize = static_cast(sizeof(T)); + auto nrows = static_cast(data->n_rows); py::capsule base = create_dummy_capsule>(data); auto arr = py::array_t( - {nrows, static_cast(1)}, // shape + {nrows, static_cast(1)}, // shape {tsize, nrows * tsize}, // F-style contiguous strides data->memptr(), // the data pointer base // numpy array references this parent @@ -160,9 +160,9 @@ inline py::array_t construct_array(const arma::Col* data) { template inline py::array_t construct_array(const arma::Mat* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto nrows = static_cast(data->n_rows); - auto ncols = static_cast(data->n_cols); + constexpr auto tsize = static_cast(sizeof(T)); + auto nrows = static_cast(data->n_rows); + auto ncols = static_cast(data->n_cols); auto arr = py::array_t( {nrows, ncols}, // shape @@ -177,10 +177,10 @@ inline py::array_t construct_array(const arma::Mat* data) { template inline py::array_t construct_array(const arma::Cube* data) { - constexpr auto tsize = static_cast(sizeof(T)); - auto nrows = static_cast(data->n_rows); - auto ncols = static_cast(data->n_cols); - auto nslices = static_cast(data->n_slices); + constexpr auto tsize = static_cast(sizeof(T)); + auto nrows = static_cast(data->n_rows); + auto ncols = static_cast(data->n_cols); + auto nslices = static_cast(data->n_slices); auto arr = py::array_t( // shape {nrows, ncols, nslices}, diff --git a/include/carma_bits/arraystore.h b/include/carma_bits/arraystore.h index 220fbe3c..ab1eaf51 100644 --- a/include/carma_bits/arraystore.h +++ b/include/carma_bits/arraystore.h @@ -35,7 +35,7 @@ class ArrayStore { using T = typename armaT::elem_type; protected: - constexpr static ssize_t tsize = sizeof(T); + constexpr static pybind11::ssize_t tsize = sizeof(T); py::capsule base; public: @@ -137,11 +137,11 @@ class ArrayStore { } py::array_t get_view(bool writeable) { - ssize_t nslices; - auto nelem = static_cast(mat.n_elem); - auto nrows = static_cast(mat.n_rows); - auto ncols = static_cast(mat.n_cols); - ssize_t rc_elem = nrows * ncols; + pybind11::ssize_t nslices; + auto nelem = static_cast(mat.n_elem); + auto nrows = static_cast(mat.n_rows); + auto ncols = static_cast(mat.n_cols); + pybind11::ssize_t rc_elem = nrows * ncols; py::array_t arr; diff --git a/include/carma_bits/cnumpy.h b/include/carma_bits/cnumpy.h index 6856e980..80029d6f 100644 --- a/include/carma_bits/cnumpy.h +++ b/include/carma_bits/cnumpy.h @@ -388,7 +388,7 @@ inline static T* swap_copy_array(PyObject* obj) { std::swap(src_of->data, tmp_of->data); // fix strides - constexpr auto tsize = static_cast(sizeof(T)); + constexpr auto tsize = static_cast(sizeof(T)); int ndim = PyArray_NDIM(src); npy_intp const* dims = PyArray_DIMS(src); src_of->strides[0] = tsize; diff --git a/include/carma_bits/numpytoarma.h b/include/carma_bits/numpytoarma.h index d904e1c7..6eb8fe25 100644 --- a/include/carma_bits/numpytoarma.h +++ b/include/carma_bits/numpytoarma.h @@ -70,7 +70,7 @@ template template inline T* validate_from_array_mat(const py::buffer_info& src) { T* data = reinterpret_cast(src.ptr); - ssize_t dims = src.ndim; + pybind11::ssize_t dims = src.ndim; if (dims < 1 || dims > 2) { throw ConversionError("CARMA: Number of dimensions must be 1 <= ndim <= 2"); } @@ -138,7 +138,7 @@ inline arma::Mat arr_to_mat( template inline T* validate_from_array_col(const py::buffer_info& src) { T* data = reinterpret_cast(src.ptr); - ssize_t dims = src.ndim; + pybind11::ssize_t dims = src.ndim; if ((dims >= 2) && (src.shape[1] != 1)) { throw ConversionError("CARMA: Number of columns must <= 1"); } @@ -187,7 +187,7 @@ inline arma::Col arr_to_col( template inline T* validate_from_array_row(const py::buffer_info& src) { T* data = reinterpret_cast(src.ptr); - ssize_t dims = src.ndim; + pybind11::ssize_t dims = src.ndim; if ((dims >= 2) && (src.shape[0] != 1)) { throw ConversionError("CARMA: Number of rows must <= 1"); } @@ -238,7 +238,7 @@ inline arma::Row arr_to_row( template inline T* validate_from_array_cube(const py::buffer_info& src) { T* data = reinterpret_cast(src.ptr); - ssize_t dims = src.ndim; + pybind11::ssize_t dims = src.ndim; if (dims != 3) { throw ConversionError("CARMA: Number of dimensions must be 3"); } From 1871e3488ad892d8eafac6ee5c28bc339d8fc477 Mon Sep 17 00:00:00 2001 From: yannrichet Date: Mon, 3 Aug 2026 18:17:08 +0200 Subject: [PATCH 46/47] fix: PyArray_CopyInto C-API index differs between NumPy 1.x and 2.x Verified against numpy 1.26.4 and 2.5.1 headers: PyArray_CopyInto's slot in the _ARRAY_API table moved from 82 to 50, while every other function carma uses kept its offset. The upstream numpy2 fix (4c966bf) hardcoded the new index unconditionally, which silently calls the wrong C function when loaded under NumPy 1.x. Pick the index at runtime from numpy.__version__. --- include/carma_bits/numpyapi.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/include/carma_bits/numpyapi.h b/include/carma_bits/numpyapi.h index ecef2e62..c3be0d96 100644 --- a/include/carma_bits/numpyapi.h +++ b/include/carma_bits/numpyapi.h @@ -58,13 +58,22 @@ struct npy_api { API_PyArray_Free = 165, API_PyArray_Size = 59, API_PyArray_NewCopy = 85, - API_PyArray_CopyInto = 50, + // PyArray_CopyInto moved in the numpy C-API table between the 1.x and 2.x + // ABI (82 -> 50); the two other functions kept their slot. + API_PyArray_CopyInto_v1 = 82, + API_PyArray_CopyInto_v2 = 50, API_PyArray_NewLikeArray = 277, API_PyArray_NewFromDescr = 94, API_PyDataMem_NEW = 288, API_PyDataMem_FREE = 289, }; + static int copy_into_index() { + py::str version_str = py::module_::import("numpy").attr("__version__"); + int major = std::atoi(std::string(version_str).c_str()); + return major >= 2 ? API_PyArray_CopyInto_v2 : API_PyArray_CopyInto_v1; + } + static npy_api lookup() { pybind11::module_ m = pybind11::detail::import_numpy_core_submodule("multiarray"); auto c = m.attr("_ARRAY_API"); @@ -78,12 +87,12 @@ struct npy_api { DECL_NPY_API(PyArray_Free); DECL_NPY_API(PyArray_Size); DECL_NPY_API(PyArray_NewCopy); - DECL_NPY_API(PyArray_CopyInto); DECL_NPY_API(PyArray_NewLikeArray); DECL_NPY_API(PyArray_NewFromDescr); DECL_NPY_API(PyDataMem_NEW); DECL_NPY_API(PyDataMem_FREE); #undef DECL_NPY_API + api.PyArray_CopyInto_ = (decltype(api.PyArray_CopyInto_)) api_ptr[copy_into_index()]; return api; } }; From 8d74c331e96d3b37c08bc192ae91a7f333dd963f Mon Sep 17 00:00:00 2001 From: yannrichet Date: Mon, 3 Aug 2026 18:26:49 +0200 Subject: [PATCH 47/47] ci: pin runner images to fix stale toolchain infra failures ubuntu-latest and windows-latest moved to newer default images (ubuntu-24.04, windows-2025) that no longer ship clang-14/gcc-11 or the hardcoded VS2022 Enterprise path this workflow expects. Pin to ubuntu-22.04 and windows-2022, which still provide them, to restore what these jobs were originally testing. --- .github/workflows/asan.yml | 2 +- .github/workflows/test_matrix.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/asan.yml b/.github/workflows/asan.yml index 21de510a..c5228e5f 100644 --- a/.github/workflows/asan.yml +++ b/.github/workflows/asan.yml @@ -23,7 +23,7 @@ jobs: name: "Asan Python (Clang-14)" needs: pre_job if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/.github/workflows/test_matrix.yml b/.github/workflows/test_matrix.yml index 75f64116..def5bdef 100644 --- a/.github/workflows/test_matrix.yml +++ b/.github/workflows/test_matrix.yml @@ -31,17 +31,17 @@ jobs: config: - { name: "Windows (MSVC)", - os: windows-latest, + os: windows-2022, build_type: "Release", cc: "cl", cxx: "cl", - environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", + environment_script: "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat", generators: "Visual Studio 17 2022", target: "ALL_BUILD" } - { name: "Ubuntu (Clang-14)", - os: ubuntu-latest, + os: ubuntu-22.04, build_type: "Release", cc: "clang-14", cxx: "clang++-14", @@ -50,7 +50,7 @@ jobs: } - { name: "Ubuntu (GCC-11)", - os: ubuntu-latest, + os: ubuntu-22.04, build_type: "Release", cc: "gcc-11", cxx: "g++-11",