Skip to content

Install kim-api at a different location #312

Install kim-api at a different location

Install kim-api at a different location #312

Workflow file for this run

name: Testing
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Lint
run: pre-commit run --show-diff-on-failure --all-files
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
steps:
# - name: Install gcc
# run: |
# sudo apt-get update
# sudo apt-get install -yq gcc
# sudo apt-get install -yq gfortran
# # cannot install cmake with apt-get, so using this action
# - uses: lukka/get-cmake@latest
# with:
# cmakeVersion: "~3.25.0"
#
# - name: Install kim-api
# run: |
# export KIMAPI_DIR=${PWD}
# export KIM_API_VERSION="2.3.0"
# cd $KIMAPI_DIR && cd ..
# wget http://s3.openkim.org/kim-api/kim-api-$KIM_API_VERSION.txz
# tar Jxvf kim-api-$KIM_API_VERSION.txz
# cd kim-api-$KIM_API_VERSION
# mkdir build && cd build
# cmake .. -DCMAKE_BUILD_TYPE=Release
# make -j2
# sudo make install
# sudo ldconfig
#
# # install SW driver and model
# cd $KIMAPI_DIR
# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_006
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/[email protected]
# with:
# python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- name: Set up micromamba
uses: mamba-org/[email protected]
with:
# the create command looks like this:
# `micromamba create -n test-env python=3.10 numpy`
environment-name: test-env
cache-environment: true
create-args: >-
python=3.10
kim-api=2.3.0
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install .[test]
- name: Test with pytest
run: pytest