Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nsoblath/issue 198 #199

Draft
wants to merge 280 commits into
base: master_unused_delete_me_March_2022
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
280 commits
Select commit Hold shift + click to select a range
7e4f4ac
Trying to fix the use of vcpkg-installed packages
Sep 25, 2021
a1f37e4
Problem with splitting command on multiple lines
Sep 25, 2021
1a401ed
Again with the multiline thing
Sep 25, 2021
a337e19
Reverting previous change
Sep 25, 2021
6a97d67
Switch Windows build to 32-bit (x86). Use FETK v1.8.0
Sep 27, 2021
0273d22
Switch back to main branch for FETK
Sep 28, 2021
8c3f5bf
Put FETK variables in one place and fix typo
Sep 28, 2021
3050ea8
Remove trace expand for easier debugging. Change build logic to get d…
Sep 29, 2021
770988a
Install FETK after build, and minor cleanup
Sep 29, 2021
7a2fec3
Update cmake args for geoflow
Sep 29, 2021
7e7e85f
Add tmate session for potential debugging
Sep 29, 2021
42e7fc8
Reverting a change
Sep 29, 2021
c03d054
Hopefully fixing cmake commands for geoflow, pbam, and pbsam under wi…
Sep 29, 2021
8ab4de1
Expect same libraries now in Windows
Sep 30, 2021
a28561b
Dev branch of geoflow and attempt to build as a subdirectory
Sep 30, 2021
60ba2e0
Geoflow updates
Sep 30, 2021
4622f2e
Set Geoflow-enabling option
Sep 30, 2021
780d2e4
Turn off within-build submodule update
Sep 30, 2021
c1de9c8
Attempting to deal with the installed name of the umfpack library
Oct 1, 2021
7d8fba5
Adapt to different blas libraries in windows vs linux/mac
Oct 1, 2021
1b743f6
Try out switching FETK build/installation to using ExternalProject
Oct 1, 2021
9b7eaea
Don't need to specify platform or architecture in the external projec…
Oct 1, 2021
4695638
Sorting out source directories
Oct 1, 2021
f3ee053
Specify all the necessary directories, and do it better this time
Oct 1, 2021
72efe62
Trying to fix the binary directory
Oct 1, 2021
2f2f66e
Another attempt to fix the external project directories
Oct 1, 2021
2137263
Correctly set the FETK_INSTALL_PREFIX
Oct 1, 2021
a313330
Include the toolchain file if it's defined
Oct 1, 2021
63778b4
Some debugging for the windows build.
Oct 1, 2021
b0003db
Add FindUMFPACK.cmake and use it
Oct 2, 2021
dea1570
Don't specify BLAS vendor for maximum flexibility
Oct 4, 2021
09d2a8b
Explicitly search for libumfpack because Windows
Oct 4, 2021
ed3360a
Cleaning up the main CMakeLists.txt file
Oct 4, 2021
d96df7a
Removing fetk submodule
Oct 4, 2021
6fad974
Cache repo version is now v0.4.0
Oct 4, 2021
b964e72
Recursive checkout instead of checkout then submodule update in build…
Oct 4, 2021
9de88c3
Doc updates for FETK now being available in Windows
Oct 4, 2021
8c1088e
Re-enable the mac build to see if we can get that working
Oct 4, 2021
5e0bf75
Trying to clean up the linux and mac dependencies
Oct 4, 2021
49585a3
Updated but development commit for pb_sovers
Oct 5, 2021
b167fd5
pb_solvers update
Oct 5, 2021
8067083
Sorting out the PBAM/PBSAM build
Oct 5, 2021
4ece104
pb_s_am update
Oct 7, 2021
5fd1826
Switch FETK install from ExternalProject to FetchContent. So far ful…
Oct 7, 2021
ea1fc7e
Configure test builds to look at Geoflow, PBAM, and PBSAM builds
Oct 7, 2021
b978b94
Updating pb_solvers
Oct 7, 2021
7dc09fa
Adding some dependencies to reduce build times in linux and mac
Oct 7, 2021
86c5476
CMake cleanup
Oct 7, 2021
535d0cd
Breakout testing and packaging into workflow steps
Oct 7, 2021
c708a6f
Debugging artifact building
Oct 8, 2021
1f8fc24
Integrate BEM build (BEM wrap code now built in APBS). Turn on BEM b…
Oct 8, 2021
e1e369b
Testing a parallel build
Oct 8, 2021
7de3d26
Start switch to FetchContent from git submodules
Oct 9, 2021
bc7bf47
Remove submodule bem
Oct 9, 2021
65c71d1
Remove submodule geoflow_c
Oct 9, 2021
83585c6
Remove submodule pb_s_am
Oct 9, 2021
36cf863
Switching from the submodule build to the FetchContent build for depe…
Oct 9, 2021
eddda05
Comment out tmate session
Oct 9, 2021
f2fd93f
Add a Dockerfile for testing
Oct 13, 2021
014bba0
Switch to FETK 1.8.1 and cleanup of FETK build
Oct 13, 2021
b98c2e0
New versions of geoflow and pb_solvers for testing
Oct 13, 2021
ba53207
Simplified Dockerfile
Oct 13, 2021
80f1d76
Fixing a bug for getting FETK in windows
Oct 13, 2021
4ae0dd3
A little more cleanup
Oct 13, 2021
0977e86
Update Geoflow git tag for new release
Oct 13, 2021
cd50c0d
Test building static libs
Oct 13, 2021
c7ec31c
Update pb_solvers commit to most recent release
Oct 22, 2021
8b1e526
Update to the latest release of pb_solvers
Oct 29, 2021
c76ee8f
Separate configure/build stage for linux and mac
Oct 29, 2021
131913b
Update the build script
Oct 29, 2021
1d9eaba
Update .build.sh
Oct 30, 2021
a3d0815
Add libopenblas-dev to the linux dependencies
Nov 1, 2021
66dc4c3
Add tmate session to debug windows packing issue
Nov 1, 2021
559aac3
Debugging the windows packaging failure
Nov 1, 2021
1504c15
Maybe it's a shell problem?
Nov 1, 2021
e99e51f
A little more debugging of the windows cpack failure
Nov 2, 2021
e812598
Separate package creation for windows to get around the cmake/chocola…
Nov 2, 2021
4fd641c
Best if I use the proper syntax . . .
Nov 2, 2021
109ecb2
Typo fix
Nov 2, 2021
0bf0753
Remove debugging modifications
Nov 2, 2021
ffac190
Cleanup of the build workflow
Nov 2, 2021
cdc84cc
Merge branch 'master' into nsoblath/issue_163
Nov 2, 2021
424e355
Removing AppVeyor build and badge (Windows build is now done in GitHu…
Nov 2, 2021
d412937
Update .build.sh
Nov 3, 2021
6ccbee0
Update index.rst
Nov 3, 2021
832bfe3
Use software-properties-common to get python3 in the Dockerfile
Nov 4, 2021
993234e
Change directory into build before running tests
Nov 4, 2021
e2c7867
Tests don't need to be their own project
Nov 4, 2021
b8cad75
Merge branch 'nsoblath/issue_163' of github.com:Electrostatics/apbs i…
Nov 4, 2021
056c7f3
Turning off testing and building in the build script for GHA test pur…
Nov 4, 2021
d73a60d
Check that the geoflow tests are working with this dev branch of geoflow
Nov 4, 2021
49114a8
Updated to released version of Geoflow
Nov 4, 2021
0e2b5af
First attempt at a test job
Nov 4, 2021
f4a6da8
Added required dependencies for apbs linkages
Nov 4, 2021
43b839f
Fix directory
Nov 5, 2021
c063092
Fixing the path to the downloaded artifacts
nsoblath Nov 5, 2021
687d24e
Testing for mac and windows requirements
Nov 5, 2021
f9c5dab
Syntax fix
Nov 5, 2021
3a1ee46
Mod to check mac prereqs; note about windows prereqs
Nov 5, 2021
492363f
(temporarily) remove some slow tests
Nov 5, 2021
8733938
Add mac prereqs for test job
Nov 5, 2021
f562c9f
Add component specification to all install lines and use to control t…
Nov 6, 2021
5bb5d5c
Add tmate back in for now
Nov 6, 2021
c9b61f9
Enable the build of iAPBS, with a few changes to how it's done to mak…
Nov 29, 2021
21c702d
Minor logic fix
Nov 10, 2021
44c72c0
Removed the include/Eigen directory. It seemed to be confusing the W…
Nov 11, 2021
7e7b123
APBS needs to know where Eigen3 is
Nov 29, 2021
8152c80
Geoflow updated to deconflict class name with FETK/mc. Build of Geof…
Nov 10, 2021
29cc61b
Updating Geoflow to the new release
Nov 11, 2021
2c28407
Move configure_file for apbscfg.h down in the CMakeLists.txt so that …
Nov 30, 2021
5da0464
Enable tmate session in windows to check linking for a successful win…
Nov 30, 2021
408e1e9
Potential fix to incorrect arguments in calls to preRefineFE and post…
Nov 30, 2021
f37095d
tmate session on test job failure
Nov 30, 2021
6665764
Temporarily include headers and libraries in the zip file
Nov 30, 2021
0647c53
Remove hardcoded apbscfg.h and maloccf.h
Nov 30, 2021
63a1e58
Add windows dependencies to the test run
Nov 17, 2021
d32d021
echo the PATH variable so we can check to see if the vcpkg libraries …
Dec 1, 2021
fd23f8d
Add the vcpkg bin directory to the path
Dec 1, 2021
2d68aec
Use variable ENABLE_FETK instead of FETK_ENABLED to control building …
Nov 10, 2021
30f53a7
Renaming some build variables, per some TODOs in apbscfg.h.in
Dec 1, 2021
4008a08
Switch use tests to using run_selected_tests.sh
Dec 1, 2021
a03c283
Forgot to include the script to run
Dec 1, 2021
98afe85
Fix permissions for the examples scripts by using the USE_SOURCE_PERM…
Dec 1, 2021
c87ec77
Added CHANGELOG.md and .extract_section.sh script (copied from FETK i…
Dec 1, 2021
0f234da
Add release.yaml and release artifacts (copied implementation from FETK)
Dec 1, 2021
5fdefcb
Update version to 3.3.0.alpha
Dec 1, 2021
4f0b9b7
Fix variable for tag name
Dec 1, 2021
bdd5e60
Move release of artifacts to a separate job
Dec 1, 2021
f82474a
Was missing the step id
Dec 1, 2021
457859f
Also had the wrong id here
Dec 1, 2021
720f672
Oy, hopefully the last thing I missed
Dec 1, 2021
a1bf8e6
Fixing the logic of having a separate publish release job
Dec 1, 2021
e74f28b
Reworking how the package filenames are handled
Dec 2, 2021
4211bad
Trigger a new build
Dec 2, 2021
422eb52
Attempting fix to issue with retrieving and storing the zip file name
Dec 2, 2021
9bf5ea1
Use expression instead of shell expansion
Dec 2, 2021
a6a4aaf
Workflow cleanup
Dec 2, 2021
8891311
Back-filling the changelog's previous entries from the GitHub Releases
Dec 2, 2021
f8556bd
Git tags are prepended with a v
Dec 2, 2021
03eaf45
Consolidating cmake settings
Dec 4, 2021
3e3d737
Turn PYGBE on, and a couple of associated fixes
Dec 6, 2021
53f5adf
Stripping out Tinker support
Dec 6, 2021
6d28fea
Enable debugging in workflows
Dec 6, 2021
d52bf91
Add python3 to mac and linux dependencies
Dec 7, 2021
5196151
Shouldn't need `vcpkg integrate install` in the use test
Dec 7, 2021
a79fc36
Need the python library in linux
Dec 7, 2021
3f06e61
Update .extract_section.sh to handle the rst file releases.rst
Dec 7, 2021
c03c3f9
Test conversion of release rst to md
Dec 7, 2021
094aaaa
Oops, docker actions are linux only
Dec 7, 2021
bfaccbc
One more linux-only restriction
Dec 7, 2021
1c47477
Build directory and install directory check for already-set values in…
Dec 7, 2021
6f4c1e6
Do initial work to accommodate building the NSIS file
Dec 7, 2021
8f59483
Fixing typos from the last commit
Dec 7, 2021
27498d1
Actually process and attempt to use the NSIS file
Dec 7, 2021
1456c1b
Separate NSIS build into a separate step to see what's causing the jo…
Dec 7, 2021
7327dc0
Fixing step id
Dec 7, 2021
78ebc9a
Move release extraction to release.yaml and use setup-python@v2 for p…
Dec 8, 2021
4a69ade
Setup to do a little debugging
Dec 8, 2021
34d32b1
Removing the use of git submodule updating in the build
Dec 8, 2021
9303bba
Remove NSIS use test for now
Dec 8, 2021
7541261
Removing the use of NSIS packaging
Dec 9, 2021
fdbb20e
Setup a tmate session for container testing
Dec 9, 2021
4c86a89
Do a test of running a windows container
Dec 10, 2021
3d3bdd7
Another container test
Dec 10, 2021
f7be193
One more docker container attempt
Dec 10, 2021
62ba7fd
Some documentation updates
Dec 10, 2021
eeb28be
Return to the regular build
Dec 10, 2021
998593f
Copying in dependency libraries
Dec 10, 2021
8a0c105
Fixing a library name
Dec 10, 2021
33da74f
Option for a fully static build (does not work when OpenMP is used)
Dec 10, 2021
a6e3fe5
Try out a fully static build without OpenMP
Dec 10, 2021
2563fbf
Working on diagnosing static build
Dec 10, 2021
71db108
Two bug fixes
Dec 11, 2021
5bd7801
Using a test version of FETK to try a static build
Dec 15, 2021
fb2b519
YAML fix
Dec 15, 2021
4492b46
Not sure why it's behaving as if a git hash matches a version tag, bu…
Dec 15, 2021
9cb9878
Compile flag needed for linux, at least
Dec 15, 2021
51130c5
Modifying dependencies that are installed
Dec 15, 2021
f09611e
Updated pb_solvers for testing the use of the pbsolvers namespace; Fi…
Dec 16, 2021
90de6ab
Try removing specification of compiler
Dec 16, 2021
031ce52
Update pb_solvers for wrapping fixes
Dec 16, 2021
11aaccd
Enable tmate on failure
Dec 16, 2021
373a1d6
Another pb_solvers update
Dec 16, 2021
be18822
Remove openmp; I think it's screwing up finding OpenBLAS on Ubuntu
Dec 16, 2021
eaeee9a
Missing headers were causing a problem on macos
Dec 16, 2021
d904d5b
Let's see if using libopenblas-serial-dev fixes the finding-openblas …
Dec 16, 2021
0c158af
Avoid some cmake warnings and use an updated pb_solvers
Dec 16, 2021
dad8021
Maybe the final fix to have things working? Updating pb_solvers.
Dec 16, 2021
a37f2e5
New version of FETK
Dec 17, 2021
9d17cdd
Including some dependencies
Dec 17, 2021
60dfbdb
Added finding AMD
Dec 17, 2021
37f27f8
git-ignore all directories that start with build
Dec 20, 2021
2b9312b
FETK is now treated as a required dependency, much earlier in the build
Dec 20, 2021
4a0690d
These find modules are now handled by FETK
Dec 20, 2021
87d3adb
Updating how dependencies are searched for and handled
Dec 20, 2021
2458503
Use GNU standard install directories
Dec 20, 2021
af8a8e4
Getting things in the right order
Dec 21, 2021
abc1f2a
Remove the use of EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH
Dec 21, 2021
5b3744b
I think we deleted nanoshaper when we cleared the temp directory, so …
Dec 21, 2021
4abe905
Install metis manually on mac and linux to get static libs
Dec 21, 2021
4f916c2
Separate tar and gunzip calls
Dec 21, 2021
379f872
Sudo make install on linux
Dec 21, 2021
ec4f2ae
Fixing the TABIPB library install location and NanoShaper duplicate i…
Dec 21, 2021
d0e28b1
Adding Python for linux
Dec 21, 2021
d1a5c91
Add a global static-build option and set the MSVC runtime library var…
Dec 21, 2021
fa815c9
Run tmate for windows to check linking
Dec 21, 2021
da4d967
Some anticipation of the types of jobs that will be run
Dec 21, 2021
09f3300
Adapt to changes in FETK
Dec 21, 2021
72e2cca
Update FETK hash
Dec 21, 2021
e713a32
Remove extra line and print umfpack libraries
Dec 21, 2021
5b0185b
Verbose build, for now
Dec 21, 2021
05be591
Debugging messages
Dec 21, 2021
6c920a5
Update FETK
Dec 21, 2021
b8d42b0
Need libumfpack for the windows use tests. And use tmate if the buil…
Dec 22, 2021
1d621e8
Remove the link search variables
Dec 22, 2021
b616c51
Enable PYGBE in Windows and add Python to use tests in all builds
Dec 22, 2021
3e8b685
Fix copying of dlls into the Windows zip package
Dec 22, 2021
d08141e
Attempt at providing a windows equivalent of the use of dirname in ma…
Dec 22, 2021
a1d643d
Typo
Dec 22, 2021
43d929d
We shouldn't need the installed prereqs in Windows (libraries should …
Dec 22, 2021
70cffd2
Need to get rid of the extension
Dec 22, 2021
4e0f6ea
Use 7z instead of zip/unzip
Dec 22, 2021
89b700f
Fixing the path to the package
Dec 23, 2021
df7c8aa
Need to specify the python version to CMake
Dec 23, 2021
6ddced8
Min and max python versions
Dec 23, 2021
b7d0fa3
Treat version numbers as strings until they're into CMake
Dec 23, 2021
c7e7466
Fix python version variable
Dec 23, 2021
7290e59
Add ldd step for debugging windows use test
Dec 24, 2021
b0152c8
Let's see if it's just Python/PYGBE causing problems on the windows b…
Dec 24, 2021
2c7d4d2
Let's see if it's the python linking or the PYGBE-enabled code is cau…
Dec 24, 2021
faca16a
Fixing the declaration of mol_dirname for the Windows build and re-en…
Dec 31, 2021
7cb7648
Some documentation updates
Dec 31, 2021
a38f28e
Try including PYGBE without doing _splitpath
Dec 31, 2021
507b161
Get tmate in windows after build
Jan 1, 2022
c6bb2b3
Specify Python architecture
Jan 1, 2022
7689ddc
Revert tmate to on failure after build
Jan 1, 2022
19207e1
[skip ci]
Jan 2, 2022
99ad438
Retesting with all selected examples enabled
Jan 2, 2022
5c431bf
Remove examples that fail
Jan 2, 2022
de954f2
Added comments on CMake policy choices
Jan 3, 2022
76fe1b6
New FETK version
Jan 3, 2022
2083997
Cleanup
Jan 3, 2022
91de12f
Re-enable examples to check current status
Jan 3, 2022
5cb0b67
[skip ci] Updated current status of examples in run_selected_examples…
Jan 3, 2022
10bca7e
Add metis build to the Dockerfile
Jan 4, 2022
b997cf6
Update FETK version in the Dockerfile
Jan 4, 2022
57fea74
Replace pbsam-auto with pbsam in a couple of examples
Jan 4, 2022
93a6079
Updated run_selected_examples.sh with gdb bt of geoflow/glycerol.in e…
Jan 4, 2022
d53af54
[skip ci] Updated releases.rst
Jan 4, 2022
872a956
Comment out non-running examples
Jan 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
178 changes: 106 additions & 72 deletions .build.sh
Original file line number Diff line number Diff line change
@@ -1,60 +1,92 @@
#!/bin/bash

# echo "==================================== WHICH GCC ==================================== "
# which gcc
# ls /usr/local/bin/gcc*
echo "==================================== WHICH GCC ==================================== "
ostype="$(uname -s)"
case "${ostype}" in
# NOTE: clang on Github Actions cannot fine Accelerate Framework
# so you will get errors about not being able to find xerbla_
# Darwin*) export CC=clang; export CXX=clang++;;
Darwin*) export CC=gcc-9; export CXX=g++-9;;
Linux*) export CC=gcc-9; export CXX=g++-9;;
esac

