Skip to content

Commit

Permalink
Fixed CI added OSX 13 and GCC 12
Browse files Browse the repository at this point in the history
  • Loading branch information
Drew Hubley committed Jul 4, 2024
1 parent edc67a3 commit f832f01
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@ defaults:
shell: bash -e -l {0}
jobs:
build:
runs-on: ubuntu-20.04
name: ${{ matrix.sys.compiler }} ${{ matrix.sys.version }} - ${{ matrix.sys.name }}
strategy:
fail-fast: false
matrix:
sys:
- {compiler: clang, version: '15', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
- {compiler: clang, version: '16', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
- {compiler: gcc, version: '8', name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
- {compiler: gcc, version: '9', name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
- {compiler: gcc, version: '10', name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
- {compiler: gcc, version: '11', name: c++17, flags: -DCPP17=ON}
- {compiler: gcc, version: '11', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}
- {compiler: gcc, version: '11', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}

- {os: ubuntu-20.04, compiler: clang, version: '15', name: assert, flags: -DXTENSOR_ENABLE_ASSERT=ON}
- {os: ubuntu-20.04, compiler: clang, version: '16', name: column-major, flags: -DDEFAULT_COLUMN_MAJOR=ON}
- {os: ubuntu-20.04, compiler: gcc, version: '8', name: openmp, flags: -DXTENSOR_USE_OPENMP=ON}
- {os: ubuntu-20.04, compiler: gcc, version: '9', name: noexcept, flags: -DXTENSOR_DISABLE_EXCEPTIONS=ON}
- {os: ubuntu-22.04, compiler: gcc, version: '10', name: xsimd, flags: -DXTENSOR_USE_XSIMD=ON}
- {os: ubuntu-22.04, compiler: gcc, version: '11', name: c++17, flags: -DCPP17=ON}
- {os: ubuntu-22.04, compiler: gcc, version: '11', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}
- {os: ubuntu-22.04, compiler: gcc, version: '11', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
- {os: ubuntu-22.04, compiler: gcc, version: '12', name: c++17, flags: -DCPP17=ON}
- {os: ubuntu-22.04, compiler: gcc, version: '12', name: xsimd-tbb, flags: -DXTENSOR_USE_XSIMD=ON -DXTENSOR_USE_TBB=ON}
- {os: ubuntu-22.04, compiler: gcc, version: '12', name: tbb, flags: -DXTENSOR_USE_TBB=ON -DTBB_INCLUDE_DIR=$CONDA_PREFIX/include -DTBB_LIBRARY=$CONDA_PREFIX/lib}
runs-on: ${{ matrix.sys.os }}
steps:

- name: Setup GCC
if: ${{ matrix.sys.compiler == 'gcc' }}
run: |
Expand All @@ -39,7 +40,6 @@ jobs:
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: Setup clang
if: ${{ matrix.sys.compiler == 'clang' }}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
fail-fast: false
matrix:
os:
- 11
- 12
- 13

steps:

Expand Down
18 changes: 11 additions & 7 deletions include/xtensor/xutils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -807,12 +807,12 @@ namespace xt
{
using base_type = A;
using value_type = typename A::value_type;
using reference = typename A::reference;
using const_reference = typename A::const_reference;
using pointer = typename A::pointer;
using const_pointer = typename A::const_pointer;
using size_type = typename A::size_type;
using difference_type = typename A::difference_type;
using reference = value_type&;
using const_reference = const value_type&;
using pointer = typename std::allocator_traits<A>::pointer;
using const_pointer = typename std::allocator_traits<A>::const_pointer;
using size_type = typename std::allocator_traits<A>::size_type;
using difference_type = typename std::allocator_traits<A>::difference_type;

tracking_allocator() = default;

Expand All @@ -835,9 +835,13 @@ namespace xt
return base_type::allocate(n);
}

using base_type::construct;
using base_type::deallocate;

// Construct and destroy are removed in --std=c++-20
#if ((defined(__cplusplus) && __cplusplus < 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG < 202002L))
using base_type::construct;
using base_type::destroy;
#endif

template <class U>
struct rebind
Expand Down
4 changes: 2 additions & 2 deletions test/test_xbuffer_adaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ namespace xt
{
public:

size_t* allocate(size_t n, const void* hint = 0)
size_t* allocate(size_t n)
{
size_t* res = std::allocator<size_t>::allocate(n, hint);
size_t* res = std::allocator<size_t>::allocate(n);
// store the size into the result so we can
// check if the size is correct when we deallocate.
res[0] = n;
Expand Down

0 comments on commit f832f01

Please sign in to comment.