Skip to content

Commit

Permalink
Merge pull request meta-toolkit#75 from 31z4/develop
Browse files Browse the repository at this point in the history
Add Vagrantfile
  • Loading branch information
smassung committed Mar 25, 2015
2 parents 21d424f + ef8d004 commit 230e52c
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
22 changes: 22 additions & 0 deletions contrib/vagrant/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Vagrant

Build the latest version of the MeTA toolkit using [Vagrant](https://www.vagrantup.com/). Ubuntu 14.04 is used as a base Vagrant box. This project was initially made for [Text Retrieval and Search Engines](https://www.coursera.org/course/textretrieval) Coursera course.

## Instructions

1. Install Vagrant
2. Run Vagrant
```
vagrant up
```
3. Check that everything is OK
```
vagrant ssh
cd meta/build
ctest --output-on-failure
```
## Notes
Only VirtualBox provider was tested.
11 changes: 11 additions & 0 deletions contrib/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provision :shell, path: "bootstrap.sh", privileged: false

config.vm.provider "virtualbox" do |v|
v.cpus = 2
end
end
31 changes: 31 additions & 0 deletions contrib/vagrant/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# this might take a while
sudo apt-get update
sudo apt-get install -y software-properties-common

# add the ppa for cmake
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
sudo apt-get update

# install dependencies
sudo apt-get install -y cmake libicu-dev git g++ g++-4.8

# clone the project
git clone https://github.com/meta-toolkit/meta.git
cd meta/

# uncomment to build exact version
# git reset --hard v1.3.2

# set up submodules
git submodule update --init --recursive

# set up a build directory
mkdir build
cd build
cp ../config.toml .

# configure and build the project
cmake ../ -DCMAKE_BUILD_TYPE=Release
make

0 comments on commit 230e52c

Please sign in to comment.