Skip to content

update conan version #408

update conan version

update conan version #408

Workflow file for this run

name: cmake-build
on:
push:
branches:
- '*'
pull_request:
branches:
- master
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
ubuntu:
strategy:
matrix:
shared: [shared, static]
boost: [boost, stdfs]
mpi: [
mpi,
serial
]
profile: [
gcc11,
clang14-libc++,
clang14-libstdc++
]
runs-on: ubuntu-22.04
# container:
# image: ${{ matrix.image }}
# options: '--user=root'
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
bash .github/workflows/set_env_vars.sh \
${{ matrix.shared }} \
${{ matrix.boost }} \
${{ matrix.mpi }} \
${{ matrix.profile }}
# - name: Install MPI prerequisites
# if: ${{ matrix.mpi == 'mpi' }}
# run: |
# apt-get update
# apt-get install -y --no-install-recommends ssh
- name: Install and configure conan
run: |
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} \
-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-${{ matrix.profile }}-${{ hashfiles('base.lock') }}-${{ hashFiles('conan.lock') }}
restore-keys: |
conan-${{ matrix.profile }}-${{ hashfiles('base.lock') }}
conan-${{ matrix.profile }}
- name: install conan dependencies
run: |
CONAN_ARGS="--profile .github/workflows/conan/profiles/${{ matrix.profile }} \
-o with_boost=${H5CPP_WITH_BOOST} \
-o with_mpi=${H5CPP_WITH_MPI} \
-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
- name: build with cmake
run: |
CONAN_ARGS="--profile .github/workflows/conan/profiles/${{ matrix.profile }} \
-o with_boost=${H5CPP_WITH_BOOST} \
-o with_mpi=${H5CPP_WITH_MPI} \
-o shared=${H5CPP_SHARED} \
-o *:shared=${H5CPP_SHARED}"
conan build . ${CONAN_ARGS} \
--lockfile conan.lock \
--output-folder build
- name: run tests
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: [
"shared",
"static"
]
boost: [
"boost",
"stdfs"
]
runs-on: windows-2022
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/vs2022 \
-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-vs2022-${{ hashfiles('base.lock') }}-${{ hashFiles('conan.lock') }}
restore-keys: |
conan-vs-2022-${{ hashfiles('base.lock') }}
conan-vs-2022
- name: install conan dependencies
run: |
CONAN_ARGS="--profile .github/workflows/conan/profiles/vs2022 \
-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/vs2022 \
-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
macos-13:
strategy:
matrix:
shared: ["shared", "static"]
boost: ["boost", "stdfs"]
mpi: [
# "mpi",
"serial"
]
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set environment variables
run: |
bash .github/workflows/set_env_vars.sh \
${{ matrix.shared }} \
${{ matrix.boost }} \
${{ matrix.mpi }}
- name: Install OpenMPI and prerequisites
if: ${{ matrix.mpi == 'mpi' }}
run: brew install open-mpi
- name: Install and configure conan
run: |
python -m pip install --upgrade pip
pip install --upgrade conan
# there's currently an issue running the MPI tests on OSX with HDF5 compiled
# as a dynamic library. Use static HDF5 for now
HDF5_SHARED=${H5CPP_SHARED}
if [ "${H5CPP_WITH_MPI}" = "True" ]; then
HDF5_SHARED=False
fi
CONAN_ARGS="--profile .github/workflows/conan/profiles/apple-clang12 \
-o with_boost=${H5CPP_WITH_BOOST} \
-o with_mpi=${H5CPP_WITH_MPI} \
-o shared=${H5CPP_SHARED} \
-o *:shared=${HDF5_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-apple-clang12-${{ hashfiles('base.lock') }}-${{ hashFiles('conan.lock') }}
restore-keys: |
conan-apple-clang12-${{ hashfiles('base.lock') }}
conan-apple-clang12
- name: install conan dependencies
run: |
HDF5_SHARED=${H5CPP_SHARED}
if [ "${H5CPP_WITH_MPI}" = "True" ]; then
HDF5_SHARED=False
fi
CONAN_ARGS="--profile .github/workflows/conan/profiles/apple-clang12 \
-o with_boost=${H5CPP_WITH_BOOST} \
-o with_mpi=${H5CPP_WITH_MPI} \
-o shared=${H5CPP_SHARED} \
-o *:shared=${HDF5_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: |
HDF5_SHARED=${H5CPP_SHARED}
if [ "${H5CPP_WITH_MPI}" = "True" ]; then
HDF5_SHARED=False
fi
CONAN_ARGS="--profile .github/workflows/conan/profiles/apple-clang12 \
-o with_boost=${H5CPP_WITH_BOOST} \
-o with_mpi=${H5CPP_WITH_MPI} \
-o shared=${H5CPP_SHARED} \
-o *:shared=${HDF5_SHARED}"
conan build . ${CONAN_ARGS} \
--lockfile conan.lock \
--output-folder build
- name: run tests
run: |
cd build
ctest --extra-verbose --no-tests=error
debian-12:
strategy:
matrix:
shared: [shared, static]
boost: [boost, stdfs]
mpi: [
mpi,
serial
]
runs-on: ubuntu-20.04
container:
image: debian:bookworm
steps:
- uses: actions/checkout@v2
- name: Set environment variables
run: |
bash .github/workflows/set_env_vars.sh \
${{ matrix.shared }} \
${{ matrix.boost }} \
${{ matrix.mpi }}
- name: install serial prerequisites
if: ${{ matrix.mpi == 'serial' }}
run: |
apt-get update
apt-get -y install \
cmake \
catch2 \
g++ \
libhdf5-dev \
libboost-filesystem-dev \
wget
- name: Install MPI prerequisites
if: ${{ matrix.mpi == 'mpi' }}
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
cmake \
catch2 \
g++ \
libboost-filesystem-dev \
libhdf5-mpi-dev \
libopenmpi-dev
- name: build with cmake
run: |
HDF5_STATIC=ON
[ "${H5CPP_SHARED}" = "True" ] && HDF5_STATIC=OFF
mkdir build
cd build
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DH5CPP_CONAN=DISABLE \
-DH5CPP_CATCH2_V2=TRUE \
-DHDF5_USE_STATIC_LIBRARIES=${HDF5_STATIC} \
-DH5CPP_BUILD_SHARED=${H5CPP_SHARED} \
-DH5CPP_WITH_BOOST=${H5CPP_WITH_BOOST} \
-DH5CPP_WITH_MPI=${H5CPP_WITH_MPI}
cmake --build . -- -j 2
- name: run tests
run: |
ctest --extra-verbose --no-tests=error
working-directory: build
- name: install with cmake
run: |
cmake --build . --target install
working-directory: build
- name: build examples
run: |
mkdir examples_build
cd examples_build
cmake ../examples -DCMAKE_BUILD_TYPE=Release
cmake --build . -- -j 2