Skip to content

Instantly share code, notes, and snippets.

@vheon
Created January 24, 2016 18:00
Show Gist options
  • Save vheon/1e43fb45cb90e1fae928 to your computer and use it in GitHub Desktop.
Save vheon/1e43fb45cb90e1fae928 to your computer and use it in GitHub Desktop.
Vagrant file for ycmd dev
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure( VAGRANTFILE_API_VERSION ) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 8000, host: 8000
config.vm.synced_folder ".", "/home/vagrant/ycmd", type: "rsync",
# default value but without the "--delete" argument
# so the host can keep the libclang archive and builded binaries
rsync__args: [ "--verbose", "--archive", "-z", "--copy-links" ],
rsync__exclude: [ ".git/", "ycm_core.so", "ycm_client_support.so", "libclang.dylib" ]
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
config.vm.provision "shell", inline: <<-SHELL
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo add-apt-repository ppa:ermshiperete/monodevelop
sudo apt-get update -yq
sudo apt-get install -y build-essential cmake
sudo apt-get install -y python-pip python2.7 python2.7-dev
sudo apt-get install -y monodevelop-current mono-xbuild mono-complete
sudo apt-get install -y golang
sudo apt-get install -y nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
npm install -g typescript
pushd ycmd
sudo pip install -U pip wheel setuptools
sudo pip install -r test_requirements.txt
sudo pip install coverage
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment