Skip to content

Commit

Permalink
wip macos build [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Aug 22, 2024
1 parent eb3defe commit 978df9a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 deletions.
1 change: 1 addition & 0 deletions .github/workflows/osx_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
export GEODA_HOME=$PWD
export GEODA_ARCH=${{ env.GEODA_ARCH }}
./install.sh
shell: /bin/zsh

- name: Build GeoDa
run: |
Expand Down
44 changes: 11 additions & 33 deletions BuildTools/macosx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,17 @@ set -e
export GEODA_HOME=$PWD
echo $GEODA_HOME
echo $GEODA_ARCH
CPUS=`sysctl -n hw.ncpu`

# Install boost 1.75
#brew install [email protected]
#ln -s /usr/local/opt/[email protected] /usr/local/opt/boost
# check if $GEODA_HOME and $GEODA_ARCH are set
if [ -z "$GEODA_HOME" ]; then
echo "Please set GEODA_HOME environment variable"
exit
fi
if [ -z "$GEODA_ARCH" ]; then
echo "Please set GEODA_ARCH environment variable"
exit
fi

# Install libgdal 3.6
#brew install gdal
CPUS=`sysctl -n hw.ncpu`

cd $GEODA_HOME
mkdir -p temp
Expand All @@ -24,16 +27,6 @@ mkdir -p ../../o

cd temp

# FIX for libgdal on Monterey using sqlite 3.30.1
# cd temp
# curl -L -O https://sqlite.org/2019/sqlite-autoconf-3300100.tar.gz
# tar -xvf sqlite-autoconf-3300100.tar.gz
# cd sqlite-autoconf-3300100
# ./configure --enable-readline CPPFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local/opt/sqlite
# make
# make install
# cd ..
# cd ..
# Build Boost 1.76
if ! [ -f "boost_1_76_0.tar.bz2" ]; then
curl -L -O https://archives.boost.io/release/1.76.0/source/boost_1_76_0.tar.gz
Expand Down Expand Up @@ -109,19 +102,4 @@ if ! [ -f "v0.8.0.zip" ]; then
mv spectra-0.8.0 spectra
fi

cd ..
# Build GeoDa
# cp ../../GeoDamake.macosx.opt ../../GeoDamake.opt
# make -j $CPUS
# make app

# # Create dmg
# VER_MAJOR=$(grep version_major $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
# VER_MINOR=$(grep version_minor $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
# VER_BUILD=$(grep version_build $GEODA_HOME/../../version.h | sed -e 's/^[[:space:]][[:alpha:]|[:space:]|_|=]*//g' | sed -e 's/;//g')
# GEODA_VERSION=$VER_MAJOR.$VER_MINOR.$VER_BUILD
# echo $GEODA_VERSION

# cd create-dmg
# ./geoda.sh $GEODA_VERSION
# codesign --timestamp -s "Developer ID Application: Geodapress LLC (26M5NG43GP)" -i edu.uchicago.spatial GeoDa$GEODA_VERSION-Installer.dmg
cd ..

0 comments on commit 978df9a

Please sign in to comment.