-
Notifications
You must be signed in to change notification settings - Fork 38
70 lines (66 loc) · 2.28 KB
/
python-package-conda.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Python Package using Conda
on:
push:
pull_request:
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout nglview repository
uses: actions/checkout@v4
- name: Cache conda
uses: actions/cache@v4
env:
CACHE_NUMBER: 1 # Increase this value to reset cache if environment.yml has changed
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('.github/workflows/environment.yml') }}
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: pytraj-gha
environment-file: .github/workflows/environment.yml
mamba-version: "*"
channels: conda-forge
channel-priority: true
python-version: ${{ matrix.python-version }}
- name: Install prerequisite packages
run: |
sudo apt-get install gfortran
sudo apt-get install libbz2-dev
sudo apt-get install libblas-dev liblapack-dev
sudo apt-get install libfftw3-dev
sudo apt-get install clang
sudo apt-get install cmake-data cmake
- name: Install cpptraj dependencies
run: |
curl -OL https://github.com/Unidata/netcdf-c/archive/refs/tags/v4.9.2.tar.gz
tar -zxf v4.9.2.tar.gz
cd netcdf-c-4.9.2
./configure --disable-byterange --disable-libxml2 --disable-netcdf-4 --disable-dap --disable-doxygen --prefix=$HOME
make -j2
make install
cd ..
export PATH=$HOME/bin:$PATH
- name: Install cpptraj
run: |
git clone https://github.com/Amber-MD/cpptraj
cd cpptraj
export CPPTRAJHOME=`pwd`
yes | ./configure -shared -openmp gnu
make libcpptraj
cd ../
- name: Install pytraj
run: |
which python3
python3 setup.py install
- name: Test with pytest
run: |
export CPPTRAJHOME=`pwd`/cpptraj && cd tests && pytest -vs --ignore=test_parallel_pmap --ignore=test_run_mpi.py --ignore=test_energy/test_pmap_sander.py --ignore=test_parallel_mpi --ignore=test_actionlist.py