aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/ci-install.sh
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-10-30 15:14:39 -0400
committerKevin O'Connor <kevin@koconnor.net>2020-10-30 15:30:48 -0400
commitfd973acd34175d3bc9349db6f3101b927e33f390 (patch)
treee42cab7e9005edda20a57ad99819859da36756dc /scripts/ci-install.sh
parent33a2d48888e685fb832ea9e3e30b2df218ab424b (diff)
downloadkutter-fd973acd34175d3bc9349db6f3101b927e33f390.tar.gz
kutter-fd973acd34175d3bc9349db6f3101b927e33f390.tar.xz
kutter-fd973acd34175d3bc9349db6f3101b927e33f390.zip
build-test: Remove references to "travis" in build tests
Use "ci-build.sh" "ci-install.sh" and similar, as travis-ci is no longer being used. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts/ci-install.sh')
-rwxr-xr-xscripts/ci-install.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/scripts/ci-install.sh b/scripts/ci-install.sh
new file mode 100755
index 00000000..7a536c81
--- /dev/null
+++ b/scripts/ci-install.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+# Build setup script for continuous integration testing.
+# See ci-build.sh for the actual test steps.
+
+# Stop script early on any error; check variables; be verbose
+set -eux
+
+MAIN_DIR=${PWD}
+BUILD_DIR=${PWD}/ci_build
+CACHE_DIR=${PWD}/ci_cache
+mkdir -p ${BUILD_DIR} ${CACHE_DIR}
+
+
+######################################################################
+# Install (or build) pru gcc
+######################################################################
+
+echo -e "\n\n=============== Install embedded pru gcc\n\n"
+PRU_FILE=${CACHE_DIR}/gnupru.tar.gz
+PRU_DIR=${BUILD_DIR}/pru-gcc
+
+if [ ! -f ${PRU_FILE} ]; then
+ cd ${BUILD_DIR}
+ git config --global user.email "you@example.com"
+ git config --global user.name "Your Name"
+ git clone https://github.com/dinuxbg/gnupru -b 2018.03-beta-rc3 --depth 1
+ cd gnupru
+ export PREFIX=${PRU_DIR}
+ ./download-and-patch.sh 2>&1 | pv -nli 30 > ${BUILD_DIR}/gnupru-build.log
+ ./build.sh 2>&1 | pv -nli 30 >> ${BUILD_DIR}/gnupru-build.log
+ cd ${BUILD_DIR}
+ tar cfz ${PRU_FILE} pru-gcc/
+else
+ cd ${BUILD_DIR}
+ tar xfz ${PRU_FILE}
+fi
+
+
+######################################################################
+# Create python virtualenv environment
+######################################################################
+
+echo -e "\n\n=============== Install python virtualenv\n\n"
+cd ${MAIN_DIR}
+virtualenv -p python2 ${BUILD_DIR}/python-env
+${BUILD_DIR}/python-env/bin/pip install -r ${MAIN_DIR}/scripts/klippy-requirements.txt