Skip to content

Commit

Permalink
New release: v3.4.1 (#232)
Browse files Browse the repository at this point in the history
* Fixed syntax errors in checking for max python version (#208)

* Fixed syntax errors in checking for max python version

* Switch OS specification to absolute versions and reduce places where those are specified

* Update Windows config to Visual Studio 17 2022

* skip ci -- Updated releases.rst with update info

* [skip ci] Added release note

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Change OS specification in build workflow (#210)

* Switch OS specification to absolute versions and reduce places where those are specified

* Update Windows config to Visual Studio 17 2022

* skip ci -- Updated releases.rst with update info

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>
Co-authored-by: Darren Curtis <Darren.Curtis@pnnl.gov>

* Nsoblath/issue 212 (#217)

* Turn off debugging steps

* Only install python in Windows for "Test Usage" job, as we'll be statically linking Python in Mac and Linux.

* Search for static python libs in linux and mac when doing a static build

* Turn on tmate to check library linking

* Find threads explicitly

* Tmate only on failure

* Verbose build for debugging

* Added two more missing libraries: libdl and libutil

* Enable tmate for the mac use-test job

* Test with Python 3.10

* Test with Python 3.10 revealed we needed libintl.  So that's added now.  Should be mac-specific

* Can't include_directories() on an empty variable

* Typo fix

* Find Iconv

* Add linking of APBS to CoreFoundation framework under macOS

* Remove debugging

* Removing some of the debugging tools used in testing the build.

* Switch back to the standard build with Python 3.9

* Removed last tmate debugging

* [skip ci] Document changes

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Nsoblath/issue 222 (#223)

* First committed version of Dockerfile.centos

* Add alt config workflow

* Alt config build: test docker builds

* In Dockerfile, specify APBS_STATIC_BUILD instead of BUILD_SHARED_LIBS

* Missing backslash found

* Fixing bugs in both Dockerfiles

* Dockerfile bug fixing

* Complete missing pieces of ensuring a position-independent-code build

* Minor fixes

* Switch to a shared-library build in the Ubuntu Docker build

* Rename Dockerfile --> Dockerfile.ubuntu

* Override APBS_STATIC_BUILD when needed

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Remove all mention of ENABLE_FETK (#225)

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Nsoblath/issue 226: FETK update (#227)

* Address missing linkages

* Cleanup FETK import

* Multithreaded build in docker now controlled by a build argument

* Install superlu as a dependency in the Ubuntu docker build

* Update the FETK version in use by the automatic builds (still on a development branch)

* Add in debugging tmate session for mac

* Manually build arpack to get the static lib (which seems to have disappeared?)

* Remove -j flags

* Set fortran compiler for arpack build

* Engaging brain, fixing mac-build commands

* Comment out tmate session

* Update the FETK commit to be the main branch, pre-release

* Update the changelog

* Updated default FETK build to commit v1.9.3 (57195e)

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Nsoblath/new issue 207: Addressing python version test (#229)

* Fix python test max-version test in apbs/CMakeLists.txt

* Turn on the alternate non-docker builds, with updates from the main build

* Fixing the python max version test in apbs/tests/CMakeLists.txt

* Fixing the python max version test in apbs/tools/python/CMakeLists.txt

* Test commit: remove python-max-version definition

* Simplify the Python search by looking for an exact version

* Add a default PYTHON_VERSION

* Adapt the various files involved in building APBS to the new Python version setup

* Didn't setup the python version correctly in the GHA builds

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Updated installation documentation (#231)

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>

* Updated license, version, and release info for pending release

Co-authored-by: Noah Oblath <noah.oblath@pnnl.gov>
Co-authored-by: Darren Curtis <Darren.Curtis@pnnl.gov>
  • Loading branch information
3 people committed Apr 29, 2022
1 parent ed52c8c commit f24dd76
Show file tree
Hide file tree
Showing 21 changed files with 617 additions and 189 deletions.
10 changes: 3 additions & 7 deletions .build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,15 @@ echo "Install dir: ${INSTALL_DIR}"
: ${ENABLE_PYGBE:=ON}
: ${ENABLE_BEM:=ON}
: ${ENABLE_GEOFLOW:=ON}
: ${ENABLE_FETK:=ON}
: ${FETK_VERSION:="857a0cf6ae40410471ea10f0e67e370cbd8ed6a3"}
: ${FETK_VERSION:="57195e55351e04ce6ee0ef56a143c996a9aee7e2"}
: ${ENABLE_iAPBS:=ON}
: ${ENABLE_OPENMP:=OFF}
: ${ENABLE_PBAM:=OFF}
: ${ENABLE_PBSAM:=OFF}
: ${ENABLE_PYTHON:=OFF}
: ${ENABLE_TESTS:=ON}
: ${GET_NanoShaper:=ON}
: ${PYTHON_MIN_VERSION:="3.9"}
: ${PYTHON_MAX_VERSION:="3.10"}
: ${PYTHON_VERSION:="3.9"}

echo "==================================== WHERE AM I ==================================== "
pwd
Expand Down Expand Up @@ -134,16 +132,14 @@ cmake -S .. -B $BUILD_DIR \
-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}" \
-DPYTHON_VERSION="${PYTHON_VERSION}" \
.. || exit 1

echo "==================================== BUILD =============================================== "
Expand Down
317 changes: 317 additions & 0 deletions .github/workflows/build-alt-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
---
name: Build APBS with an Alternate Configuration

on:
#push:
# branches: [main]
# tags: ['*']
pull_request:

workflow_dispatch:


env:
WIN_DEPENDENCIES_RELEASE: "v0.4.0"
WIN_TOOLCHAIN_FILE: '/c/vcpkg/scripts/buildsystems/vcpkg.cmake'
APBS_STATIC_BUILD: ON
BLA_VENDOR: OpenBLAS
BUILD_DOC: ON
BUILD_TOOLS: ON
RELEASE_TYPE: Release
ENABLE_PYGBE: ON
ENABLE_BEM: ON
ENABLE_GEOFLOW: ON
# FETK_VERSION: "1.9.2"
FETK_VERSION: 57195e55351e04ce6ee0ef56a143c996a9aee7e2
ENABLE_iAPBS: ON
ENABLE_OPENMP: OFF
ENABLE_PBAM: OFF
ENABLE_PBSAM: OFF
ENABLE_PYTHON: OFF
ENABLE_TESTS: ON
GET_NanoShaper: ON
PYTHON_VERSION: "3.9"

jobs:

build-docker:
name: Build and Test Docker Images

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- dockerfile: Dockerfile.ubuntu
apbs-static-build: OFF
python-version: "3.9"
- dockerfile: Dockerfile.centos
apbs-static-build: ON
python-version: "3.6"

env:
# Override default environment variables with matrix values
DOCKERFILE: ${{ matrix.dockerfile }}
APBS_STATIC_BUILD: ${{ matrix.apbs-static-build }}
PYTHON_VERSION: ${{ matrix.python-version }}

steps:

- name: Checkout the repo
uses: actions/checkout@master
with:
submodules: recursive

- name: Build and run
run: |
docker build \
-f ${DOCKERFILE} \
--build-arg APBS_STATIC_BUILD=${APBS_STATIC_BUILD} \
--build-arg BLA_VENDOR=${BLA_VENDOR} \
--build-arg BUILD_DOC=${BUILD_DOC} \
--build-arg BUILD_TOOLS=${BUILD_TOOLS} \
--build-arg RELEASE_TYPE=${RELEASE_TYPE} \
--build-arg ENABLE_PYGBE=${ENABLE_PYGBE} \
--build-arg ENABLE_BEM=${ENABLE_BEM} \
--build-arg ENABLE_GEOFLOW=${ENABLE_GEOFLOW} \
--build-arg FETK_VERSION=${FETK_VERSION} \
--build-arg ENABLE_iAPBS=${ENABLE_iAPBS} \
--build-arg ENABLE_OPENMP=${ENABLE_OPENMP} \
--build-arg ENABLE_PBAM=${ENABLE_PBAM} \
--build-arg ENABLE_PBSAM=${ENABLE_PBSAM} \
--build-arg ENABLE_PYTHON=${ENABLE_PYTHON} \
--build-arg ENABLE_TESTS=${ENABLE_TESTS} \
--build-arg GET_NanoShaper=${GET_NanoShaper} \
--build-arg PYTHON_VERSION=${PYTHON_VERSION} \
.
ctest -C ${RELEASE_TYPE} -VV --output-on-failure
build:
name: Compile Code

runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
platform: [ubuntu, macOS, windows]
openmp: [OFF]
static-build: [ON]
python-version: ["3.9"]
include:
- platform: ubuntu
os: ubuntu-20.04
bla-vendor: OpenBLAS
architecture: x64
- platform: macos
os: macos-11
bla-vendor: Apple
architecture: x64
- platform: windows
os: windows-2022
bla-vendor: OpenBLAS
architecture: x86

env:
BLA_VENDOR: ${{ matrix.bla-vendor }}
ENABLE_OPENMP: ${{ matrix.openmp }}
APBS_STATIC_BUILD: ${{matrix.static-build }}
PYTHON_VERSION: "${{ matrix.python-version }}"

outputs:
apbs-version: ${{ steps.extract-version.outputs.apbs-version }}
apbs-tag: ${{ steps.extract-version.outputs.apbs-tag }}
cpack-out-lin-zip: ${{ steps.cpack-ml.outputs.cpack-out-ubuntu-zip }}
cpack-out-mac-zip: ${{ steps.cpack-ml.outputs.cpack-out-macos-zip }}
cpack-out-win-zip: ${{ steps.cpack-w.outputs.cpack-out-windows-zip }}

steps:

- name: Add msbuild to PATH
if: startsWith(matrix.os, 'windows') # Windows only
uses: microsoft/setup-msbuild@v1.0.2

- name: Checkout reposistory
uses: actions/checkout@master
with:
submodules: recursive

- name: Extract version
run: |
version="$(grep -E '^[0-9]+_[0-9]+_[0-9]+' VERSION | sed 's/_/./g')"
echo $version
echo ::set-output name=apbs-version::${version}
echo ::set-output name=apbs-tag::v${version}
shell: bash
id: extract-version

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}

- name: Mac Prereqs
if: startsWith(matrix.os, 'macos') # Mac only
run: |
brew install \
wget \
bison \
flex \
swig \
boost \
eigen \
lapack \
suite-sparse
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
gunzip metis-5.1.0.tar.gz
tar -xf metis-5.1.0.tar
cd metis-5.1.0
make config prefix=/usr/local
make install
cd ..
git clone https://github.com/opencollab/arpack-ng.git
cd arpack-ng
git fetch --all --tags
git checkout tags/3.8.0 -b latest
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DCMAKE_Fortran_COMPILER=$(which gfortran-11) -DEXAMPLES=OFF -DMPI=OFF -DBUILD_SHARED_LIBS=OFF ..
make install
# brew upgrade gcc@9

- name: Linux Prereqs and Remove broken apt repos [Ubuntu]
if: startsWith(matrix.os, 'ubuntu') # Linux only
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
sudo apt-get install -yq \
software-properties-common \
build-essential \
wget \
bison \
flex \
swig \
libreadline-dev \
libeigen3-dev \
libboost-dev \
libopenblas-serial-dev \
libarpack2-dev \
liblapack-dev \
libsuitesparse-dev
wget http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
gunzip metis-5.1.0.tar.gz
tar -xf metis-5.1.0.tar
cd metis-5.1.0
make config prefix=/usr/local
sudo make install
- name: Install Window dependencies
if: startsWith(matrix.os, 'windows') # Windows only
run: |
choco install wget
wget https://github.com/Electrostatics/cache/releases/download/${WIN_DEPENDENCIES_RELEASE}/apbs_dependencies_vcpkg.zip
7z x apbs_dependencies_vcpkg.zip -aoa -o/c/vcpkg
ls /c/vcpkg
vcpkg integrate install
vcpkg list --triplet x86-windows
shell: bash

- name: Configure for Windows
if: startsWith(matrix.os, 'windows') # Windows only
env:
CMAKE_PREFIX_PATH: ${VCPKG_INSTALLATION_ROOT}/installed/x86-windows
run: |
mkdir -p build/${RELEASE_TYPE}
cd build
echo $CMAKE_PREFIX_PATH
cmake -DCMAKE_TOOLCHAIN_FILE=${WIN_TOOLCHAIN_FILE} -DVCPKG_TARGET_TRIPLET=x86-windows -DCMAKE_INSTALL_INCLUDEDIR=include -DCMAKE_BUILD_TYPE=${RELEASE_TYPE} -DCMAKE_VERBOSE_MAKEFILE:BOOL=OFF -DBUILD_TESTING=${BUILD_TESTING} -DBUILD_TOOLS=${BUILD_TOOLS} -DCHECK_EPSILON=ON -DBLA_VENDOR=${BLA_VENDOR} -DENABLE_BEM=${ENABLE_BEM} -DENABLE_GEOFLOW=${ENABLE_GEOFLOW} -DENABLE_iAPBS=${ENABLE_iAPBS} -DENABLE_PYGBE=${ENABLE_PYGBE} -DPYTHON_VERSION="${PYTHON_VERSION}" -DENABLE_INLINE=ON -DENABLE_PBAM=${ENABLE_PBAM} -DENABLE_PBSAM=${ENABLE_PBSAM} -DENABLE_PYTHON=${ENABLE_PYTHON} -DENABLE_TESTS=${ENABLE_TESTS} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DENABLE_VERBOSE_DEBUG=OFF -DGET_NanoShaper=${GET_NanoShaper} -DFETK_VERSION=${FETK_VERSION} -G "Visual Studio 17 2022" -A Win32 ..
cat CMakeCache.txt
shell: bash

- name: Configure and Build for Mac
if: startsWith(matrix.os, 'macos') # Mac only
env:
INSTALL_DIR: "./"
run: |
./.build.sh
- name: Configure and Build for Linux
if: startsWith(matrix.os, 'ubuntu') # Linux only
env:
# https://codecov.io/gh/Electrostatics/apbs
CODECOV_TOKEN: "e3a1e24c-5598-4f47-9353-7fa0ac57f98e"
INSTALL_DIR: "./"
run: |
./.build.sh
- name: Build on Windows
if: startsWith(matrix.os, 'windows') # Windows only
run: |
cd build
cmake --build . --config ${RELEASE_TYPE} --parallel 2 --target install
shell: bash

- name: Configure Pagefile on Windows
if: startsWith(matrix.os, 'windows') # Windows only
uses: al-cheb/configure-pagefile-action@v1.2
with:
minimum-size: 8GB
maximum-size: 16GB

- name: Run tests
# Path setting includes a windows-specific path, but this should just be ignored in linux/mac
run: |
cd build
export PATH=$(pwd)/bin:/c/vcpkg/installed/x86-windows/bin:$PATH
ctest -C ${RELEASE_TYPE} -VV --output-on-failure
shell: bash

# - name: Create package for Mac and Linux
# if: matrix.create-package && startsWith(matrix.os, 'macos') || startswith(matrix.os, 'ubuntu') # Mac or Linux only
# id: cpack-ml
# run: |
# cd build
# cpack -C ${RELEASE_TYPE} -G ZIP
# ZIP_CPACK_FILE=`ls APBS*.zip`
# echo "ZIP_CPACK_FILE=${ZIP_CPACK_FILE}" >> $GITHUB_ENV
# echo "PATH_TO_PACKAGE=build/" >> $GITHUB_ENV
# echo ::set-output name=cpack-out-${{ matrix.platform }}-zip::${ZIP_CPACK_FILE}
# echo "ZIP CPack file: $ZIP_CPACK_FILE"
# unzip -l ${ZIP_CPACK_FILE}

# - name: Create package for Windows
# if: matrix.create-package && startsWith(matrix.os, 'windows') # Windows only
# id: cpack-w
# run: |
# cd build
# /c/Program\ Files/CMake/bin/cpack.exe -C ${RELEASE_TYPE} -G ZIP -V
# ZIP_CPACK_FILE=`ls APBS*.zip`
# echo "Repackaging with extra dlls"
# mkdir unzip
# cp $ZIP_CPACK_FILE unzip
# cd unzip
# 7z x $ZIP_CPACK_FILE
# PACKAGE_DIR=${ZIP_CPACK_FILE%.*}
# cp /c/vcpkg/installed/x86-windows/bin/{libumfpack.dll,libcholmod.dll,libamd.dll,openblas.dll,libcamd.dll,libcolamd.dll,libccolamd.dll,liblapack.dll,libgfortran-5.dll,libgcc_s_dw2-1.dll,libwinpthread-1.dll,libquadmath-0.dll} ./${PACKAGE_DIR}/bin
# 7z a -r $ZIP_CPACK_FILE $PACKAGE_DIR/bin/*.dll
# echo "ZIP_CPACK_FILE=${ZIP_CPACK_FILE}" >> $GITHUB_ENV
# echo "PATH_TO_PACKAGE=build/unzip/" >> $GITHUB_ENV
# echo ::set-output name=cpack-out-${{ matrix.platform }}-zip::${ZIP_CPACK_FILE}
# echo "ZIP CPack file: $ZIP_CPACK_FILE"
# unzip -l ${ZIP_CPACK_FILE}
# shell: bash

# - name: Upload ZIP package to the action
# if: matrix.create-package
# uses: actions/upload-artifact@v2
# with:
# name: ${{ env.ZIP_CPACK_FILE }}
# path: ${{ env.PATH_TO_PACKAGE }}${{ env.ZIP_CPACK_FILE }}
# retention-days: 5

# For debugging
# - name: Setup tmate session
# if: startsWith(matrix.os, 'macos') || ! success()
# if: startsWith(matrix.os, 'windows') || ! success()
# if: ${{ ! success() }}
# uses: mxschmitt/action-tmate@v3

0 comments on commit f24dd76

Please sign in to comment.