Merge branch 'develop' of https://github.com/1041176461/phonopy into … #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: phonopy test using conda-forge environment with openmp triggered by site.cfg | |
on: | |
push: | |
branches-ignore: | |
- publish-gh-pages | |
- master | |
- rc | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
channels: conda-forge | |
channel-priority: strict | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
conda activate test | |
conda install --yes -c conda-forge python=${{ matrix.python-version }} | |
conda install --yes -c conda-forge c-compiler matplotlib-base pyyaml scipy numpy spglib h5py pip pytest codecov pytest-cov pytest | |
- name: Install cp2k-input-tools | |
run: | | |
conda activate test | |
pip install cp2k-input-tools | |
- name: Setup phonopy | |
run: | | |
conda activate test | |
echo "extra_compile_args = -fopenmp" > site.cfg | |
echo "extra_link_args = -lgomp" >> site.cfg | |
pip install -e . -vvv | |
- name: Test with pytest | |
run: | | |
conda activate test | |
pytest --cov=./ --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
verbose: true |