From 68a21c5a5952913d6192be747efd245887bc36cc Mon Sep 17 00:00:00 2001 From: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com> Date: Thu, 30 Apr 2026 13:24:54 +0200 Subject: [PATCH 1/5] Fix substring calculation in CSV cell parsing and add lexical_cast for signed and unsigned char --- include/xtensor/io/xcsv.hpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/xtensor/io/xcsv.hpp b/include/xtensor/io/xcsv.hpp index 080ccaf54..2fd347745 100644 --- a/include/xtensor/io/xcsv.hpp +++ b/include/xtensor/io/xcsv.hpp @@ -66,7 +66,7 @@ namespace xt } size_t last = cell.find_last_not_of(' '); - return cell.substr(first, last == std::string::npos ? cell.size() : last + 1); + return cell.substr(first, last == std::string::npos ? cell.size() : last - first + 1); } template <> @@ -93,6 +93,18 @@ namespace xt return std::stoi(cell); } + template <> + inline signed char lexical_cast(const std::string& cell) + { + return static_cast(std::stoi(cell)); + } + + template <> + inline unsigned char lexical_cast(const std::string& cell) + { + return static_cast(std::stoul(cell)); + } + template <> inline long lexical_cast(const std::string& cell) { From cb6afee08cc6cad26ec80452efe7ea6deae03c9b Mon Sep 17 00:00:00 2001 From: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com> Date: Wed, 6 May 2026 09:44:28 +0200 Subject: [PATCH 2/5] Add Linux ARM builds --- .github/workflows/linux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 876a37135..c93117585 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,11 +12,12 @@ defaults: shell: bash -e -l {0} jobs: build: - runs-on: ubuntu-24.04 - name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.name }} + runs-on: ${{ matrix.os }} + name: ${{ matrix.os }} ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.name }} strategy: fail-fast: false matrix: + os: [ubuntu-24.04, ubuntu-24.04-arm] sys: - {compiler: clang, version: '17', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON} - {compiler: clang, version: '18', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON} From 003222b6c8c80ece0ca6517c5ed82d7cb9d8ec1a Mon Sep 17 00:00:00 2001 From: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com> Date: Wed, 6 May 2026 13:09:46 +0200 Subject: [PATCH 3/5] Exclude ARM builds with GCC 12 from the CI matrix --- .github/workflows/linux.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index c93117585..d230050e5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -39,6 +39,12 @@ jobs: # - {compiler: gcc, version: '15', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib} # - {compiler: gcc, version: '16', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON} # - {compiler: gcc, version: '16', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib} + exclude: + - os: ubuntu-24.04-arm + sys: + compiler: gcc + version: '12' + steps: - name: Install GCC if: matrix.sys.compiler == 'gcc' From 19d7f5ab69a0b6c13b35172483b05b17996c0935 Mon Sep 17 00:00:00 2001 From: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com> Date: Wed, 6 May 2026 13:34:15 +0200 Subject: [PATCH 4/5] Fix YAML formatting for ARM GCC 12 exclusion in CI matrix --- .github/workflows/linux.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index d230050e5..f936f4706 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -40,11 +40,11 @@ jobs: # - {compiler: gcc, version: '16', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON} # - {compiler: gcc, version: '16', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib} exclude: - - os: ubuntu-24.04-arm - sys: - compiler: gcc - version: '12' - + - os: ubuntu-24.04-arm + sys: + compiler: gcc + version: '12' + steps: - name: Install GCC if: matrix.sys.compiler == 'gcc' From 1db50ea2b47170da986cd3d2c6b501e019e162f1 Mon Sep 17 00:00:00 2001 From: Alexis Placet <2400067+Alex-PLACET@users.noreply.github.com> Date: Wed, 6 May 2026 15:42:22 +0200 Subject: [PATCH 5/5] Add ARM build configuration for GCC 11 in CI matrix --- .github/workflows/linux.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index f936f4706..1a66aa273 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -44,6 +44,10 @@ jobs: sys: compiler: gcc version: '12' + - os: ubuntu-24.04-arm + sys: + compiler: gcc + version: '11' steps: - name: Install GCC