Skip to content

Commit

Permalink
more poor man debugging github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ruaronicola committed Sep 27, 2023
1 parent 2b6d9aa commit c958288
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
3 changes: 3 additions & 0 deletions resources/yices_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ def loadYices():
global libyicespath
error_msg = "Yices dynamic library not found."
# attempt loading yices from both $PATH and default install location
print(f'{os.environ("PATH")=}')
print(f'{os.environ("PYTHONPATH")=}')
print(f'{os.environ("VIRTUAL_ENV")=}')
for path in sys.path + ['/usr/local/lib']:
if _loadYicesFromPath(path, libyicespath):
return
Expand Down
44 changes: 25 additions & 19 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,9 @@ done
GREED_DIR=`dirname "${BASH_SOURCE[0]}"`
GREED_DIR=`readlink -f $GREED_DIR` || { echo "${bold}${red}Can't find greed absolute path ${normal}"; exit 1; }
GIGAHORSE_DIR=$GREED_DIR/gigahorse-toolchain
cd $GREED_DIR

########################################################################################################################
########################################################################################################################

# link our scripts into virtualenv's bin dir
echo "Linking scripts into virtualenv's bin directory.."
for script in $GREED_DIR/resources/{*.sh,*.py}; do
ln -sf $script $VIRTUAL_ENV/bin/
done

# create alias for run.py
echo "Creating alias run.py -> greed.."
ln -sf $GREED_DIR/resources/run.py $VIRTUAL_ENV/bin/greed

# pip install greed
pip install -e .
VIRTUAL_ENV_BIN=$VIRTUAL_ENV/bin
VIRTUAL_ENV_LIB=`echo $VIRTUAL_ENV/lib/python3.*/site-packages`

########################################################################################################################
########################################################################################################################
Expand All @@ -67,8 +53,6 @@ autoconf || { echo "${bold}${red}Failed to run autoconf${normal}"; exit 1; }
make || { echo "${bold}${red}Failed to run make${normal}"; exit 1; }

# finally, link yices2/build/lib/ to the virtualenv's site-packages dir
VIRTUAL_ENV_BIN=$VIRTUAL_ENV/bin
VIRTUAL_ENV_LIB=`echo $VIRTUAL_ENV/lib/python3.*/site-packages`
ln -sf $GREED_DIR/yices2/build/*-release/bin/* $VIRTUAL_ENV_BIN/
ln -sf $GREED_DIR/yices2/build/*-release/lib/* $VIRTUAL_ENV_LIB/
cp $VIRTUAL_ENV/lib/python3.*/site-packages/libyices.so.* $VIRTUAL_ENV_LIB/libyices.so
Expand All @@ -84,7 +68,9 @@ fi
ls -lah $VIRTUAL_ENV_LIB | grep yices
export PYTHONPATH=$PYTHONPATH:$VIRTUAL_ENV_LIB
cp $GREED_DIR/resources/yices_api.py yices2_python_bindings/yices_api.py
pip install -e yices2_python_bindings
which pip
which python
python -m pip install -e yices2_python_bindings
yices_python_info

########################################################################################################################
Expand Down Expand Up @@ -136,4 +122,24 @@ else
true
fi

########################################################################################################################
########################################################################################################################
# GREED
########################################################################################################################

# link our scripts into virtualenv's bin dir
echo "Linking scripts into virtualenv's bin directory.."
for script in $GREED_DIR/resources/{*.sh,*.py}; do
ln -sf $script $VIRTUAL_ENV_BIN/
done

# create alias for run.py
echo "Creating alias run.py -> greed.."
ln -sf $GREED_DIR/resources/run.py $VIRTUAL_ENV_BIN/greed

# install greed
python -m pip install -e $GREED_DIR

########################################################################################################################

set +x

0 comments on commit c958288

Please sign in to comment.