Vagrantfile 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby ts=2 sts=2 sw=2 et :
  3. # All Vagrant configuration is done below. The "2" in Vagrant.configure
  4. # configures the configuration version (we support older styles for
  5. # backwards compatibility). Please don't change it unless you know what
  6. # you're doing.
  7. Vagrant.configure("2") do |config|
  8. # Every Vagrant development environment requires a box. You can search for
  9. # boxes at https://atlas.hashicorp.com/search.
  10. config.vm.box = "ubuntu/trusty64"
  11. config.vm.provider "lxc" do |lxc, override|
  12. override.vm.box = "fgrehm/trusty64-lxc"
  13. end
  14. #
  15. # mass-define "generic" Ubuntu boxes
  16. #
  17. %w{5.1 5.2 5.4 5.7 5.8 5.9}.each { |version|
  18. config.vm.define "v8-#{version}" do |i|
  19. i.vm.synced_folder ".", "/data/v8js"
  20. i.vm.provision "shell", inline: <<-SHELL
  21. gpg --keyserver keys.gnupg.net --recv 7F438280EF8D349F
  22. gpg --armor --export 7F438280EF8D349F | apt-key add -
  23. apt-get update
  24. apt-get install -y software-properties-common gdb tmux git tig curl apache2-utils
  25. add-apt-repository ppa:ondrej/php
  26. add-apt-repository ppa:pinepain/libv8-#{version}
  27. apt-get update
  28. apt-get install -y php7.1-dev libv8-#{version}-dbg libv8-#{version}-dev
  29. SHELL
  30. end
  31. }
  32. #
  33. # Fedora-based box with GCC7, V8 5.2 + PHP 7.1 installed
  34. # (primarily to reproduce #294)
  35. #
  36. config.vm.define "fedora-26-gcc7" do |i|
  37. i.vm.box = "vbenes/fedora-rawhide-server"
  38. i.ssh.insert_key = false
  39. # unfortunately vboxsf isn't currently available (due to an issue with the base image)
  40. # therefore fall back to nfs
  41. i.vm.synced_folder ".", "/data/v8js", type: "nfs"
  42. i.vm.network "private_network", ip: "192.168.50.2"
  43. i.vm.provision "shell", inline: <<-SHELL
  44. dnf -y update
  45. dnf -y install gcc-c++ gdb tmux git tig curl vim
  46. dnf -y install v8-devel php-devel
  47. SHELL
  48. end
  49. #
  50. # FreeBSD 11.0 box
  51. # (compiles V8 5.1.281.47 with Gyp; using port from https://raw.githubusercontent.com/Kronuz/Xapiand/master/contrib/freebsd/v8.shar)
  52. #
  53. config.vm.define "freebsd-11" do |i|
  54. i.vm.box = "freebsd/FreeBSD-11.0-RELEASE-p1"
  55. i.ssh.shell = "/bin/sh"
  56. # vboxsf doesn't work on FreeBSD (yet), use nfs
  57. i.vm.synced_folder ".", "/data/v8js", type: "nfs"
  58. i.vm.network "private_network", type: "dhcp"
  59. i.vm.provision "shell", inline: <<-SHELL
  60. pkg install -y git python bash gmake icu gdb tmux git tig curl vim autoconf php70
  61. portsnap auto --interactive
  62. mkdir -p /data && cd /data
  63. [ -x v8 ] || curl https://raw.githubusercontent.com/Kronuz/Xapiand/master/contrib/freebsd/v8.shar | sh
  64. cd /data/v8
  65. make install
  66. SHELL
  67. end
  68. config.vm.provision "shell", inline: <<-SHELL
  69. mkdir -p /data/build && chown vagrant:vagrant /data/build
  70. SHELL
  71. end