mirror of
https://github.com/libgit2/libgit2.git
synced 2026-01-25 02:56:17 +00:00
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.
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user