Skip to content

Commit 37bb151

Browse files
committed
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.
1 parent 990d2b8 commit 37bb151

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+
# 2M sectors aka ~1GB of space
19+
device=$(hdiutil attach -nomount ram://$((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)