Skip to content

Commit e447b8b

Browse files
authored
Merge branch 'master' into master
2 parents 5bbf268 + a999055 commit e447b8b

34 files changed

Lines changed: 129 additions & 180 deletions

.azure-pipelines/azure-pipelines-linux.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.azure-pipelines/azure-pipelines-osx.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.azure-pipelines/unix-build.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
defaults:
11+
run:
12+
shell: bash -e -l {0}
13+
jobs:
14+
unix:
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
os: [ubuntu-24.04, macos-15]
20+
21+
steps:
22+
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Set conda environment
27+
uses: mamba-org/setup-micromamba@main
28+
with:
29+
environment-name: myenv
30+
environment-file: environment-dev.yml
31+
32+
- name: Configure using CMake
33+
run: cmake -G Ninja -Bbuild -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DHAVE_ALL_DEPS=ON
34+
35+
- name: Generate data for zlib test
36+
working-directory: build/test
37+
run: python -c 'import struct, zlib; open("files/test.zl", "wb").write(zlib.compress(struct.pack("4d", 3.0, 2.0, 1.0, 0.0), level=1))'
38+
39+
- name: Build
40+
working-directory: build
41+
run: cmake --build . --target test_xtensor_io_lib --parallel 8
42+
43+
- name: Run tests
44+
working-directory: build/test
45+
run: |
46+
export GTEST_FILTER="-xio_gdal_handler.read_vsigs"
47+
./test_xtensor_io_lib

CMakeLists.txt

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION 3.8)
10+
cmake_minimum_required(VERSION 3.30)
1111
project(xtensor-io)
1212

1313
set(XTENSOR_IO_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
@@ -42,7 +42,7 @@ message(STATUS "Building xtensor-io v${${PROJECT_NAME}_VERSION}")
4242
# Dependencies
4343
# ============
4444

45-
set (xtensor_REQUIRED_VERSION 0.23.0)
45+
set (xtensor_REQUIRED_VERSION 0.25.0)
4646
if(TARGET xtensor)
4747
set(xtensor_VERSION ${XTENSOR_VERSION_MAJOR}.${XTENSOR_VERSION_MINOR}.${XTENSOR_VERSION_PATCH})
4848
if( NOT ${xtensor_VERSION} VERSION_GREATER_EQUAL ${xtensor_REQUIRED_VERSION})
@@ -121,6 +121,7 @@ endforeach()
121121
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/modules")
122122

123123
add_library(xtensor-io INTERFACE)
124+
target_compile_features(xtensor-io INTERFACE cxx_std_17)
124125

125126
include_directories(${GTEST_INCLUDE_DIRS})
126127

@@ -197,18 +198,8 @@ endif()
197198

198199
if(HAVE_HighFive)
199200
find_package(HighFive REQUIRED)
200-
find_package(HDF5 REQUIRED)
201-
message(STATUS "HighFive ${HighFive_VERSION} and HDF5 ${HDF5_VERSION} found, HDF5 file support enabled")
202-
find_package(HDF5 REQUIRED)
203-
get_target_property(HighFive_INCLUDE_DIRECTORIES_EXTRACTED HighFive INTERFACE_INCLUDE_DIRECTORIES)
204-
target_include_directories(xtensor-io
205-
INTERFACE
206-
${HighFive_INCLUDE_DIRECTORIES_EXTRACTED}
207-
)
208-
target_link_libraries(xtensor-io
209-
INTERFACE
210-
${HDF5_LIBRARIES}
211-
)
201+
message(STATUS "HighFive ${HighFive_VERSION} found, HDF5 file support enabled")
202+
target_link_libraries(xtensor-io INTERFACE HighFive::HighFive)
212203
else()
213204
message(STATUS "HighFive not enabled: use -DHAVE_HighFive=ON for HDF5 file support")
214205
endif()
@@ -245,15 +236,11 @@ else()
245236
endif()
246237

247238
if(HAVE_storage_client)
248-
find_package(storage_client REQUIRED)
249-
message(STATUS "storage_client ${storage_client_VERSION} found, Google Cloud Storage IO handler support enabled")
250-
target_include_directories(xtensor-io
251-
INTERFACE
252-
${storage_client_INCLUDE_DIRS}
253-
)
239+
find_package(google_cloud_cpp_storage REQUIRED)
240+
message(STATUS "google_cloud_cpp_storage ${google_cloud_cpp_storage_VERSION} found, Google Cloud Storage IO handler support enabled")
254241
target_link_libraries(xtensor-io
255242
INTERFACE
256-
storage_client
243+
google-cloud-cpp::storage
257244
)
258245
else()
259246
message(STATUS "storage_client not enabled: use -DHAVE_storage_client=ON for Google Cloud Storage IO handler support")

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ Reading and writing image, sound and npz file formats to and from xtensor data s
2727
```bash
2828
mamba install xtensor-io -c conda-forge
2929
```
30-
31-
- `xtensor-io` depends on `xtensor` `^0.24.0` and [filesystem](https://github.com/gulrak/filesystem).
30+
- `xtensor-io` depends on `xtensor` `^0.26.0` and [filesystem](https://github.com/gulrak/filesystem).
3231

3332
- `OpenImageIO`, `libsndfile`, `zlib`, `HighFive`, and `blosc` are optional dependencies to `xtensor-io`
3433

azure-pipelines.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

environment-dev.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ channels:
44
dependencies:
55
# Build dependencies
66
- cmake
7+
- ninja
78
# Host dependencies
8-
- openimageio=2.2.7
9-
- libsndfile=1.0.30
10-
- zlib=1.2.11
11-
- highfive=2.1.1
12-
- blosc
13-
- gdal
9+
- openimageio >=3.1,<4
10+
- fmt >=12.2,<13
11+
- libsndfile >=1.2,<2
12+
- zlib >=1.3,<2
13+
- highfive >=3.3,<4
14+
- blosc >=1.21,<2
15+
- gdal >=3.13,<4
1416
- nlohmann_json
15-
- google-cloud-cpp=1.21.0
16-
- aws-sdk-cpp
17-
- xtensor=0.24.0
18-
- cpp-filesystem
17+
- google-cloud-cpp >=3.0,<4
18+
- aws-sdk-cpp >=1.11,<2
19+
- xtensor=0.26.0
20+
- cpp-filesystem >=1.5,<2
1921

include/xtensor-io/xaudio.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
#include <sndfile.hh>
1717

18-
#include <xtensor/xarray.hpp>
19-
#include <xtensor/xtensor.hpp>
20-
#include <xtensor/xeval.hpp>
18+
#include <xtensor/containers/xarray.hpp>
19+
#include <xtensor/containers/xtensor.hpp>
20+
#include <xtensor/core/xeval.hpp>
2121

2222
#include "xtensor_io_config.hpp"
2323

include/xtensor-io/xchunk_store_manager.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
#include <xtl/xsequence.hpp>
1010

11-
#include "xtensor/xarray.hpp"
12-
#include "xtensor/xchunked_array.hpp"
11+
#include "xtensor/containers/xarray.hpp"
12+
#include "xtensor/chunk/xchunked_array.hpp"
1313
#include "xfile_array.hpp"
1414

1515
namespace xt

0 commit comments

Comments
 (0)