export CMAKE_C_COMPILER=$CC
export CMAKE_CXX_COMPILER=$CXX
export CMAKE_C_LINK_EXECUTABLE=$CC
export CMAKE_CXX_LINK_EXECUTABLE=$CXX


# Install prereqs with INSTALL_PREREQS=1 or turn off with INSTALL_PREREQS=0
export INSTALL_PREREQS=1

# Setup tests for APBS with TEST_APBS=1 or turn off with TEST_APBS=0
export TEST_APBS=0

# Create ZIP archive for APBS with PACKAGE_APBS=1 or turn off with PACKAGE_APBS=0
export PACKAGE_APBS=0

# Configure and Build pybind11 with BUILD_PYBIND=1 or turn off with BUILD_PYBIND=0
export BUILD_PYBIND=0

#echo "==================================== WHICH GCC ==================================== "
#ostype="$(uname -s)"
#case "${ostype}" in
# # NOTE: clang on Github Actions cannot fine Accelerate Framework
# # so you will get errors about not being able to find xerbla_
# # Darwin*) export CC=clang; export CXX=clang++;;
# Darwin*) export CC=gcc-9; export CXX=g++-9;;# export CMAKE_C_FLAGS="-Wl,-rpath=@executable_path/../lib "; export CMAKE_CXX_FLAGS="-Wl,-rpath=@executable_path/../lib ";;
# Linux*) export CC=gcc-9; export CXX=g++-9;;
#esac

