diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b1d2fada701ba6d17e8cef9e473dd99a7d95f8fd
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,55 @@
+variables:
+  nproc: "1"
+
+
+before_script:
+  - nproc=`grep -c '^processor' /proc/cpuinfo`
+  - echo "nproc = $nproc"
+
+#========== Pipeline ==================
+stages:
+  - configure
+  - compile
+#=====================================
+
+#============== configure ============
+configure-linux:
+  artifacts:
+    name: "${CI_BUILD_NAME}_${CI_BUILD_ID}"
+    expire_in: 1 hour
+    paths:
+      - build
+      - lib
+      - lib/Debug
+      - bin
+  script:
+    - mkdir -p build
+    - cd build
+    - cmake -DCMAKE_BUILD_TYPE=Debug   ..
+    - echo "configure | ${CI_PROJECT_DIR}"
+  stage: configure
+  tags:
+    - linux
+#============== compile ============
+make-linux:
+  dependencies:
+    - configure-linux
+  artifacts:
+    name: "${CI_BUILD_NAME}_${CI_BUILD_ID}"
+    expire_in: 1 hour # optional expiry
+    paths:
+      - build
+      - bin
+      - lib
+      - lib/Debug
+
+  stage: compile
+  script:
+    - cd build
+    - make -j$nproc
+    - echo "compile | ${CI_PROJECT_DIR}"
+  tags:
+    - linux
+
+after_script:
+  - echo "End CI" # todo: run report script
diff --git a/deployAPPLE.sh b/deployAPPLE.sh
index efc8bb0824fe5a2ddcfcb779b634380bc98b2469..c2edf5705c51252e036070250913a015dab3b0ee 100755
--- a/deployAPPLE.sh
+++ b/deployAPPLE.sh
@@ -4,8 +4,64 @@ NC='\033[0m' # No Color
 CMD="jpsvis"
 VERSION=0.8.4
 
+if [ -d build ];then
+    echo "INFO: found build directory"
+    echo "INFO:${RED} rm build ${NC}"
+    rm -rf build/*
+else
+    echo "INFO: mkdir build"
+    mkdir build
+fi
 
-#cd ..
+echo "INFO: cd build"
+cd build
+
+echo "INFO: actual directory: ${PWD}"
+
+if [ -d ../bin ]; then
+    echo "INFO: found bin directory"
+    echo "INFO:${RED} remove ./bin directory ${NC}"
+    rm -rf ../bin
+fi
+
+echo "INFO: cmake .."
+cmake ..
+
+echo "INFO: make .."
+make -j4
+
+
+echo "INFO: running  <dylibbundler -od -b -x ../bin/${CMD}.app/Contents/MacOS/${CMD} -d ../bin/${CMD}.app/Contents/libs/>"
+dylibbundler -od -b -x ../bin/${CMD}.app/Contents/MacOS/${CMD} -d ../bin/${CMD}.app/Contents/libs/
+
+
+# dylibbundler has a problem linking to local python framework. So this quick fix..
+isPythonDependencyGlobal=`otool -L ../bin/${CMD}.app/Contents/MacOS/${CMD} | grep Python.framework`
+
+echo "isPythonDependencyGlobal: <$isPythonDependencyGlobal>"
+
+if [[ -n $isPythonDependencyGlobal ]];then
+    if [[ ! $isPythonSWDependencyGlobal == *"@executable_path"* ]]; then
+        #install_name_tool -change /usr/local/opt/python3/Frameworks/Python.framework/Versions/3.5/Python
+        #                           @executable_path/../Frameworks/Python.framework/Versions/3.5/Python
+        #                           ./bin/jpsvis.app/Contents/MacOS/jpsvis
+
+        Python=`echo ${isPythonDependencyGlobal} | xargs | awk '{print $1}'`
+        echo "WARNING: ${RED} <$Python> is not relative to ${CMD} ${NC}."
+
+        Frameworks=`echo ${Python} |  awk -F Frameworks '{ print "Frameworks"$2 }'`
+        echo "WARNING: ${RED} change <$Python> to <@executable_path/../$Frameworks> ${CMD} ${NC}."
+
+        install_name_tool -change $Python @executable_path/../$Frameworks ../bin/${CMD}.app/Contents/MacOS/${CMD}
+
+        echo "INFO: Check again"
+        otool -L ../bin/${CMD}.app/Contents/MacOS/${CMD} | grep Python.framework
+        echo "-----------------"
+
+    fi
+fi
+
+cd ..
 # check if dependencies to libs are local to .app
 python checkDependencies.py bin/jpsvis.app/