Skip to content

Commit

Permalink
Updats github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Jul 7, 2024
1 parent 2b5b6f6 commit 57d863f
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 28 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/phono3py-pytest-conda-mkl-phphmtblas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler cxx-compiler
- name: Install symfc develop branch
run: |
conda activate test
Expand All @@ -38,12 +37,12 @@ jobs:
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
conda activate test
PHPHCALC_USE_MTBLAS=true pip install -e . -vvv
PHPHCALC_USE_MTBLAS=ON pip install -e . -vvv
- name: Run pytest
run: |
pytest -v --cov=./ --cov-report=xml test
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/phono3py-pytest-conda-mkl-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler cxx-compiler
- name: Install symfc develop branch
run: |
conda activate test
Expand All @@ -38,7 +37,7 @@ jobs:
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/phono3py-pytest-conda-mkl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
#conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler cxx-compiler
- name: Install symfc develop branch
run: |
conda activate test
Expand All @@ -38,7 +37,7 @@ jobs:
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/phono3py-pytest-conda-numpy2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py "numpy=2" scipy pytest codecov pytest-cov cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py "numpy=2" scipy pytest codecov pytest-cov cmake c-compiler cxx-compiler
- name: Install spglib develop branch
run: |
conda activate test
Expand All @@ -44,7 +44,7 @@ jobs:
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/phono3py-pytest-conda-phphmtblas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
#conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler cxx-compiler
- name: Install symfc develop branch
run: |
conda activate test
Expand All @@ -38,12 +37,12 @@ jobs:
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
conda activate test
PHPHCALC_USE_MTBLAS=true pip install -e . -vvv
PHPHCALC_USE_MTBLAS=ON pip install -e . -vvv
- name: Run pytest
run: |
pytest -v --cov=./ --cov-report=xml test
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/phono3py-pytest-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ jobs:
run: |
conda activate test
conda install --yes python=${{ matrix.python-version }}
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
#conda install --yes matplotlib-base pyyaml "libblas=*=*mkl" mkl-include h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler
conda install --yes matplotlib-base pyyaml "libblas=*=*openblas" openblas h5py scipy pytest codecov pytest-cov spglib alm cmake c-compiler cxx-compiler
- name: Install phonopy develop branch
run: |
conda activate test
git clone --depth 1 https://github.com/phonopy/phonopy.git
cd phonopy
PHONOPY_USE_OPENMP=true pip install -e . -vvv
pip install -e . -vvv
cd ..
- name: Install phono3py
run: |
Expand Down
19 changes: 10 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ if(PHPHCALC OR BUILD_NANOBIND_MODULE)
# Shared library
add_library(phphcalc_lib SHARED ${SOURCES_PHPHCALC})
target_link_libraries(phphcalc_lib m ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}
${OpenMP_C_LIBRARIES})
OpenMP::OpenMP_C)
target_include_directories(phphcalc_lib PRIVATE ${MY_INCLUDES})
target_compile_options(phphcalc_lib PRIVATE ${OpenMP_C_FLAGS})
target_compile_options(phphcalc_lib)

if(BLAS_LIBRARIES MATCHES "libmkl")
if(PHPHCALC_USE_MTBLAS)
Expand All @@ -178,9 +178,9 @@ if(PHPHCALC OR BUILD_NANOBIND_MODULE)
# Static link library
add_library(phphcalc_lib STATIC ${SOURCES_PHPHCALC})
target_link_libraries(phphcalc_lib m ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}
${OpenMP_C_LIBRARIES})
OpenMP::OpenMP_C)
target_include_directories(phphcalc_lib PRIVATE ${MY_INCLUDES})
target_compile_options(phphcalc_lib PRIVATE ${OpenMP_C_FLAGS})
target_compile_options(phphcalc_lib)

if(BLAS_LIBRARIES MATCHES "libmkl")
if(PHPHCALC_USE_MTBLAS)
Expand Down Expand Up @@ -234,9 +234,9 @@ if(PHONONCALC OR BUILD_NANOBIND_MODULE)
# Shared library
add_library(phononcalc_lib SHARED ${SOURCES_PHONONCALC})
target_link_libraries(phononcalc_lib m ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}
${OpenMP_C_LIBRARIES})
OpenMP::OpenMP_C)
target_include_directories(phononcalc_lib PRIVATE ${MY_INCLUDES})
target_compile_options(phononcalc_lib PRIVATE ${OpenMP_C_FLAGS})
target_compile_options(phononcalc_lib)

if(BLAS_LIBRARIES MATCHES "libmkl")
target_compile_definitions(phononcalc_lib PRIVATE MKL_LAPACKE
Expand All @@ -250,10 +250,11 @@ if(PHONONCALC OR BUILD_NANOBIND_MODULE)
else()
# Static link library
add_library(phononcalc_lib STATIC ${SOURCES_PHONONCALC})
target_link_libraries(phononcalc_lib m ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}
${OpenMP_C_LIBRARIES})
target_link_libraries(
phononcalc_lib PRIVATE m ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES}
OpenMP::OpenMP_C)
target_include_directories(phononcalc_lib PRIVATE ${MY_INCLUDES})
target_compile_options(phononcalc_lib PRIVATE ${OpenMP_C_FLAGS})
target_compile_options(phononcalc_lib)

if(BLAS_LIBRARIES MATCHES "libmkl")
target_compile_definitions(phononcalc_lib PRIVATE MKL_LAPACKE
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ sdist.include = [
"README.md",
]

[tool.scikit-build.cmake.define]
PHPHCALC_USE_MTBLAS = {env="PHPHCALC_USE_MTBLAS", default="OFF"}

[tool.setuptools_scm]
write_to = "phono3py/_version.py"

Expand Down

0 comments on commit 57d863f

Please sign in to comment.