Skip to content

Instantly share code, notes, and snippets.

@ezzatron
Last active August 29, 2015 14:07
Show Gist options
  • Save ezzatron/89c7e9c4fe8a16e5a486 to your computer and use it in GitHub Desktop.
Save ezzatron/89c7e9c4fe8a16e5a486 to your computer and use it in GitHub Desktop.
HHVM CLI test box
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.provision "shell", inline: <<-shell
echo "Installing apt packages"
apt-get install curl git python-software-properties screen vim -y --force-yes
echo "Installing HHVM"
add-apt-repository ppa:mapnik/boost
wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add -
echo deb http://dl.hhvm.com/ubuntu precise main | sudo tee /etc/apt/sources.list.d/hhvm.list
apt-get update
apt-get install hhvm-nightly -y --force-yes
echo "Installing Composer"
sudo curl -sS https://getcomposer.org/composer.phar > composer
sudo chmod +x composer
sudo mv composer /usr/local/bin/composer
echo "Installing PHPUnit"
sudo curl -sS https://phar.phpunit.de/phpunit.phar > phpunit
sudo chmod +x phpunit
sudo mv phpunit /usr/local/bin/phpunit
echo "Setting up Bash aliases"
echo 'alias composer="hhvm -v ResourceLimit.SocketDefaultTimeout=30 -v Http.SlowQueryThreshold=30000 /usr/local/bin/composer"' > ~/.bash_profile
shell
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment