aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-06-28 15:03:41 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-06-28 15:03:41 -0400
commit52ab93be6d083534dd042274da968db5e41aed03 (patch)
treeab28bee2d7678430a931a1b82d32669377fc3ec3
parent640169310ff5be35ad31ff1869e7ebbfc9d334ee (diff)
downloadkutter-52ab93be6d083534dd042274da968db5e41aed03.tar.gz
kutter-52ab93be6d083534dd042274da968db5e41aed03.tar.xz
kutter-52ab93be6d083534dd042274da968db5e41aed03.zip
build: Collect travis build files travis build specific directories
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--.travis.yml2
-rwxr-xr-xscripts/travis-build.sh10
-rwxr-xr-xscripts/travis-install.sh14
3 files changed, 15 insertions, 11 deletions
diff --git a/.travis.yml b/.travis.yml
index 76765d98..9b8c6c92 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,7 @@ addons:
cache:
directories:
- - downloads
+ - travis_cache
install: ./scripts/travis-install.sh
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
index 866fb8dc..1244cb2a 100755
--- a/scripts/travis-build.sh
+++ b/scripts/travis-build.sh
@@ -5,8 +5,10 @@
set -eux
# Paths to tools installed by travis-install.sh
-export PATH=${PWD}/gcc-arm-none-eabi-7-2017-q4-major/bin:${PATH}
-PYTHON=${PWD}/python-env/bin/python
+MAIN_DIR=${PWD}
+BUILD_DIR=${PWD}/travis_build
+export PATH=${BUILD_DIR}/gcc-arm-none-eabi-7-2017-q4-major/bin:${PATH}
+PYTHON=${BUILD_DIR}/python-env/bin/python
######################################################################
@@ -28,7 +30,7 @@ echo "travis_fold:end:check_whitespace"
# Run compile tests for several different MCU types
######################################################################
-DICTDIR=${PWD}/dict
+DICTDIR=${BUILD_DIR}/dict
mkdir -p ${DICTDIR}
for TARGET in test/configs/*.config ; do
@@ -49,7 +51,7 @@ done
# Verify klippy host software
######################################################################
-HOSTDIR=${PWD}/hosttest
+HOSTDIR=${BUILD_DIR}/hosttest
mkdir -p ${HOSTDIR}
echo "travis_fold:start:klippy"
diff --git a/scripts/travis-install.sh b/scripts/travis-install.sh
index ce1f7f9a..fa3bb50d 100755
--- a/scripts/travis-install.sh
+++ b/scripts/travis-install.sh
@@ -5,7 +5,10 @@
# Stop script early on any error; check variables; be verbose
set -eux
-DOWNLOAD_DIR=${PWD}/downloads
+MAIN_DIR=${PWD}
+BUILD_DIR=${PWD}/travis_build
+DOWNLOAD_DIR=${PWD}/travis_cache
+mkdir -p ${BUILD_DIR} ${DOWNLOAD_DIR}
######################################################################
@@ -17,9 +20,7 @@ GCC_ARM_URL="https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/g
GCC_ARM_SHA="96a029e2ae130a1210eaa69e309ea40463028eab18ba19c1086e4c2dafe69a6a gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2"
GCC_ARM_FILE="$(basename ${GCC_ARM_URL})"
-mkdir -p ${DOWNLOAD_DIR}
cd ${DOWNLOAD_DIR}
-
if [ ! -f ${GCC_ARM_FILE} ]; then
wget "$GCC_ARM_URL"
fi
@@ -28,7 +29,7 @@ if [ "$FOUND_SHA" != "$GCC_ARM_SHA" ]; then
echo "ERROR: Mismatch on gcc arm sha256"
exit -1
fi
-cd ..
+cd ${BUILD_DIR}
tar xf "${DOWNLOAD_DIR}/${GCC_ARM_FILE}"
@@ -37,5 +38,6 @@ tar xf "${DOWNLOAD_DIR}/${GCC_ARM_FILE}"
######################################################################
echo "=============== Install python virtualenv"
-virtualenv python-env
-./python-env/bin/pip install cffi==1.6.0 pyserial==3.2.1 greenlet==0.4.10
+cd ${MAIN_DIR}
+virtualenv ${BUILD_DIR}/python-env
+${BUILD_DIR}/python-env/bin/pip install cffi==1.6.0 pyserial==3.2.1 greenlet==0.4.10