From 5360b7de7e1646c7535ec308a9160ec37289e084 Mon Sep 17 00:00:00 2001 From: David Rautureau Date: Tue, 1 Aug 2017 13:51:37 +0200 Subject: [PATCH] BUILD-478 Set TRAVIS_BUILD_DIR in ramdisk --- .travis/setup_ramdisk.sh | 17 +++++++++-------- travis.sh | 2 ++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.travis/setup_ramdisk.sh b/.travis/setup_ramdisk.sh index 1ac8f5b158d..75e2492d9cd 100755 --- a/.travis/setup_ramdisk.sh +++ b/.travis/setup_ramdisk.sh @@ -7,15 +7,16 @@ printf "${RED}SETUP RAMDISK${NC}\n" printf "${RED}disk size before build${NC}\n" df -h du -sh $HOME +du -sh $TRAVIS_BUILD_DIR -printf "${RED}move original home${NC}\n" -sudo mv /home/travis /home/travis.ori +printf "${RED}move original TRAVIS_BUILD_DIR${NC}\n" +sudo mv $TRAVIS_BUILD_DIR $TRAVIS_BUILD_DIR.ori printf "${RED}create ramdisk mount point${NC}\n" -sudo mkdir -p /home/travis +sudo mkdir -p $TRAVIS_BUILD_DIR printf "${RED}create ramdisk${NC}\n" -sudo mount -t tmpfs -o size=8192m tmps /home/travis -printf "${RED}copy home to ramdisk${NC}\n" -time sudo cp -R /home/travis.ori/. /home/travis -printf "${RED}give permissions to travis on its home in ramdisk${NC}\n" -sudo chown -R travis:travis /home/travis +sudo mount -t tmpfs -o size=8192m tmps $TRAVIS_BUILD_DIR +printf "${RED}copy TRAVIS_BUILD_DIR to ramdisk${NC}\n" +time sudo cp -R $TRAVIS_BUILD_DIR.ori/. $TRAVIS_BUILD_DIR +printf "${RED}give permissions to travis on its TRAVIS_BUILD_DIR in ramdisk${NC}\n" +sudo chown -R travis:travis $TRAVIS_BUILD_DIR diff --git a/travis.sh b/travis.sh index 88f412a4a57..0cc60cad32c 100755 --- a/travis.sh +++ b/travis.sh @@ -1,6 +1,8 @@ #!/bin/bash set -euo pipefail +./.travis/setup_ramdisk.sh + # # A (too) old version of JDK8 is installed by default on Travis. # This method is preferred over Travis apt oracle-java8-installer because -- 2.39.5