From 481be76e079a46655610254bc41ce73caf5bb4e5 Mon Sep 17 00:00:00 2001 From: Jan Kotanski Date: Wed, 8 Jan 2025 13:10:15 +0100 Subject: [PATCH] Issue 663: add windows 2022 tests back (#664) * add windows 20222 tests back * uncomment windows 2022 * remove windows 2019 tests --- .github/workflows/cmake-build.yml | 75 +------------------------ .github/workflows/conan/profiles/vs2022 | 4 +- conanfile.py | 16 +++--- 3 files changed, 13 insertions(+), 82 deletions(-) diff --git a/.github/workflows/cmake-build.yml b/.github/workflows/cmake-build.yml index 45ce1755c5..cb0df69cd0 100644 --- a/.github/workflows/cmake-build.yml +++ b/.github/workflows/cmake-build.yml @@ -47,7 +47,7 @@ jobs: apt-get install -y --no-install-recommends ssh - name: Install and configure conan run: | - pip install --upgrade conan==2.0.2 + pip install --upgrade conan CONAN_ARGS="--profile .github/workflows/conan/profiles/${{ matrix.profile }} \ -o with_boost=${H5CPP_WITH_BOOST} \ -o with_mpi=${H5CPP_WITH_MPI} \ @@ -92,78 +92,7 @@ jobs: run: | cd build ctest --extra-verbose --no-tests=error - windows-2019: - strategy: - matrix: - shared: [ - "shared", - "static" - ] - boost: [ - "boost", - "stdfs" - ] - runs-on: windows-2019 - steps: - - uses: actions/checkout@v2 - - name: Add MSVC to PATH - uses: ilammy/msvc-dev-cmd@v1 - - name: Set environment variables - run: | - bash .github/workflows/set_env_vars.sh \ - ${{ matrix.shared }} \ - ${{ matrix.boost }} - - name: Install and configure conan - run: | - python -m pip install --upgrade pip - pip install --upgrade conan==2.0.2 - CONAN_ARGS="--profile .github/workflows/conan/profiles/vs2019 \ - -o with_boost=${H5CPP_WITH_BOOST} \ - -o shared=${H5CPP_SHARED} \ - -o *:shared=${H5CPP_SHARED}" - conan profile detect - conan remove -c zlib/* - conan lock create conanfile.py ${CONAN_ARGS} --lockfile-packages --lockfile-out base.lock - conan lock create conanfile.py ${CONAN_ARGS} --build missing - - name: cache conan dependencies - uses: actions/cache@v2 - with: - path: ~/.conan/data - key: conan-vs2019-${{ hashfiles('base.lock') }}-${{ hashFiles('conan.lock') }} - restore-keys: | - conan-vs-2019-${{ hashfiles('base.lock') }} - conan-vs-2019 - - name: install conan dependencies - run: | - CONAN_ARGS="--profile .github/workflows/conan/profiles/vs2019 \ - -o with_boost=${H5CPP_WITH_BOOST} \ - -o shared=${H5CPP_SHARED} \ - -o *:shared=${H5CPP_SHARED}" - conan remove -c zlib/* - conan install . ${CONAN_ARGS} \ - --output-folder build \ - --lockfile conan.lock \ - --build missing \ - --update \ - --generator VirtualRunEnv - - name: build with cmake - run: | - CONAN_ARGS="--profile .github/workflows/conan/profiles/vs2019 \ - -o with_boost=${H5CPP_WITH_BOOST} \ - -o shared=${H5CPP_SHARED} \ - -o *:shared=${H5CPP_SHARED}" - conan build . ${CONAN_ARGS} \ - --lockfile conan.lock \ - --output-folder build - - name: run tests - run: | - cd build - .\conanbuildenv-release-x86_64.ps1 - .\conanrunenv-release-x86_64.ps1 - ctest --extra-verbose --no-tests=error --output-on-failure - shell: pwsh windows-2022: - if: false strategy: matrix: shared: [ @@ -187,7 +116,7 @@ jobs: - name: Install and configure conan run: | python -m pip install --upgrade pip - pip install --upgrade conan==2.0.2 + pip install --upgrade conan CONAN_ARGS="--profile .github/workflows/conan/profiles/vs2022 \ -o with_boost=${H5CPP_WITH_BOOST} \ -o shared=${H5CPP_SHARED} \ diff --git a/.github/workflows/conan/profiles/vs2022 b/.github/workflows/conan/profiles/vs2022 index 7ad705cf0b..2fb8cf4f71 100644 --- a/.github/workflows/conan/profiles/vs2022 +++ b/.github/workflows/conan/profiles/vs2022 @@ -2,9 +2,9 @@ arch=x86_64 build_type=Release compiler=msvc -compiler.version=193 +compiler.version=194 compiler.runtime=dynamic os=Windows [conf] -tools.env.virtualenv:powershell=True \ No newline at end of file +tools.env.virtualenv:powershell=pwsh diff --git a/conanfile.py b/conanfile.py index 5669fd1f1a..1a807cdf34 100644 --- a/conanfile.py +++ b/conanfile.py @@ -26,8 +26,10 @@ class H5CppConan(ConanFile): def build_requirements(self): self.build_requires("catch2/3.3.2") - self.build_requires("ninja/1.10.2") - self.build_requires("zlib/1.2.13") + self.build_requires("ninja/1.12.1") + self.build_requires("zlib/1.3.1") + if self.settings.os == "Windows": + self.tool_requires("b2/5.2.1") def config_options(self): if self.settings.os == "Windows": @@ -38,19 +40,19 @@ def configure(self): self.options["hdf5"].parallel = True def requirements(self): - self.requires("hdf5/1.14.0") + self.requires("hdf5/1.14.5") self.requires("catch2/3.3.2") - self.requires("zlib/1.2.13") + self.requires("zlib/1.3.1") self.requires("szip/2.1.1") self.requires("bzip2/1.0.8") if self.options.get_safe("with_boost", False): if self.settings.os == "Windows": - self.requires("boost/1.81.0") + self.requires("boost/1.86.0") elif self.settings.os == "Macos": - self.requires("boost/1.81.0") + self.requires("boost/1.86.0") else: - self.requires("boost/1.81.0") + self.requires("boost/1.86.0") if self.options.get_safe("with_mpi", False): self.requires("openmpi/4.1.0")