#export CMAKE_C_COMPILER=$CC
#export CMAKE_CXX_COMPILER=$CXX
#export CMAKE_C_LINK_EXECUTABLE=$CC
#export CMAKE_CXX_LINK_EXECUTABLE=$CXX

export SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export COVERAGE="-g -O0 -fprofile-arcs -ftest-coverage"
export COVERAGE=""
export BUILD_DIR="$SRC_DIR/build"
export INSTALL_DIR=$HOME/apbs
: ${BUILD_DIR=$SRC_DIR/build}
: ${INSTALL_DIR=$HOME/apbs}
export PATH=$INSTALL_DIR:$PATH
export RELEASE_TYPE=Debug
export RELEASE_TYPE=Release

# set variables only if they're not already set
: ${RELEASE_TYPE:=Release}
: ${BLA_VENDOR:=OpenBLAS}
: ${BUILD_DOC:=ON}
: ${BUILD_SHARED_LIBS:=OFF}
: ${BUILD_TOOLS:=ON}
: ${RELEASE_TYPE:=Release}
: ${ENABLE_PYGBE:=ON}
: ${ENABLE_BEM:=ON}
: ${ENABLE_GEOFLOW:=ON}
: ${ENABLE_FETK:=ON}
: ${FETK_VERSION:="1.8.1"}
: ${ENABLE_iAPBS:=ON}
: ${ENABLE_OPENMP:=OFF}
: ${ENABLE_PBAM:=ON}
: ${ENABLE_PBSAM:=ON}
: ${ENABLE_PYTHON:=OFF}
: ${ENABLE_TESTS:=ON}
: ${GET_NanoShaper:=ON}
: ${PYTHON_MIN_VERSION:="3.9"}
: ${PYTHON_MAX_VERSION:="3.10"}

