Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,42 +131,47 @@ jobs:
steps:
- 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
- uses: actions/checkout@v4
- name: Set up Python 3.10
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install conda packages
run: |
which conda
conda install conda=24.11.0 python=3.10
conda install conda python=3.12
conda --version
conda env update --file devtools/ci/environment.yml --name base
- name: Install cpptraj
run: |
export PATH=$HOME/bin:${PATH}
export LD_LIBRARY_PATH=$HOME/lib:${LD_LIBRARY_PATH}
export PATH=$CONDA/bin:${PATH}
export LD_LIBRARY_PATH=$CONDA/lib:${LD_LIBRARY_PATH}
echo $PATH
echo $LD_LIBRARY_PATH
ls $CONDA/lib
export MAKE_COMMAND="make -j2"
./configure --buildlibs -openmp -shared gnu
./configure --buildlibs -openmp -shared --with-zlib=$CONDA --with-bzlib=$CONDA --with-hdf5=$CONDA --with-netcdf=$CONDA --with-fftw3=$CONDA gnu
source cpptraj.sh
make -j2 libcpptraj
- name: Install pytraj
run: |
git clone https://github.com/Amber-MD/pytraj.git
export PATH=$CONDA/bin:${PATH}
export LD_LIBRARY_PATH=$CONDA/lib:${LD_LIBRARY_PATH}
source cpptraj.sh
cd pytraj
python setup.py install
cd ..
- name: Test with pytest
run: |
export PATH=$CONDA/bin:${PATH}
export LD_LIBRARY_PATH=$CONDA/lib:${LD_LIBRARY_PATH}
source cpptraj.sh && cd pytraj/tests && pytest -vs --ignore=test_parallel_pmap
12 changes: 9 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ BZIP2_SRCDIR=''
BZIP2_URL="https://www.sourceware.org/pub/bzip2/$BZIP2_SRCTAR"
BZIP2_OPTS=''

ZLIB_SRCTAR='zlib-1.2.11.tar.gz'
ZLIB_SRCDIR='zlib-1.2.11'
ZLIB_SRCTAR='zlib-1.3.1.tar.gz'
ZLIB_SRCDIR='zlib-1.3.1'
ZLIB_URL="https://zlib.net/$ZLIB_SRCTAR"
ZLIB_OPTS=''

Expand Down Expand Up @@ -719,9 +719,15 @@ EOF
TestProgram $BUILDTESTOPT " Checking for bundled HDF5" "$CXX" "$CXXFLAGS ${LIB_INCL[$LHDF5]}" testp.cpp "${LIB_FLAG[$LHDF5]}"
if [ $? -ne 0 ] ; then
CheckRebuild "HDF5" "${LIB_FLAG[$LHDF5]}"
# If zlib was specified, pass that to hdf5
if [ "${LIB_STAT[$LZIP]}" = 'specified' ] ; then
hdf5zlib="--with-zlib=${LIB_HOME[$LZIP]}"
else
hdf5zlib=''
fi
# See if user would like to get HDF5
PREFIX=$CPPTRAJHOME CC=$CC CFLAGS=$CFLAGS LIBNAME='hdf5' \
SRCDIR=$HDF5_SRCDIR SRCTAR=$HDF5_SRCTAR URL=$HDF5_URL ./get_library.sh $REBUILDOPT $HDF5_OPTS
SRCDIR=$HDF5_SRCDIR SRCTAR=$HDF5_SRCTAR URL=$HDF5_URL ./get_library.sh $REBUILDOPT $HDF5_OPTS $hdf5zlib
if [ $? -ne 0 ] ; then
ErrMsg "No HDF5 available. To build without HDF5 specify '-nohdf5'."
exit 1
Expand Down
7 changes: 6 additions & 1 deletion devtools/ci/environment.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
channels:
- conda-forge
dependencies:
- python=3.10
- python=3.12
- pyflakes
- numpy=2.0.0
- cython=0.29.36
- setuptools
- pytest
- mock
- curl
- gcc_linux-64
- gxx_linux-64
- gfortran_linux-64
- netcdf4
- fftw
2 changes: 1 addition & 1 deletion get_library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ if [ -z "$MAKE_COMMAND" ] ; then
elif [ $NPROC -le 2 ] ; then
MAKE_COMMAND='make'
else
HALF=`echo "$NPROC / 2" | bc`
((HALF = $NPROC / 2))
MAKE_COMMAND="make -j$HALF"
fi
echo " MAKE_COMMAND is not set; set to '$MAKE_COMMAND'"
Expand Down