Skip to content

Commit

Permalink
Issue 663: add windows 2022 tests back (#664)
Browse files Browse the repository at this point in the history
* add windows 20222 tests back

* uncomment windows 2022

* remove windows 2019 tests
  • Loading branch information
jkotan authored Jan 8, 2025
1 parent 2a85825 commit 481be76
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 82 deletions.
75 changes: 2 additions & 73 deletions .github/workflows/cmake-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down Expand Up @@ -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: [
Expand All @@ -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} \
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conan/profiles/vs2022
Original file line number Diff line number Diff line change
Expand Up @@ -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
tools.env.virtualenv:powershell=pwsh
16 changes: 9 additions & 7 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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")

Expand Down

0 comments on commit 481be76

Please sign in to comment.