Configure a ram disk for ~/.hishtory/ to make sqlite run faster

This commit is contained in:
David Dworken 2023-09-02 17:33:02 -07:00
parent 58c791b662
commit 96446eb62c
No known key found for this signature in database

View File

@ -24,13 +24,28 @@ jobs:
- name: Go test
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
run: |
# Install our dependencies
sudo apt-get update || true
sudo apt-get install -y zsh tmux fish || true
brew install fish tmux bash || true
export TZ='America/Los_Angeles' # Force the time zone so that test output is consistent
sudo chmod 0755 -R /usr/share/zsh/ || true # Work around a weird bug where zsh on ubuntu actions gives that diretory 0777 which makes zsh refuse to start
sudo hostname ghaction-runner-hostname || true # Set a consistent hostname so we can run tests that depend on it
# Force the time zone so that test output is consistent
export TZ='America/Los_Angeles'
# Work around a weird bug where zsh on ubuntu actions gives that directory 0777 which makes zsh refuse to start
sudo chmod 0755 -R /usr/share/zsh/ || true
# Set a consistent hostname so we can run tests that depend on it
sudo hostname ghaction-runner-hostname || true
sudo scutil --set HostName ghaction-runner-hostname || true
# Set up a tmpfs for ~/.hishtory/ to help tests run faster
mkdir ~/.hishtory/
mount -F tmpfs -o size=500M swap ~/.hishtory/ || true
diskutil apfs create $(hdiutil attach -nomount ram://1024000) RAMDisk || true
mount -o noatime -t apfs /Volumes/RAMDisk ~/.hishtory/
# Run the tests
make test
# - name: Setup tmate session
# if: ${{ failure() }}