Skip to content

Commit 28c8950

Browse files
authored
Merge pull request libgit2#4394 from libgit2/cmn/macos-ramdisk
travis: put clar's sandbox in a ramdisk on macOS
2 parents 1082eab + 71ba464 commit 28c8950

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

script/cibuild.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ fi
1010

1111
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
1212
export PKG_CONFIG_PATH=$(ls -d /usr/local/Cellar/{curl,zlib}/*/lib/pkgconfig | paste -s -d':' -)
13+
14+
# Set up a ramdisk for us to put our test data on to speed up tests on macOS
15+
export CLAR_TMP="$HOME"/_clar_tmp
16+
mkdir -p $CLAR_TMP
17+
18+
# 5*2M sectors aka ~5GB of space
19+
device=$(hdiutil attach -nomount ram://$((5 * 2 * 1024 * 1024)))
20+
newfs_hfs $device
21+
mount -t hfs $device $CLAR_TMP
1322
fi
1423

1524
# Should we ask Travis to cache this file?

0 commit comments

Comments
 (0)