From f7a5241f4faecedfb6eb6aa29ee6b63f58f211fd Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 20 Oct 2021 10:47:55 +0200 Subject: [PATCH 1/9] Upgraded to xtensor 0.24.0 --- README.md | 2 +- environment-dev.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42103ff..3409a6c 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Reading and writing image, sound and npz file formats to and from xtensor data s mamba install xtensor-io -c conda-forge ``` -- `xtensor-io` depends on `xtensor` `^0.23.0`. +- `xtensor-io` depends on `xtensor` `^0.24.0`. - `OpenImageIO`, `libsndfile`, `zlib`, `HighFive`, and `blosc` are optional dependencies to `xtensor-io` diff --git a/environment-dev.yml b/environment-dev.yml index 4ca927a..476e2c3 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -14,6 +14,6 @@ dependencies: - nlohmann_json - google-cloud-cpp=1.21.0 - aws-sdk-cpp - - xtensor=0.23.10 + - xtensor=0.24.0 - cpp-filesystem From ffada938383b0f24c9e0b07cea7d5780057e1d96 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Wed, 20 Oct 2021 11:05:35 +0200 Subject: [PATCH 2/9] Release 0.13.0 --- environment.yml | 2 +- include/xtensor-io/xtensor_io_config.hpp.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index f7e12ea..6a26b2f 100644 --- a/environment.yml +++ b/environment.yml @@ -2,7 +2,7 @@ name: xtensor-io channels: - conda-forge dependencies: - - xtensor-io=0.12.9 + - xtensor-io=0.13.0 - xeus-cling=0.12.1 - xwidgets=0.25.1 - ffmpeg=4.3.1 diff --git a/include/xtensor-io/xtensor_io_config.hpp.in b/include/xtensor-io/xtensor_io_config.hpp.in index fc67481..c095fa8 100644 --- a/include/xtensor-io/xtensor_io_config.hpp.in +++ b/include/xtensor-io/xtensor_io_config.hpp.in @@ -11,8 +11,8 @@ #define XTENSOR_IO_CONFIG_HPP #define XTENSOR_IO_VERSION_MAJOR 0 -#define XTENSOR_IO_VERSION_MINOR 12 -#define XTENSOR_IO_VERSION_PATCH 9 +#define XTENSOR_IO_VERSION_MINOR 13 +#define XTENSOR_IO_VERSION_PATCH 0 #pragma cling add_library_path(@XTENSOR_IO_CLING_LIBRARY_DIR_64@) #pragma cling add_library_path(@XTENSOR_IO_CLING_LIBRARY_DIR_32@) From d0fbaf6f59d5f8375cfaa71391437eeb238b901c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Tue, 30 Nov 2021 11:50:11 -0500 Subject: [PATCH 3/9] Allow the library to be used from build directory. Closes #169. --- xtensor-ioConfig.cmake.in | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xtensor-ioConfig.cmake.in b/xtensor-ioConfig.cmake.in index 41c422c..d24887e 100644 --- a/xtensor-ioConfig.cmake.in +++ b/xtensor-ioConfig.cmake.in @@ -19,11 +19,6 @@ include(CMakeFindDependencyMacro) find_dependency(xtensor @xtensor_REQUIRED_VERSION@) -set(PN xtensor_io) -set_and_check(${PN}_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@") -set(${PN}_LIBRARY "") -check_required_components(${PN}) - if(NOT TARGET @PROJECT_NAME@) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") endif() From 917bcc497a5455e5d96a34bb89f2461221e54a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Tue, 30 Nov 2021 15:51:11 -0500 Subject: [PATCH 4/9] Find ghc::filesystem's include directory 2>------ Build started: Project: xtensor-zarr-gdal, Configuration: RelWithDebInfo x64 ------ 2>xtensor-zarr-gdal.cpp 2>C:\Libs\xtensor-io\include\xtensor-io/xchunk_store_manager.hpp(7,10): fatal error C1083: Cannot open include file: 'ghc/filesystem.hpp': No such file or directory 2>Done building project "xtensor-zarr-gdal.vcxproj" -- FAILED. --- CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f98e7f..d52ba97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,16 @@ add_library(xtensor-io INTERFACE) include_directories(${GTEST_INCLUDE_DIRS}) +find_path(ghc-filesystem-include REQUIRED + NAMES "ghc/filesystem.hpp" + DOC "Path to include directory of https://github.com/gulrak/filesystem" + ) +target_include_directories(xtensor-io + INTERFACE + $ + $ +) + target_include_directories(xtensor-io INTERFACE $ From 73e78e0eb01452a747d7b0aa98147da4754329a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Tue, 30 Nov 2021 16:34:42 -0500 Subject: [PATCH 5/9] Fix compile error on VS2019 error C2440: '': cannot convert from 'ghc::filesystem::path' to 'std::string' --- include/xtensor-io/xio_disk_handler.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/xtensor-io/xio_disk_handler.hpp b/include/xtensor-io/xio_disk_handler.hpp index 891eeb7..9115a4b 100644 --- a/include/xtensor-io/xio_disk_handler.hpp +++ b/include/xtensor-io/xio_disk_handler.hpp @@ -62,7 +62,7 @@ namespace xt { if (!fs::is_directory(directory)) { - XTENSOR_THROW(std::runtime_error, "Path is not a directory: " + std::string(directory)); + XTENSOR_THROW(std::runtime_error, "Path is not a directory: " + std::string(directory.string())); } } else From a0222401f160d1cc3d64b6d5f495b05beb21710f Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 2 Apr 2024 04:07:48 +0200 Subject: [PATCH 6/9] Switched to GHA --- .github/workflows/linux.yml | 39 +++++++++++++++++++++++++++++++++++++ azure-pipelines.yml | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 0000000..8635064 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,39 @@ +name: Linux +on: + workflow_dispatch: + pull_request: + push: + branches: [master] +concurrency: + group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }} + cancel-in-progress: true +defaults: + run: + shell: bash -e -l {0} +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set conda environment + uses: mamba-org/setup-micromamba@main + with: + environment-name: myenv + environment-file: environment-dev.yml + + - name: Configure using CMake + run: cmake -G Ninja -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DHAVE_ALL_DEPS=ON + + - name: Generate data for zlib test + 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))' + + - name: Build and run xtensor-io tests + run: | + export GTEST_FILTER="-xio_gdal_handler.read_vsigs" + make -j2 xtest diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 34b4156..be2c115 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +2,6 @@ trigger: - master jobs: - - template: ./.azure-pipelines/azure-pipelines-linux.yml + # - template: ./.azure-pipelines/azure-pipelines-linux.yml - template: ./.azure-pipelines/azure-pipelines-osx.yml From 6b60be9acabeb5bfba8d3a465e501a685bd8bc7e Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 2 Apr 2024 04:18:54 +0200 Subject: [PATCH 7/9] Fixed GHA --- .github/workflows/{linux.yml => main.yml} | 18 +++++++++++++----- azure-pipelines.yml | 2 +- environment-dev.yml | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) rename .github/workflows/{linux.yml => main.yml} (72%) diff --git a/.github/workflows/linux.yml b/.github/workflows/main.yml similarity index 72% rename from .github/workflows/linux.yml rename to .github/workflows/main.yml index 8635064..27cecbf 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: Linux +name: CI on: workflow_dispatch: pull_request: @@ -11,10 +11,12 @@ defaults: run: shell: bash -e -l {0} jobs: - build: - runs-on: ubuntu-latest + unix: + runs-on: ${{ matrix.os }} strategy: fail-fast: false + matrix: + os: [ubuntu-22.04, macos-12] steps: @@ -31,9 +33,15 @@ jobs: run: cmake -G Ninja -Bbuild -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DHAVE_ALL_DEPS=ON - name: Generate data for zlib test + working-directory: build/test 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))' - - name: Build and run xtensor-io tests + - name: Build + working-directory: build + run: cmake --build . --target test_xtensor_io_lib --parallel 8 + + - name: Run tests + working-directory: build/test run: | export GTEST_FILTER="-xio_gdal_handler.read_vsigs" - make -j2 xtest + ./test_xtensor_io_lib diff --git a/azure-pipelines.yml b/azure-pipelines.yml index be2c115..c4c3183 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,5 +3,5 @@ trigger: jobs: # - template: ./.azure-pipelines/azure-pipelines-linux.yml - - template: ./.azure-pipelines/azure-pipelines-osx.yml + #- template: ./.azure-pipelines/azure-pipelines-osx.yml diff --git a/environment-dev.yml b/environment-dev.yml index 476e2c3..e7e275d 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -4,6 +4,7 @@ channels: dependencies: # Build dependencies - cmake + - ninja # Host dependencies - openimageio=2.2.7 - libsndfile=1.0.30 From 0b67239d72971a282e0640a4ef3c66fd02ec63c3 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 2 Apr 2024 05:26:13 +0200 Subject: [PATCH 8/9] Removed Azure Pipelines files --- .azure-pipelines/azure-pipelines-linux.yml | 17 -------- .azure-pipelines/azure-pipelines-osx.yml | 26 ------------ .azure-pipelines/unix-build.yml | 46 ---------------------- azure-pipelines.yml | 7 ---- 4 files changed, 96 deletions(-) delete mode 100644 .azure-pipelines/azure-pipelines-linux.yml delete mode 100644 .azure-pipelines/azure-pipelines-osx.yml delete mode 100644 .azure-pipelines/unix-build.yml delete mode 100644 azure-pipelines.yml diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml deleted file mode 100644 index d5fee74..0000000 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ /dev/null @@ -1,17 +0,0 @@ -jobs: - - job: 'Linux' - strategy: - matrix: - gcc_7: - image_name: 'ubuntu-20.04' - pool: - vmImage: $(image_name) - timeoutInMinutes: 360 - steps: - - - bash: echo "##vso[task.prependpath]$CONDA/bin" - displayName: Add conda to PATH - - - template: unix-build.yml - parameters: - platform: 'Linux' diff --git a/.azure-pipelines/azure-pipelines-osx.yml b/.azure-pipelines/azure-pipelines-osx.yml deleted file mode 100644 index d3a90a4..0000000 --- a/.azure-pipelines/azure-pipelines-osx.yml +++ /dev/null @@ -1,26 +0,0 @@ -jobs: - - job: 'OSX' - strategy: - matrix: - macOS_10_15: - image_name: 'macOS-10.15' - pool: - vmImage: $(image_name) - variables: - CC: clang - CXX: clang++ - timeoutInMinutes: 360 - steps: - - script: | - echo "Removing homebrew for Azure to avoid conflicts with conda" - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)" - displayName: Remove homebrew - - - bash: | - echo "##vso[task.prependpath]$CONDA/bin" - sudo chown -R $USER $CONDA - displayName: Add conda to PATH - - - template: unix-build.yml - parameters: - platform: 'OSX' diff --git a/.azure-pipelines/unix-build.yml b/.azure-pipelines/unix-build.yml deleted file mode 100644 index 62f41e9..0000000 --- a/.azure-pipelines/unix-build.yml +++ /dev/null @@ -1,46 +0,0 @@ -parameters: - - name: 'platform' - type: string - -steps: - - script: | - conda config --set always_yes yes --set changeps1 no - conda update -q conda - conda env create --file environment-dev.yml - displayName: Install dependencies - - - script: | - source activate xtensor-io - conda install gxx_linux-64 libgcc -c conda-forge - condition: eq('${{ parameters.platform }}', 'Linux') - displayName: Install conda-forge compilers - - - script: | - source activate xtensor-io - conda install tbb==2020.2 -c conda-forge - condition: eq('${{ parameters.platform }}', 'OSX') - displayName: Workaround missing TBB - - - script: | - source activate xtensor-io - export LDFLAGS="${LDFLAGS} -Wl,-rpath,$CONDA_PREFIX/lib" - export LINKFLAGS="${LDFLAGS}" - mkdir build - cd build - cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DDOWNLOAD_GTEST=ON -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX -DHAVE_ALL_DEPS=ON $(Build.SourcesDirectory) - - displayName: Configure xtensor-io - workingDirectory: $(Build.BinariesDirectory) - - - script: | - source activate xtensor-io - 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))' - displayName: Generate data for zlib test - workingDirectory: $(Build.BinariesDirectory)/build/test - - - script: | - source activate xtensor-io - export GTEST_FILTER="-xio_gdal_handler.read_vsigs" - make -j2 xtest - displayName: Build and run xtensor-io tests - workingDirectory: $(Build.BinariesDirectory)/build diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index c4c3183..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,7 +0,0 @@ -trigger: - - master - -jobs: - # - template: ./.azure-pipelines/azure-pipelines-linux.yml - #- template: ./.azure-pipelines/azure-pipelines-osx.yml - From 800c259a640e4b5a87eae30e8ff2c4dbee2232f8 Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 2 Apr 2024 05:43:00 +0200 Subject: [PATCH 9/9] Upgraded to xtensor 0.25.0 --- CMakeLists.txt | 2 +- README.md | 2 +- environment-dev.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d52ba97..24fc36a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ message(STATUS "Building xtensor-io v${${PROJECT_NAME}_VERSION}") # Dependencies # ============ -set (xtensor_REQUIRED_VERSION 0.23.0) +set (xtensor_REQUIRED_VERSION 0.25.0) if(TARGET xtensor) set(xtensor_VERSION ${XTENSOR_VERSION_MAJOR}.${XTENSOR_VERSION_MINOR}.${XTENSOR_VERSION_PATCH}) if( NOT ${xtensor_VERSION} VERSION_GREATER_EQUAL ${xtensor_REQUIRED_VERSION}) diff --git a/README.md b/README.md index 3409a6c..5cc4d51 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Reading and writing image, sound and npz file formats to and from xtensor data s mamba install xtensor-io -c conda-forge ``` -- `xtensor-io` depends on `xtensor` `^0.24.0`. +- `xtensor-io` depends on `xtensor` `^0.25.0`. - `OpenImageIO`, `libsndfile`, `zlib`, `HighFive`, and `blosc` are optional dependencies to `xtensor-io` diff --git a/environment-dev.yml b/environment-dev.yml index e7e275d..9a329ef 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -15,6 +15,6 @@ dependencies: - nlohmann_json - google-cloud-cpp=1.21.0 - aws-sdk-cpp - - xtensor=0.24.0 + - xtensor=0.25.0 - cpp-filesystem