Skip to content

Commit

Permalink
Python bindings CI
Browse files Browse the repository at this point in the history
  • Loading branch information
asadchev committed May 4, 2022
1 parent 6dd4a79 commit d5ee24c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/cmake.yml
Expand Up @@ -29,6 +29,7 @@ jobs:
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_PREFIX_PATH=/usr/local/Cellar/eigen/3.3.9;/usr/local/opt/bison
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DMPIEXEC_PREFLAGS='--bind-to;none;--allow-run-as-root'
-DENABLE_FORTRAN=ON
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/library/install
Expand Down Expand Up @@ -56,15 +57,15 @@ jobs:
- name: Install prerequisite MacOS packages
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.os == 'macos-latest' }}
run: |
brew install ninja gcc@10 boost eigen bison ccache automake
brew install ninja gcc@10 boost eigen bison ccache automake python3 numpy scipy
echo "FC=/usr/local/bin/gfortran-10" >> $GITHUB_ENV
echo "EIGEN3_INCLUDE_DIR=/usr/local/include/eigen3" >> $GITHUB_ENV
- name: Install prerequisites Ubuntu packages
if: ${{ steps.skip_check.outputs.should_skip != 'true' && matrix.os == 'ubuntu-20.04' }}
run: |
sudo apt-get update
sudo apt-get install ninja-build g++-9 gfortran-9 liblapack-dev libboost-dev libeigen3-dev ccache
sudo apt-get install ninja-build g++-9 gfortran-9 liblapack-dev libboost-dev libeigen3-dev ccache python3-numpy python3-scipy
echo "FC=/usr/bin/gfortran-9" >> $GITHUB_ENV
echo "EIGEN3_INCLUDE_DIR=/usr/include/eigen3" >> $GITHUB_ENV
Expand Down Expand Up @@ -112,7 +113,7 @@ jobs:
tar -xzf ../compiler/libint-2*.tgz
cd libint-2*
echo "LIBINT_EXPORTED_DIR=`pwd`" >> $GITHUB_ENV
cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG
cmake -S . -B build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPYTHON_EXECUTABLE=`which python3` $BUILD_CONFIG
cmake --build build --target check
cmake --build build --target install
Expand All @@ -132,3 +133,16 @@ jobs:
cmake . -DCMAKE_PREFIX_PATH=${{github.workspace}}/build/library/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE
cmake --build . --target hf++
./hf++ $LIBINT_EXPORTED_DIR/tests/hartree-fock/h2o_rotated.xyz | python $LIBINT_EXPORTED_DIR/tests/hartree-fock/hartree-fock++-validate.py $LIBINT_EXPORTED_DIR/MakeVars.features
- name: Build Python bindings
if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
shell: bash
working-directory: ${{github.workspace}}/build/library
run: |
cd libint-2*
cd build
cmake . -DLIBINT2_PYTHON=ON
cmake --build . --target libint2-python
cmake --build . --target libint2-python-test

0 comments on commit d5ee24c

Please sign in to comment.