echo "==================================== WHERE AM I ==================================== "
pwd
echo "==================================== VERSIONS: ==================================== "
echo "==================================== PYTHON VERSION"
python -c "import sys; print(sys.version)"
echo "==================================== CMAKE VERSION"
cmake --version
echo "==================================== C Compiler VERSION"
$CMAKE_C_COMPILER --version
echo "==================================== C++ Compiler VERSION"
$CMAKE_CXX_COMPILER --version
#echo "==================================== C Compiler VERSION"
#$CMAKE_C_COMPILER --version
#echo "==================================== C++ Compiler VERSION"
#$CMAKE_CXX_COMPILER --version
echo "==================================== SWIG VERSION"
swig -version
echo "==================================== Install Python requirements ==================================== "
python -m pip install -U pip
python -m pip install -U pytest
python -m pip install -U virtualenv
python -m pip install -U numpy
python -m pip install -r requirements.txt

if [ "${BUILD_PYBIND}" -ne "0" ]; then
echo "==================================== Install Python requirements ==================================== "
python -m pip install -U pip
python -m pip install -U pytest
python -m pip install -U virtualenv
python -m pip install -U numpy
python -m pip install -r requirements.txt
fi

# Just build APBS for now
echo "==================================== PWD FOR TOP DIR ==================================== "
pwd
echo "==================================== Get External SubModules ==================================== "
git submodule init
git submodule update
git submodule sync
git ls-tree HEAD externals


