Moved some derivative related functions to a new class #76
This file contains hidden or 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: Run ZnO example | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - 2.0dev | |
| # paths: | |
| # - '**.cpp' | |
| # - '**.h' | |
| # - '**.py' | |
| # - '**.c' | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| # os: [ubuntu-latest, windows-latest, macOS-latest] | |
| python-version: ['3.10'] | |
| name: OS ${{ matrix.os }} Python ${{ matrix.python-version }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Miniforge | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-version: latest | |
| activate-environment: alamode | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache Conda env | |
| uses: actions/cache@v4 | |
| env: | |
| # Increase this value to reset cache if etc/alm-environment.yml has not changed | |
| CACHE_NUMBER: 0 | |
| with: | |
| path: ${{ env.CONDA }}/envs | |
| key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('etc/alamode-environment.yml') }}-${{ env.CACHE_NUMBER }} | |
| id: cache | |
| - name: Update environment | |
| run: conda env update -n alamode -f etc/alamode-environment.yml | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - run: | | |
| conda info | |
| conda list | |
| conda config --show-sources | |
| conda config --show | |
| printenv | sort | |
| - name: Build alm and anphon with cmake | |
| run: | | |
| mkdir -p _build | |
| cd _build | |
| cmake -DCMAKE_BUILD_TYPE=Release .. | |
| make alm anphon -j | |
| cd .. | |
| - name: Copy files | |
| working-directory: ./test | |
| run: | | |
| python test_zno.py --job copy | |
| cd zno | |
| ls | |
| cd strain_IFC | |
| ls | |
| cd ../../ | |
| - name: Run ZnO example manually | |
| working-directory: ./test/zno | |
| run: | | |
| ../../_build/anphon/anphon ZnO_qha_thermo.in | |
| # - name: Run ZnO example | |
| # working-directory: ./test | |
| # run: | | |
| # python test_zno.py --job run | |
| # cd zno | |
| # ls | |
| # cat ZnO_qha_thermo.log | |
| # cd ../ | |
| - name: Compare results | |
| working-directory: ./test | |
| run: python test_zno.py --job compare |