Enable GHA #89
Workflow file for this run
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
name: Python Package using Conda | |
on: [push, pull_request] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup Conda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: forte | |
environment-file: environment.yml | |
show-channel-urls: true | |
python-version: '3.10' | |
auto-activate-base: false | |
miniforge-variant: Mambaforge | |
use-mamba: true | |
add-pip-as-python-dependency: true | |
channels: conda-forge | |
- name: Install ambit | |
run: | | |
conda info | |
conda list | |
cd $HOME | |
git clone https://github.com/jturney/ambit.git | |
cd ambit | |
cmake -H. -Bobjdir -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/bin/ambit | |
cd objdir | |
make -j2 | |
make install | |
- name: Compile psi4 | |
run: | | |
# export LD_LIBRARY_PATH=/home/runner/miniconda3/envs/forte/x86_64-conda-linux-gnu/lib:$LD_LIBRARY_PATH | |
cd $HOME | |
git clone https://github.com/psi4/psi4.git | |
cd psi4 | |
git pull origin master --tags | |
git fetch origin "refs/tags/*:refs/tags/*" | |
cmake -H. -Bobjdir -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$HOME/psi4bin -DENABLE_ecpint=ON | |
cd objdir | |
make -j2 | |
# make install | |
- name: Compile forte | |
run: | | |
export PYTHONPATH=$PYTHONPATH:$HOME/psi4/objdir/stage/lib | |
export AMBITPATH=$HOME/bin/ambit | |
export PATH=$PATH:$HOME/psi4/objdir/stage/bin | |
cd $HOME/work/forte/forte | |
python setup.py develop | |
pip list | |
# cmake_psi4=$(psi4 --plugin-compile) | |
# $cmake_psi4 --debug-output \ | |
# -Dambit_DIR=$HOME/bin/ambit/share/cmake/ambit/ \ | |
# -DENABLE_ForteTests=TRUE \ | |
# make -j2 | |
- name: Run forte tests | |
run: | | |
export PYTHONPATH=$PYTHONPATH:$HOME/psi4/objdir/stage/lib | |
export PATH=$PATH:$HOME/psi4/objdir/stage/bin | |
cd $HOME/work/forte/forte/tests/methods | |
python run_forte_tests.py --failed_dump --bw |