echo "==================================== CLEAN =============================================== "
rm -rf $BUILD_DIR || exit 1
rm -rf $INSTALL_DIR || exit 1
Expand All @@ -64,58 +96,59 @@ echo "==================================== SETUP ENV ===========================
export LD_LIBRARY_PATH=$HOME/apbs/lib:${LD_LIBRARY_PATH}
export PATH=$HOME/apbs/bin:${PATH}

export TEST_APBS=1
export PACKAGE_APBS=1

# Build pybind11
export BUILD_PYBIND=0
if [ "${BUILD_PYBIND}" -ne "0" ]; then
echo "==================================== PYBIND =============================================== "
pushd $(pwd)/externals/pybind11
[ -d build ] || mkdir -p build
[ -d install ] || mkdir -p install
pushd build
cmake \
echo "==================================== PYBIND =============================================== "
pushd $(pwd)/externals/pybind11
[ -d build ] || mkdir -p build
[ -d install ] || mkdir -p install
pushd build
cmake \
-DDOWNLOAD_CATCH=ON \
-DPYBIND11_TEST=OFF \
-DCMAKE_INSTALL_PREFIX=$(python3 -c "import os,sys; print(os.path.realpath(sys.argv[1]))" ../install) \
..
make -j install
popd
export pybind11_DIR=$(python3 -c "import os,sys; print(os.path.realpath(sys.argv[1]))" ./install)
echo "pybind11_DIR=${pybind11_DIR}"
popd
make -j install
popd
export pybind11_DIR=$(python3 -c "import os,sys; print(os.path.realpath(sys.argv[1]))" ./install)
echo "pybind11_DIR=${pybind11_DIR}"
popd
fi

