summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2017-10-31 10:40:24 +0100
committerCarlos Martín Nieto <cmn@dwim.me>2017-10-31 11:08:09 +0100
commit37bb15122e30bb13aabc213079da53b5cdac2678 (patch)
tree2b3c6dc24cb7ddbd26afa9141ac2727eaa2b1c3e /script
parent990d2b854ab7eef28dd09209f77ff95d8e6a4ca2 (diff)
downloadlibgit2-37bb15122e30bb13aabc213079da53b5cdac2678.tar.gz
travis: put clar's sandbox in a ramdisk on macOS
The macOS tests are by far the slowest right now. This attempts to remedy the situation somewhat by asking clar to put its test data on a ramdisk.
Diffstat (limited to 'script')
-rwxr-xr-xscript/cibuild.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/script/cibuild.sh b/script/cibuild.sh
index 74946db0a..283acbf5b 100755
--- a/script/cibuild.sh
+++ b/script/cibuild.sh
@@ -10,6 +10,15 @@ fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export PKG_CONFIG_PATH=$(ls -d /usr/local/Cellar/{curl,zlib}/*/lib/pkgconfig | paste -s -d':' -)
+
+ # Set up a ramdisk for us to put our test data on to speed up tests on macOS
+ export CLAR_TMP="$HOME"/_clar_tmp
+ mkdir -p $CLAR_TMP
+
+ # 2M sectors aka ~1GB of space
+ device=$(hdiutil attach -nomount ram://$((2 * 1024 * 1024)))
+ newfs_hfs $device
+ mount -t hfs $device $CLAR_TMP
fi
# Should we ask Travis to cache this file?