Skip to content

Commit

Permalink
build/test for macos with install_name corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
jcschaff committed Sep 1, 2017
1 parent cd566d4 commit 948097f
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/build-win64/
/.DS_Store
/build-linux64/
/build-macos/
1 change: 1 addition & 0 deletions VagrantBoxes/macos-test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.vagrant/
77 changes: 77 additions & 0 deletions VagrantBoxes/macos-test/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.

# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "jhcook/macos-sierra"

# Disable automatic box update checking. If you disable this, then
# boxes will only be checked for updates when the user runs
# `vagrant box outdated`. This is not recommended.
# config.vm.box_check_update = false

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
# NOTE: This will enable public access to the opened port
# config.vm.network "forwarded_port", guest: 80, host: 8080

# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine and only allow access
# via 127.0.0.1 to disable public access
# config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"

# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"

# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
# config.vm.network "public_network"

# Share an additional folder to the guest VM. The first argument is
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
config.vm.synced_folder "../..", "/vagrant_numerics", type: "nfs"
config.vm.synced_folder ".", "/vagrant", type: "nfs"

# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
# Example for VirtualBox:
#
config.vm.provider "virtualbox" do |vb|
vb.name = "vcell-numerics-macos-test"
# # Display the VirtualBox GUI when booting the machine
# vb.gui = true
#
# # Customize the amount of memory on the VM:
# vb.memory = "1024"
end
#
# View the documentation for the provider you are using for more
# information on available options.

# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
# such as FTP and Heroku are also available. See the documentation at
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
# config.push.define "atlas" do |push|
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
# end

# Enable provisioning with a shell script. Additional provisioners such as
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
# documentation for more information about their specific syntax and use.
config.vm.provision "shell", inline: <<-SHELL
SHELL
end
30 changes: 30 additions & 0 deletions VagrantBoxes/macos-test/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env bash

shopt -s -o nounset

echo "testing solvers using binaries and libraries in build-linux64/bin and tests in testFiles"

projectDir=/vagrant_numerics

solverDir="${projectDir}/build-macos/bin"
inputDir="${projectDir}/testFiles/input"
workDir="${projectDir}/testFiles/working"
archiveDir="${projectDir}/testFiles/archive/macos"

mkdir -p $workDir
mkdir -p $archiveDir

cd $projectDir

#
# Test FiniteVolume_x64
#
mkdir -p ${workDir}/FiniteVolume
rm ${workDir}/FiniteVolume/*
cp ${inputDir}/FiniteVolume/SimID_11538992_0_* ${workDir}/FiniteVolume
${solverDir}/FiniteVolume_x64 ${workDir}/FiniteVolume/SimID_11538992_0_.fvinput

mkdir -p ${archiveDir}/FiniteVolume
cp ${workDir}/FiniteVolume/SimID_11538992_0_* ${archiveDir}/FiniteVolume
rm ${workDir}/FiniteVolume/*

14 changes: 0 additions & 14 deletions VagrantBoxes/macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,3 @@ mkdir bin
..

make

#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_cpp.14.dylib bin
#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5.10.dylib bin
#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_hl_cpp.11.dylib bin
#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_hl.10.dylib bin
#cp /usr/local/lib/libgfortran.4.dylib bin
#cp /usr/local/lib/libquadmath.0.dylib bin
#cp /usr/local/opt/szip/lib/libsz.2.dylib bin
#cp /usr/local/lib/libgcc_s.1.dylib bin

#cd /vagrant_numerics/${builddir}/bin
#echo "fixing mac paths"
#/vagrant/install_name_tool_macos.sh
#cd /vagrant_numerics/${builddir}
8 changes: 2 additions & 6 deletions VagrantBoxes/macos/install_name_tool_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ executables=(
libraries=(
"/usr/local/lib/libgfortran.4.dylib"
"/usr/local/lib/libquadmath.0.dylib"
"/usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_cpp.14.dylib"
"/usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5.10.dylib"
"/usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_hl_cpp.11.dylib"
"/usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_hl.10.dylib"
"/usr/local/opt/[email protected]/lib/libhdf5_cpp.14.dylib"
"/usr/local/opt/[email protected]/lib/libhdf5.10.dylib"
"/usr/local/opt/[email protected]/lib/libhdf5_hl_cpp.11.dylib"
"/usr/local/opt/[email protected]/lib/libhdf5_hl.10.dylib"
"/usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_cpp.14.dylib"
"/usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5.10.dylib"
"/usr/local/opt/szip/lib/libsz.2.dylib"
"/usr/local/lib/libgcc_s.1.dylib"
"/vagrant_numerics/build-macos/bin/libzip.3.0.dylib"
Expand Down
27 changes: 27 additions & 0 deletions VagrantBoxes/macos/moveDependentLibraries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash

shopt -s -o nounset

builddir="build-macos"
cd /vagrant_numerics/${builddir}/bin

cp /usr/local/opt/[email protected]/lib/libhdf5_cpp.14.dylib .
cp /usr/local/opt/[email protected]/lib/libhdf5.10.dylib .
cp /usr/local/opt/szip/lib/libsz.2.dylib .
cp /usr/local/lib/libgfortran.4.dylib .
cp /usr/local/lib/libgcc_s.1.dylib .
cp /usr/local/lib/libquadmath.0.dylib .

#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_cpp.14.dylib .
#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5.10.dylib .
#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_hl_cpp.11.dylib .
#cp /usr/local/Cellar/[email protected]/1.8.19/lib/libhdf5_hl.10.dylib .
#cp /usr/local/lib/libgfortran.4.dylib .
#cp /usr/local/lib/libquadmath.0.dylib .
#cp /usr/local/opt/szip/lib/libsz.2.dylib .
#cp /usr/local/lib/libgcc_s.1.dylib .

cd /vagrant_numerics/${builddir}/bin
chmod +w *
echo "fixing mac paths"
/vagrant/install_name_tool_macos.sh
1 change: 1 addition & 0 deletions libzip-1.2.0/lib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/libzip.la

0 comments on commit 948097f

Please sign in to comment.