echo "==================================== CONFIG =============================================== "
cd $BUILD_DIR || exit 1
#cmake \
cmake -S .. -B $BUILD_DIR --trace-source=../CMakeLists.txt --trace-expand \
-DCMAKE_INSTALL_INCLUDEDIR="include" \
-DBUILD_DOC=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TOOLS=ON \
cmake -S .. -B $BUILD_DIR \
-DBLA_VENDOR=${BLA_VENDOR} \
-DBUILD_DOC=${BUILD_DOC} \
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} \
-DBUILD_TOOLS=${BUILD_TOOLS} \
-DCMAKE_C_FLAGS="${CMAKE_C_FLAGS} ${COVERAGE}" \
-DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS} ${COVERAGE}" \
-DCMAKE_BUILD_TYPE=$RELEASE_TYPE \
-DCMAKE_BUILD_TYPE=${RELEASE_TYPE} \
-DCMAKE_INSTALL_INCLUDEDIR="include" \
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR \
-DENABLE_PYGBE=ON \
-DENABLE_BEM=ON \
-DENABLE_GEOFLOW=ON \
-DENABLE_FETK=OFF \
-DENABLE_OPENMP=ON \
-DENABLE_PBAM=ON \
-DENABLE_PBSAM=ON \
-DENABLE_PYTHON=$BUILD_PYBIND \
-DENABLE_TESTS=ON \
-DENABLE_TINKER=OFF \
-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} \
-DENABLE_PYGBE=${ENABLE_PYGBE} \
-DENABLE_BEM=${ENABLE_BEM} \
-DENABLE_GEOFLOW=${ENABLE_GEOFLOW} \
-DENABLE_FETK=${ENABLE_FETK} \
-DENABLE_iAPBS=${ENABLE_iAPBS} \
-DENABLE_OPENMP=${ENABLE_OPENMP} \
-DENABLE_PBAM=${ENABLE_PBAM} \
-DENABLE_PBSAM=${ENABLE_PBSAM} \
-DENABLE_PYTHON=${ENABLE_PYBIND} \
-DENABLE_TESTS=${ENABLE_TESTS} \
-DFETK_VERSION="${FETK_VERSION}" \
-DPYTHON_MIN_VERSION="${PYTHON_MIN_VERSION}" \
-DPYTHON_MAX_VERSION="${PYTHON_MAX_VERSION}" \
.. || exit 1

