-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel G. A. Smith
committed
Nov 14, 2019
1 parent
f6c4dc9
commit 2451462
Showing
3 changed files
with
135 additions
and
44 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
jobs: | ||
# Configure, build, install, and test job | ||
- job: 'linux_build' | ||
displayName: 'Linux Builds' | ||
pool: | ||
vmImage: 'ubuntu-16.04' | ||
timeoutInMinutes: 120 | ||
variables: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
strategy: | ||
maxParallel: 8 | ||
matrix: | ||
gcc_build: | ||
CXX_COMPILER: 'g++' | ||
PYTHON_VER: '3.7' | ||
C_COMPILER: 'gcc' | ||
F_COMPILER: 'gfortran' | ||
BUILD_TYPE: 'release' | ||
|
||
steps: | ||
- bash: | | ||
uname -a | ||
free -m | ||
df -h | ||
ulimit -a | ||
displayName: "Hardware Information" | ||
- bash: | | ||
sudo apt-get update | ||
sudo apt-get install gfortran | ||
displayName: "Install gFortran" | ||
- bash: | | ||
echo "##vso[task.prependpath]$CONDA/bin" | ||
conda config --set always_yes yes | ||
displayName: "Add conda to PATH" | ||
- bash: | | ||
conda create -q -n p4env python=$PYTHON_VER psi4 --only-deps -c psi4/label/dev | ||
source activate p4env | ||
which python | ||
conda install \ | ||
dftd3 \ | ||
gcp \ | ||
resp \ | ||
pycppe \ | ||
pylibefp \ | ||
snsmp2 \ | ||
mp2d \ | ||
pytest-xdist \ | ||
-c psi4/label/dev | ||
conda install \ | ||
blas=*=mkl \ | ||
mkl-include \ | ||
qcelemental \ | ||
qcengine \ | ||
pybind11 \ | ||
-c conda-forge | ||
conda list | ||
displayName: 'Build Environment' | ||
- bash: | | ||
source activate p4env | ||
python -V | ||
python -c 'import numpy; print(numpy.version.version)' | ||
export CXX=${CXX_COMPILER} | ||
export CC=${C_COMPILER} | ||
export FC=${F_COMPILER} | ||
${CXX_COMPILER} --version | ||
${F_COMPILER} --version | ||
${C_COMPILER} --version | ||
# * can't use conda dist of the more complicated lib pkgs (e.g., CheMPS2, PCMSolver, v2rdm) | ||
# b/c their c++ symbols don't mix with the different Travis compilers. for other | ||
# reasons, pkgs are being compiled less statically, sad for CI. | ||
# * can't enable trivial plugins b/c no psi4 for them to detect at start (e.g., snsmp2) | ||
cmake -Bbuild -H. \ | ||
-DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ | ||
-DCMAKE_C_COMPILER=${C_COMPILER} \ | ||
-DCMAKE_Fortran_COMPILER=${F_COMPILER} \ | ||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | ||
-DCMAKE_PREFIX_PATH=${CONDA}/envs/p4env \ | ||
-DPYTHON_EXECUTABLE="${CONDA}/envs/p4env/bin/python" \ | ||
-DENABLE_CheMPS2=OFF \ | ||
-DENABLE_dkh=ON \ | ||
-DENABLE_libefp=ON \ | ||
-DENABLE_erd=OFF \ | ||
-DENABLE_gdma=ON \ | ||
-DENABLE_PCMSolver=OFF \ | ||
-DENABLE_simint=ON \ | ||
-DENABLE_snsmp2=OFF \ | ||
-DENABLE_v2rdm_casscf=OFF \ | ||
-DENABLE_PLUGIN_TESTING=ON \ | ||
-DCMAKE_INSTALL_PREFIX=$(Agent.BuildDirectory)/Install | ||
displayName: 'Configure Build' | ||
- bash: | | ||
cd build | ||
../.scripts/travis_build.sh | ||
displayName: 'Build Psi4' | ||
- bash: | | ||
./stage/bin/psi4 ../tests/tu1-h2o-energy/input.dat | ||
displayName: 'Spot Test' | ||
- bash: | | ||
python ../.scripts/travis_run_test.py | ||
python ../.scripts/travis_print_failing.py | ||
displayName: 'CTest Tests' | ||
- bash: | | ||
PYTHONPATH=stage/lib/ pytest -v -rws --durations=15 -n 2 -m 'quick' stage/lib/psi4/tests/ | ||
displayName: 'PyTest Tests' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,32 @@ | ||
set -eu -o pipefail | ||
|
||
# Temporarily change directory to $HOME to install software | ||
pushd . | ||
cd "$HOME" | ||
cd $HOME | ||
|
||
# Install Miniconda | ||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
# Make OSX md5 mimic md5sum from linux, alias does not work | ||
md5sum () { | ||
command md5 -r "$@" | ||
} | ||
MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh | ||
else | ||
MINICONDA=Miniconda3-latest-Linux-x86_64.sh | ||
fi | ||
#if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
# # Make OSX md5 mimic md5sum from linux, alias does not work | ||
# md5sum () { | ||
# command md5 -r "$@" | ||
# } | ||
# MINICONDA=Miniconda3-latest-MacOSX-x86_64.sh | ||
#else | ||
MINICONDA=Miniconda3-latest-Linux-x86_64.sh | ||
#fi | ||
MINICONDA_HOME=$HOME/miniconda | ||
MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p') | ||
wget -q https://repo.continuum.io/miniconda/$MINICONDA | ||
if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then | ||
echo "Miniconda MD5 mismatch" | ||
exit 1 | ||
fi | ||
bash $MINICONDA -b -p $MINICONDA_HOME | ||
|
||
echo "-- Installing latest Miniconda" | ||
if [ -d "$MINICONDA_HOME/bin" ]; then | ||
echo "-- Miniconda latest version FOUND in cache" | ||
|
||
# Config settings are not saved in the cache | ||
export PIP_ARGS="-U" | ||
export PATH=$MINICONDA_HOME/bin:$PATH | ||
|
||
conda config --set always_yes yes --set changeps1 no | ||
else | ||
MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p') | ||
echo "-- Miniconda latest version NOT FOUND in cache" | ||
wget -q https://repo.continuum.io/miniconda/$MINICONDA | ||
if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then | ||
echo "Miniconda MD5 mismatch" | ||
exit 1 | ||
fi | ||
# Travis creates the cached directories for us. | ||
# This is problematic when wanting to install Anaconda for the first time... | ||
rm -rf "$MINICONDA_HOME" | ||
bash $MINICONDA -b -p "$MINICONDA_HOME" | ||
|
||
# Configure miniconda | ||
export PIP_ARGS="-U" | ||
export PATH=$MINICONDA_HOME/bin:$PATH | ||
|
||
conda config --set always_yes yes --set changeps1 no | ||
conda update --q conda | ||
# Configure miniconda | ||
export PIP_ARGS="-U" | ||
export PATH=$MINICONDA_HOME/bin:$PATH | ||
|
||
rm -f $MINICONDA | ||
fi | ||
echo "-- Done with latest Miniconda" | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update --q conda | ||
|
||
# Restore original directory | ||
popd |