Interpolate the 4th element in spline calc. #7
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: libcootapi CI Homebrew macOS | |
on: | |
push: | |
jobs: | |
build-libcootapi-macos-using-homebrew-deps: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# Home on macOS is /Users/runner | |
- name: where are we? | |
run: | | |
pwd | |
cd | |
pwd | |
- name: cache macos libcootapi build homebrew | |
id: cache-macos-libcootapi-homebrew | |
uses: actions/cache@v4 | |
with: | |
path: /usr/local | |
key: macos-libcootapi-homebrew-build-homebrew-cache | |
- name: download the monomer library | |
run: wget -nv https://github.com/MonomerLibrary/monomers/archive/refs/tags/ccp4-8.0.016.tar.gz | |
# note that the data directory exists in the coot repo (which is where we are) | |
- name: untar the monomer library | |
run: pwd && cd data && tar xf ../ccp4-8.0.016.tar.gz && ln -s monomers-ccp4-8.0.016 monomers | |
- name: Cache test data tar | |
id: macos-libcootapi-test-data-cache | |
uses: actions/cache@v4 | |
with: | |
path: test-molecule-container-test-data.tar.gz | |
key: macos-libcootapi-test-data-cache | |
- name: download test data | |
run: wget -N -nv https://www2.mrc-lmb.cam.ac.uk/personal/pemsley/coot/data/test-molecule-container-test-data.tar.gz | |
- name: untar test data | |
run: mkdir test-data && cd test-data && tar xvf ../test-molecule-container-test-data.tar.gz | |
- name: Setup homebrew | |
id: setup-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: turn on brew analytics | |
run: brew analytics on | |
- name: pre-update clean for homebrew | |
run: | | |
rm '/usr/local/bin/2to3' | |
rm '/usr/local/bin/2to3-3.11' | |
rm '/usr/local/bin/2to3-3.12' | |
rm '/usr/local/bin/idle3' | |
rm '/usr/local/bin/idle3.11' | |
rm '/usr/local/bin/idle3.12' | |
rm '/usr/local/bin/pydoc3' | |
rm '/usr/local/bin/pydoc3.11' | |
rm '/usr/local/bin/pydoc3.12' | |
rm '/usr/local/bin/python3' | |
rm '/usr/local/bin/python3.11' | |
rm '/usr/local/bin/python3.12' | |
rm '/usr/local/bin/python3-config' | |
rm '/usr/local/bin/python3.12-config' | |
rm '/usr/local/bin/python3.11-config' | |
- name: brew update | |
run: | | |
brew uninstall kotlin | |
brew uninstall xcbeautify | |
brew update | |
brew upgrade | |
# gfortran is needed for numpy. | |
# numpy is needed for rdkit | |
- name: Install Homebrew dependencies | |
run: > | |
brew install boost boost-python3 brewsci/bio/clipper4coot | |
brewsci/bio/ssm brewsci/bio/gemmi dwarfutils gsl rdkit glm gfortran | |
- name: tell me about rdkit installation | |
run: | | |
ls /usr/local/opt/rdkit | |
ls /usr/local/opt/rdkit/share/RDKit | |
- name: test python3 | |
run: which python3 && python3 --version | |
# homebrew pip refuses to do this: | |
# - name: install nanobind | |
# run: python3 -m pip install nanobind | |
# | |
# so try using pip3 to a user-install of nanobind | |
- name: homebrew python-requests | |
run: brew install python-requests | |
- name: download a Python | |
run: wget -nv http://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz | |
- name: untar the Python | |
run: tar xf Python-3.10.13.tgz | |
- name: configure, compile and install the Python | |
run: > | |
cd Python-3.10.13 && | |
./configure --prefix=$HOME/install && | |
make -j 4 && | |
make install | |
- name: set the path | |
run: echo /Users/runner/install/bin >> $GITHUB_PATH | |
- name: install nanobind | |
run: pip3 install nanobind | |
- name: find nanobind in $HOME/install | |
run: find $HOME/install -name nanobind | |
- name: create-build-directory-for-libcootapi | |
run: mkdir build-libcootapi | |
- name: patch out CCP4-package in CMakeLists.txt | |
run: sed -i.backup -e 's/find_package.CCP4/#&/' CMakeLists.txt | |
- name: run cmake | |
run: > | |
cd build-libcootapi && | |
cmake -DCMAKE_INSTALL_PREFIX=/Users/runner/install/chapi-Darwin-macos-gtk4 | |
-DCMAKE_PREFIX_PATH=/usr/local | |
-DENHANCED_LIGAND_TOOLS=TRUE | |
-DGEMMI_DIR=/usr/local/lib/cmake/gemmi | |
-DRDKit_DIR=/usr/local/lib/cmake/rdkit | |
-DSSM_INCLUDE_DIR=/usr/local/include | |
-DSSM_LIBRARY=/usr/local/lib/libssm.dylib | |
-DCLIPPER-CORE_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/lib/libclipper-core.dylib | |
-DCLIPPER-MMDB_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/lib/libclipper-mmdb.dylib | |
-DCLIPPER-CCP4_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/lib/libclipper-ccp4.dylib | |
-DCLIPPER-CONTRIB_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/lib/libclipper-contrib.dylib | |
-DCLIPPER-MINIMOL_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/lib/libclipper-minimol.dylib | |
-DCLIPPER-CIF_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/lib/libclipper-cif.dylib | |
-DCLIPPER-CORE_INCLUDE_DIR=/usr/local/Cellar/clipper4coot/2.1.20180802_2/include | |
-DCLIPPER-MMDB_INCLUDE_DIR=/usr/local/Cellar/clipper4coot/2.1.20180802_2/include | |
-DCLIPPER-CCP4_INCLUDE_DIR=/usr/local/Cellar/clipper4coot/2.1.20180802_2/include | |
-DMMDB2_LIBRARY=/usr/local/lib/libmmdb2.dylib | |
-DMMDB2_INCLUDE_DIR=/usr/local/include | |
-DFFTW2_INCLUDE_DIRS=/usr/local/Cellar/clipper4coot/2.1.20180802_2/fftw2/include | |
-DFFTW2_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/fftw2/lib/libfftw.dylib | |
-DRFFTW2_LIBRARY=/usr/local/Cellar/clipper4coot/2.1.20180802_2/fftw2/lib/librfftw.dylib | |
-Dnanobind_DIR=/Users/runner/install/lib/python3.10/site-packages/nanobind/cmake .. | |
- name: Upload CMakeCache.txt | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cmake-macos-homebrew-build-cache-package | |
path: /Users/runner/work/coot/coot/build-libcootapi | |
retention-days: 3 | |
- name: make | |
run: cd build-libcootapi && make -j 4 VERBOSE=1 | |
- name: make install | |
run: cd build-libcootapi && make install | |
- name: run the test-molecules-container test | |
# this needs the monomer library | |
env: | |
MOORHEN_TEST_DATA_DIR: ../test-data | |
COOT_REFMAC_LIB_DIR: /Users/runner/work/coot/coot # "data/monomers" is added before "a/ATP.cif" (say) | |
# run: cd build-libcootapi && ./test-molecules-container | egrep "^FAIL|^PASS|^UN|^LIGHTS|^, " | |
run: cd build-libcootapi && ./test-molecules-container |