echo "==================================== BUILD =============================================== "
VERBOSE=1 make -j 1 || exit 1
VERBOSE=1 make -j 1 install #|| exit 1
VERBOSE=1 make -j || exit 1
VERBOSE=1 make -j install #|| exit 1
export PATH="$INSTALL_DIR/bin:$PATH"


if [ "${TEST_APBS}" -ne "0" ]; then
# Run a single test if it fails using the following:
# echo "==================================== VERBOSE TEST ======================================= "
Expand All @@ -124,6 +157,7 @@ if [ "${TEST_APBS}" -ne "0" ]; then
ctest -C Release --output-on-failure #|| exit 1
fi


if [ "${PACKAGE_APBS}" -ne "0" ]; then
echo "==================================== PACKAGE ============================================ "
cpack -C Release -G ZIP || exit 1
Expand Down
54 changes: 54 additions & 0 deletions .extract_section.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#! /bin/bash

while getopts f:v: flag
do
case "${flag}" in
f) filename=${OPTARG};;
v) version=${OPTARG};;
esac
done

if [ -z "$filename" ]; then
echo "Please specify a filename using '-f'"
exit 1
fi

if [ ! -f $filename ]; then

echo "File does not exist: ${filename}"
exit 1

fi

if [ -z "$version" ]; then
echo "Please specify a version using '-v'"
exit 1
fi

#echo "Analyzing file $filename"
header="APBS[[:space:]]${version}"
#echo "Section title: <${header}>"

foundTitle=false
foundFirstHyphens=false
while read line; do
if [ "$foundTitle" == false ]; then
if [[ "$line" =~ ^${header} ]]; then
foundTitle=true
fi
else
if [[ $line =~ ^-+ ]]; then
if [ "$foundFirstHyphens" == false ]; then
foundFirstHyphens=true
else
break
fi
else
echo "$line"
fi
fi
done <$filename

if [ "$foundTitle" == false ]; then
echo "[No changes were documented]"
fi
Loading