19585338fSAzat Khuzhin# -*- mode: ruby -*- 29585338fSAzat Khuzhin# vi: set ft=ruby : 39585338fSAzat Khuzhin 49585338fSAzat Khuzhin# DESCRIPTION: 59585338fSAzat Khuzhin# ============ 69585338fSAzat Khuzhin# Vagrant for running libevent tests with: 79585338fSAzat Khuzhin# - timeout 30min, to avoid hungs 89585338fSAzat Khuzhin# - run tests in parallel under ctest (10 concurency) 99585338fSAzat Khuzhin# - if you have uncommited changes, you should commit them first to check 109585338fSAzat Khuzhin# - unix only, because of some tar'ing to avoid one vm affect another 119585338fSAzat Khuzhin# 129585338fSAzat Khuzhin# ENVIRONMENT: 139585338fSAzat Khuzhin# ============ 149585338fSAzat Khuzhin# - NO_PKG -- do not install packages 159585338fSAzat Khuzhin# - NO_CMAKE -- do not run with cmake 169585338fSAzat Khuzhin# - NO_AUTOTOOLS -- do not run with autoconf/automake 179585338fSAzat Khuzhin 189585338fSAzat KhuzhinVagrant.configure("2") do |config| 199585338fSAzat Khuzhin # to allow running boxes provisions in parallel, we can't share the same dirs 209585338fSAzat Khuzhin # via virtualbox, however sometimes it is the only way, so instead let's 219585338fSAzat Khuzhin # create an archive of HEAD (this way we will not have any trash there) and 229585338fSAzat Khuzhin # extract it for every box to the separate folder. 239585338fSAzat Khuzhin # 249585338fSAzat Khuzhin # P.S. we will change this --prefix with tar(1) --trasnform 259585338fSAzat Khuzhin system('git archive --prefix=libevent/ --output=.vagrant/libevent.tar HEAD') 269585338fSAzat Khuzhin 279585338fSAzat Khuzhin config.vm.provider "virtualbox" do |vb| 289585338fSAzat Khuzhin vb.memory = "512" 299585338fSAzat Khuzhin 309585338fSAzat Khuzhin # otherwise osx fails, anyway we do not need this 319585338fSAzat Khuzhin vb.customize ["modifyvm", :id, "--usb", "off"] 329585338fSAzat Khuzhin vb.customize ["modifyvm", :id, "--usbehci", "off"] 339585338fSAzat Khuzhin end 349585338fSAzat Khuzhin 359585338fSAzat Khuzhin # disable /vagrant share, in case we will not use default mount 369585338fSAzat Khuzhin config.vm.synced_folder ".", "/vagrant", disabled: true 379585338fSAzat Khuzhin 389585338fSAzat Khuzhin config.vm.define "ubuntu" do |ubuntu| 399585338fSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-linux/ -xf .vagrant/libevent.tar -C .vagrant/') 409585338fSAzat Khuzhin 419585338fSAzat Khuzhin ubuntu.vm.box = "ubuntu/xenial64" 429585338fSAzat Khuzhin ubuntu.vm.synced_folder ".vagrant/libevent-linux", "/vagrant", 439585338fSAzat Khuzhin type: "rsync" 449585338fSAzat Khuzhin 459585338fSAzat Khuzhin if ENV['NO_PKG'] != "true" 469585338fSAzat Khuzhin ubuntu.vm.provision "shell", inline: <<-SHELL 479585338fSAzat Khuzhin apt-get update 489585338fSAzat Khuzhin apt-get install -y zlib1g-dev libssl-dev python2.7 499585338fSAzat Khuzhin apt-get install -y build-essential cmake ninja-build 509585338fSAzat Khuzhin apt-get install -y autoconf automake libtool 519585338fSAzat Khuzhin SHELL 529585338fSAzat Khuzhin end 539585338fSAzat Khuzhin 549585338fSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 559585338fSAzat Khuzhin ubuntu.vm.provision "shell", privileged: false, inline: <<-SHELL 569585338fSAzat Khuzhin cd /vagrant 579585338fSAzat Khuzhin rm -fr .cmake-vagrant 589585338fSAzat Khuzhin mkdir -p .cmake-vagrant 599585338fSAzat Khuzhin cd .cmake-vagrant 609585338fSAzat Khuzhin cmake -G Ninja .. 619585338fSAzat Khuzhin 629585338fSAzat Khuzhin export CTEST_TEST_TIMEOUT=1800 639585338fSAzat Khuzhin export CTEST_OUTPUT_ON_FAILURE=1 649585338fSAzat Khuzhin export CTEST_PARALLEL_LEVEL=20 659585338fSAzat Khuzhin cmake --build . --target verify 669585338fSAzat Khuzhin SHELL 679585338fSAzat Khuzhin end 689585338fSAzat Khuzhin 699585338fSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 709585338fSAzat Khuzhin ubuntu.vm.provision "shell", privileged: false, inline: <<-SHELL 719585338fSAzat Khuzhin cd /vagrant 729585338fSAzat Khuzhin ./autogen.sh 739585338fSAzat Khuzhin ./configure 749585338fSAzat Khuzhin make -j20 verify 759585338fSAzat Khuzhin SHELL 769585338fSAzat Khuzhin end 779585338fSAzat Khuzhin end 789585338fSAzat Khuzhin 799585338fSAzat Khuzhin config.vm.define "freebsd" do |freebsd| 809585338fSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-freebsd/ -xf .vagrant/libevent.tar -C .vagrant/') 819585338fSAzat Khuzhin 829585338fSAzat Khuzhin freebsd.vm.box = "freebsd/FreeBSD-11.0-STABLE" 839585338fSAzat Khuzhin freebsd.vm.synced_folder ".vagrant/libevent-freebsd", "/vagrant", 849585338fSAzat Khuzhin type: "rsync", group: "wheel" 859585338fSAzat Khuzhin 869585338fSAzat Khuzhin # otherwise reports error 879585338fSAzat Khuzhin freebsd.ssh.shell = "sh" 889585338fSAzat Khuzhin 899585338fSAzat Khuzhin if ENV['NO_PKG'] != "true" 909585338fSAzat Khuzhin freebsd.vm.provision "shell", inline: <<-SHELL 919585338fSAzat Khuzhin pkg install --yes openssl cmake ninja automake autotools 929585338fSAzat Khuzhin SHELL 939585338fSAzat Khuzhin end 949585338fSAzat Khuzhin 959585338fSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 969585338fSAzat Khuzhin freebsd.vm.provision "shell", privileged: false, inline: <<-SHELL 979585338fSAzat Khuzhin cd /vagrant 989585338fSAzat Khuzhin rm -fr .cmake-vagrant 999585338fSAzat Khuzhin mkdir -p .cmake-vagrant 1009585338fSAzat Khuzhin cd .cmake-vagrant 1019585338fSAzat Khuzhin cmake -G Ninja .. 1029585338fSAzat Khuzhin 1039585338fSAzat Khuzhin export CTEST_TEST_TIMEOUT=1800 1049585338fSAzat Khuzhin export CTEST_OUTPUT_ON_FAILURE=1 1059585338fSAzat Khuzhin export CTEST_PARALLEL_LEVEL=20 1069585338fSAzat Khuzhin cmake --build . --target verify 1079585338fSAzat Khuzhin SHELL 1089585338fSAzat Khuzhin end 1099585338fSAzat Khuzhin 1109585338fSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 1119585338fSAzat Khuzhin freebsd.vm.provision "shell", privileged: false, inline: <<-SHELL 1129585338fSAzat Khuzhin cd /vagrant 1139585338fSAzat Khuzhin ./autogen.sh 1149585338fSAzat Khuzhin ./configure 1159585338fSAzat Khuzhin make -j20 verify 1169585338fSAzat Khuzhin SHELL 1179585338fSAzat Khuzhin end 1189585338fSAzat Khuzhin end 1199585338fSAzat Khuzhin 1209585338fSAzat Khuzhin config.vm.define "netbsd" do |netbsd| 1219585338fSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-netbsd/ -xf .vagrant/libevent.tar -C .vagrant/') 1229585338fSAzat Khuzhin 1239585338fSAzat Khuzhin netbsd.vm.box = "kja/netbsd-7-amd64" 1249585338fSAzat Khuzhin netbsd.vm.synced_folder ".vagrant/libevent-netbsd", "/vagrant", 1259585338fSAzat Khuzhin type: "rsync", group: "wheel" 1269585338fSAzat Khuzhin 1279585338fSAzat Khuzhin if ENV['NO_PKG'] != "true" 1289585338fSAzat Khuzhin netbsd.vm.provision "shell", inline: <<-SHELL 12936da6877SAzat Khuzhin export PKG_PATH="ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/x86_64/7.0_2016Q2/All/" 130*9c9be399SAzat Khuzhin pkg_add ncurses ninja-build automake cmake libtool 1319585338fSAzat Khuzhin SHELL 1329585338fSAzat Khuzhin end 1339585338fSAzat Khuzhin 1349585338fSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 1359585338fSAzat Khuzhin netbsd.vm.provision "shell", privileged: false, inline: <<-SHELL 1369585338fSAzat Khuzhin cd /vagrant 1379585338fSAzat Khuzhin rm -fr .cmake-vagrant 1389585338fSAzat Khuzhin mkdir -p .cmake-vagrant 1399585338fSAzat Khuzhin cd .cmake-vagrant 1409585338fSAzat Khuzhin cmake -G Ninja .. 1419585338fSAzat Khuzhin 1429585338fSAzat Khuzhin export CTEST_TEST_TIMEOUT=1800 1439585338fSAzat Khuzhin export CTEST_OUTPUT_ON_FAILURE=1 1449585338fSAzat Khuzhin export CTEST_PARALLEL_LEVEL=20 1459585338fSAzat Khuzhin cmake --build . --target verify 1469585338fSAzat Khuzhin SHELL 1479585338fSAzat Khuzhin end 1489585338fSAzat Khuzhin 1499585338fSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 1509585338fSAzat Khuzhin netbsd.vm.provision "shell", privileged: false, inline: <<-SHELL 1519585338fSAzat Khuzhin cd /vagrant 1529585338fSAzat Khuzhin ./autogen.sh 1539585338fSAzat Khuzhin ./configure 1549585338fSAzat Khuzhin make -j20 verify 1559585338fSAzat Khuzhin SHELL 1569585338fSAzat Khuzhin end 1579585338fSAzat Khuzhin end 1589585338fSAzat Khuzhin 1599585338fSAzat Khuzhin config.vm.define "solaris" do |solaris| 1609585338fSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-solaris/ -xf .vagrant/libevent.tar -C .vagrant/') 1619585338fSAzat Khuzhin 1629585338fSAzat Khuzhin # XXX: 1639585338fSAzat Khuzhin # - solaris do not have '-or' it only has '-o' for find(1), so we can't use 1649585338fSAzat Khuzhin # rsync 1659585338fSAzat Khuzhin # - and autoconf(1) doesn't work on virtualbox share, ugh 1669585338fSAzat Khuzhin solaris.vm.synced_folder ".vagrant/libevent-solaris", "/vagrant-vbox", 1679585338fSAzat Khuzhin type: "virtualbox" 1689585338fSAzat Khuzhin 1699585338fSAzat Khuzhin solaris.vm.box = "tnarik/solaris10-minimal" 1709585338fSAzat Khuzhin if ENV['NO_PKG'] != "true" 1719585338fSAzat Khuzhin # TODO: opencsw does not include ninja(1) 1729585338fSAzat Khuzhin solaris.vm.provision "shell", inline: <<-SHELL 1739585338fSAzat Khuzhin pkgadd -d http://get.opencsw.org/now 1749585338fSAzat Khuzhin pkgutil -U 1759585338fSAzat Khuzhin pkgutil -y -i libssl_dev cmake rsync python gmake gcc5core automake autoconf libtool 1769585338fSAzat Khuzhin SHELL 1779585338fSAzat Khuzhin end 1789585338fSAzat Khuzhin 1799585338fSAzat Khuzhin # copy from virtualbox mount to newly created folder 1809585338fSAzat Khuzhin solaris.vm.provision "shell", privileged: false, inline: <<-SHELL 1819585338fSAzat Khuzhin rm -fr ~/vagrant 1829585338fSAzat Khuzhin cp -r /vagrant-vbox ~/vagrant 1839585338fSAzat Khuzhin SHELL 1849585338fSAzat Khuzhin 1859585338fSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 1869585338fSAzat Khuzhin # builtin compiler cc(1) is a wrapper, so we should use gcc5 manually, 1879585338fSAzat Khuzhin # otherwise it will not work. 1889585338fSAzat Khuzhin # Plus we should set some paths so that cmake/compiler can find tham. 1899585338fSAzat Khuzhin solaris.vm.provision "shell", privileged: false, inline: <<-SHELL 1909585338fSAzat Khuzhin export CMAKE_INCLUDE_PATH=/opt/csw/include 1919585338fSAzat Khuzhin export CMAKE_LIBRARY_PATH=/opt/csw/lib 1929585338fSAzat Khuzhin export CFLAGS=-I$CMAKE_INCLUDE_PATH 1939585338fSAzat Khuzhin export LDFLAGS=-L$CMAKE_LIBRARY_PATH 1949585338fSAzat Khuzhin 1959585338fSAzat Khuzhin cd ~/vagrant 1969585338fSAzat Khuzhin rm -rf .cmake-vagrant 1979585338fSAzat Khuzhin mkdir -p .cmake-vagrant 1989585338fSAzat Khuzhin cd .cmake-vagrant 1999585338fSAzat Khuzhin cmake -DCMAKE_C_COMPILER=gcc .. 2009585338fSAzat Khuzhin 2019585338fSAzat Khuzhin export CTEST_TEST_TIMEOUT=1800 2029585338fSAzat Khuzhin export CTEST_OUTPUT_ON_FAILURE=1 2039585338fSAzat Khuzhin export CTEST_PARALLEL_LEVEL=20 2049585338fSAzat Khuzhin cmake --build . --target verify 2059585338fSAzat Khuzhin SHELL 2069585338fSAzat Khuzhin end 2079585338fSAzat Khuzhin 2089585338fSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 2099585338fSAzat Khuzhin # and we should set MAKE for `configure` otherwise it will try to use 2109585338fSAzat Khuzhin # `make` 2119585338fSAzat Khuzhin solaris.vm.provision "shell", privileged: false, inline: <<-SHELL 2129585338fSAzat Khuzhin cd ~/vagrant 2139585338fSAzat Khuzhin ./autogen.sh 2149585338fSAzat Khuzhin MAKE=gmake ./configure 2159585338fSAzat Khuzhin gmake -j20 verify 2169585338fSAzat Khuzhin SHELL 2179585338fSAzat Khuzhin end 2189585338fSAzat Khuzhin end 2199585338fSAzat Khuzhin 2209585338fSAzat Khuzhin # known failures: 2219585338fSAzat Khuzhin # - sometimes vm hangs 2229585338fSAzat Khuzhin config.vm.define "osx" do |osx| 2239585338fSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-osx/ -xf .vagrant/libevent.tar -C .vagrant/') 2249585338fSAzat Khuzhin 2259585338fSAzat Khuzhin osx.vm.synced_folder ".vagrant/libevent-osx", "/vagrant", 2269585338fSAzat Khuzhin type: "rsync", group: "wheel" 2279585338fSAzat Khuzhin 2289585338fSAzat Khuzhin osx.vm.box = "jhcook/osx-elcapitan-10.11" 2299585338fSAzat Khuzhin if ENV['NO_PKG'] != "true" 2309585338fSAzat Khuzhin osx.vm.provision "shell", privileged: false, inline: <<-SHELL 2319585338fSAzat Khuzhin ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 2329585338fSAzat Khuzhin 2339585338fSAzat Khuzhin brew uninstall libtool 2349585338fSAzat Khuzhin brew install libtool openssl ninja cmake autoconf automake 2359585338fSAzat Khuzhin SHELL 2369585338fSAzat Khuzhin end 2379585338fSAzat Khuzhin 2389585338fSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 2399585338fSAzat Khuzhin # we should set some paths so that cmake/compiler can find tham 2409585338fSAzat Khuzhin osx.vm.provision "shell", privileged: false, inline: <<-SHELL 2419585338fSAzat Khuzhin export OPENSSL_ROOT=$(echo /usr/local/Cellar/openssl/*) 2429585338fSAzat Khuzhin export CMAKE_INCLUDE_PATH=$OPENSSL_ROOT/include 2439585338fSAzat Khuzhin export CMAKE_LIBRARY_PATH=$OPENSSL_ROOT/lib 2449585338fSAzat Khuzhin 2459585338fSAzat Khuzhin cd /vagrant 2469585338fSAzat Khuzhin mkdir -p .cmake-vagrant 2479585338fSAzat Khuzhin cd .cmake-vagrant 2489585338fSAzat Khuzhin cmake -G Ninja .. 2499585338fSAzat Khuzhin 2509585338fSAzat Khuzhin export CTEST_TEST_TIMEOUT=1800 2519585338fSAzat Khuzhin export CTEST_OUTPUT_ON_FAILURE=1 2529585338fSAzat Khuzhin export CTEST_PARALLEL_LEVEL=20 2539585338fSAzat Khuzhin cmake --build . --target verify 2549585338fSAzat Khuzhin SHELL 2559585338fSAzat Khuzhin end 2569585338fSAzat Khuzhin 2579585338fSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 2589585338fSAzat Khuzhin osx.vm.provision "shell", privileged: false, inline: <<-SHELL 2599585338fSAzat Khuzhin export OPENSSL_ROOT=$(echo /usr/local/Cellar/openssl/*) 2609585338fSAzat Khuzhin export CFLAGS=-I$OPENSSL_ROOT/include 2619585338fSAzat Khuzhin export LDFLAGS=-L$OPENSSL_ROOT/lib 2629585338fSAzat Khuzhin 2639585338fSAzat Khuzhin cd /vagrant 2649585338fSAzat Khuzhin ./autogen.sh 2659585338fSAzat Khuzhin ./configure 266f7c70aefSAzat Khuzhin make -j20 verify 2679585338fSAzat Khuzhin SHELL 2689585338fSAzat Khuzhin end 2699585338fSAzat Khuzhin end 2709585338fSAzat Khuzhin 271ca591c5bSAzat Khuzhin config.vm.define "centos" do |centos| 272ca591c5bSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-centos/ -xf .vagrant/libevent.tar -C .vagrant/') 273ca591c5bSAzat Khuzhin 274ca591c5bSAzat Khuzhin centos.vm.synced_folder ".vagrant/libevent-centos", "/vagrant", 275ca591c5bSAzat Khuzhin type: "rsync", group: "wheel" 276ca591c5bSAzat Khuzhin 277ca591c5bSAzat Khuzhin centos.vm.box = "centos/7" 278ca591c5bSAzat Khuzhin if ENV['NO_PKG'] != "true" 279ca591c5bSAzat Khuzhin centos.vm.provision "shell", inline: <<-SHELL 280ca591c5bSAzat Khuzhin echo "[russianfedora]" > /etc/yum.repos.d/russianfedora.repo 281ca591c5bSAzat Khuzhin echo name=russianfedora >> /etc/yum.repos.d/russianfedora.repo 282ca591c5bSAzat Khuzhin echo baseurl=http://mirror.yandex.ru/fedora/russianfedora/russianfedora/free/el/releases/7/Everything/x86_64/os/ >> /etc/yum.repos.d/russianfedora.repo 283ca591c5bSAzat Khuzhin echo enabled=1 >> /etc/yum.repos.d/russianfedora.repo 284ca591c5bSAzat Khuzhin echo gpgcheck=0 >> /etc/yum.repos.d/russianfedora.repo 285ca591c5bSAzat Khuzhin SHELL 286ca591c5bSAzat Khuzhin centos.vm.provision "shell", inline: <<-SHELL 287ca591c5bSAzat Khuzhin yum -y install zlib-devel openssl-devel python 288ca591c5bSAzat Khuzhin yum -y install gcc cmake ninja-build 289ca591c5bSAzat Khuzhin yum -y install autoconf automake libtool 290ca591c5bSAzat Khuzhin SHELL 291ca591c5bSAzat Khuzhin end 292ca591c5bSAzat Khuzhin 293ca591c5bSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 294ca591c5bSAzat Khuzhin centos.vm.provision "shell", privileged: false, inline: <<-SHELL 295ca591c5bSAzat Khuzhin cd /vagrant 296ca591c5bSAzat Khuzhin rm -fr .cmake-vagrant 297ca591c5bSAzat Khuzhin mkdir -p .cmake-vagrant 298ca591c5bSAzat Khuzhin cd .cmake-vagrant 299ca591c5bSAzat Khuzhin cmake -G Ninja .. 300ca591c5bSAzat Khuzhin 301ca591c5bSAzat Khuzhin export CTEST_TEST_TIMEOUT=1800 302ca591c5bSAzat Khuzhin export CTEST_OUTPUT_ON_FAILURE=1 303ca591c5bSAzat Khuzhin export CTEST_PARALLEL_LEVEL=20 304ca591c5bSAzat Khuzhin cmake --build . --target verify 305ca591c5bSAzat Khuzhin SHELL 306ca591c5bSAzat Khuzhin end 307ca591c5bSAzat Khuzhin 308ca591c5bSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 309ca591c5bSAzat Khuzhin centos.vm.provision "shell", privileged: false, inline: <<-SHELL 310ca591c5bSAzat Khuzhin cd /vagrant 311ca591c5bSAzat Khuzhin ./autogen.sh 312ca591c5bSAzat Khuzhin ./configure 313ca591c5bSAzat Khuzhin make -j20 verify 314ca591c5bSAzat Khuzhin SHELL 315ca591c5bSAzat Khuzhin end 316ca591c5bSAzat Khuzhin end 317ca591c5bSAzat Khuzhin 3189585338fSAzat Khuzhin # known failures: 3199585338fSAzat Khuzhin # - issues with timers (not enough allowed error) 3209585338fSAzat Khuzhin config.vm.define "win" do |win| 3219585338fSAzat Khuzhin system('tar --overwrite --transform=s/libevent/libevent-win/ -xf .vagrant/libevent.tar -C .vagrant/') 3229585338fSAzat Khuzhin 3239585338fSAzat Khuzhin # 512MB not enough after libtool install, huh 3249585338fSAzat Khuzhin win.vm.provider "virtualbox" do |vb| 3259585338fSAzat Khuzhin vb.memory = "1024" 3269585338fSAzat Khuzhin end 3279585338fSAzat Khuzhin 3289585338fSAzat Khuzhin # windows does not have rsync builtin, let's use virtualbox for now 3299585338fSAzat Khuzhin win.vm.synced_folder ".vagrant/libevent-win", "/vagrant", 3309585338fSAzat Khuzhin type: "virtualbox" 3319585338fSAzat Khuzhin 3329585338fSAzat Khuzhin win.vm.box = "senglin/win-10-enterprise-vs2015community" 3339585338fSAzat Khuzhin if ENV['NO_PKG'] != "true" 3349585338fSAzat Khuzhin # box with vs2015 does not have C++ support, so let's install it manually 3359585338fSAzat Khuzhin # plus chocolatey that includes in this box, can't handle sha1 checksum for 3369585338fSAzat Khuzhin # cmake.install, so let's update it< 3379585338fSAzat Khuzhin win.vm.provision "shell", inline: <<-SHELL 3389585338fSAzat Khuzhin choco upgrade -y chocolatey -pre -f 3399585338fSAzat Khuzhin choco install -y VisualStudioCommunity2013 3409585338fSAzat Khuzhin choco install -y openssl.light 3419585338fSAzat Khuzhin choco install -y cygwin cyg-get 3429585338fSAzat Khuzhin choco install -y cmake 3439585338fSAzat Khuzhin choco install -y cmake.install 3449585338fSAzat Khuzhin choco install -y python2 3459585338fSAzat Khuzhin SHELL 3469585338fSAzat Khuzhin 3479585338fSAzat Khuzhin # chocolatey openssl.light package does not contains headers 3489585338fSAzat Khuzhin win.vm.provision "shell", inline: <<-SHELL 3499585338fSAzat Khuzhin (new-object System.Net.WebClient).DownloadFile('http://strcpy.net/packages/Win32OpenSSL-1_0_2a.exe', '/openssl.exe') 3509585338fSAzat Khuzhin /openssl.exe /silent /verysilent /sp- /suppressmsgboxes 3519585338fSAzat Khuzhin SHELL 3529585338fSAzat Khuzhin 3539585338fSAzat Khuzhin # XXX: 3549585338fSAzat Khuzhin # - cyg-get depends from cygwinsetup.exe 3559585338fSAzat Khuzhin # https://github.com/chocolatey/chocolatey-coreteampackages/issues/200 3569585338fSAzat Khuzhin # - cyg-get only downloads, do not installs them, ugh. so let's do not use 3579585338fSAzat Khuzhin # it 3589585338fSAzat Khuzhin win.vm.provision "shell", privileged: false, inline: <<-SHELL 3599585338fSAzat Khuzhin (new-object System.Net.WebClient).DownloadFile('https://cygwin.com/setup-x86_64.exe', '/tools/cygwin/cygwinsetup.exe') 3609585338fSAzat Khuzhin 3619585338fSAzat Khuzhin $env:PATH="/tools/cygwin/bin;$($env:PATH);/tools/cygwin" 3629585338fSAzat Khuzhin 3639585338fSAzat Khuzhin cygwinsetup --root c:/tools/cygwin/ --local-package-dir c:/tools/cygwin/packages/ --no-desktop --no-startmenu --verbose --quiet-mode --download --packages automake,autoconf,gcc-core,libtool,make,python,openssl-devel 3649585338fSAzat Khuzhin cygwinsetup --root c:/tools/cygwin/ --local-package-dir c:/tools/cygwin/packages/ --no-desktop --no-startmenu --verbose --quiet-mode --local-install --packages automake,autoconf,gcc-core,libtool,make,python,openssl-devel 3659585338fSAzat Khuzhin SHELL 3669585338fSAzat Khuzhin end 3679585338fSAzat Khuzhin 3689585338fSAzat Khuzhin if ENV['NO_CMAKE'] != "true" 3699585338fSAzat Khuzhin win.vm.provision "shell", privileged: false, inline: <<-SHELL 3709585338fSAzat Khuzhin $env:PATH="/Program Files/CMake/bin;/tools/python2;$($env:PATH)" 3719585338fSAzat Khuzhin 3729585338fSAzat Khuzhin cd /vagrant 3739585338fSAzat Khuzhin Remove-Item -Recurse -Force .cmake-vagrant 3749585338fSAzat Khuzhin mkdir -p .cmake-vagrant 3759585338fSAzat Khuzhin cd .cmake-vagrant 3769585338fSAzat Khuzhin cmake -G "Visual Studio 12" .. 3779585338fSAzat Khuzhin 3789585338fSAzat Khuzhin $env:CTEST_TEST_TIMEOUT = "1800" 3799585338fSAzat Khuzhin $env:CTEST_OUTPUT_ON_FAILURE = "1" 3809585338fSAzat Khuzhin $env:CTEST_PARALLEL_LEVEL = "10" 3819585338fSAzat Khuzhin cmake --build . --target verify 3829585338fSAzat Khuzhin SHELL 3839585338fSAzat Khuzhin end 3849585338fSAzat Khuzhin 3859585338fSAzat Khuzhin if ENV['NO_AUTOTOOLS'] != "true" 3869585338fSAzat Khuzhin win.vm.provision "shell", privileged: false, inline: <<-SHELL 3879585338fSAzat Khuzhin $env:PATH="/tools/cygwin/bin;$($env:PATH)" 3889585338fSAzat Khuzhin 3899585338fSAzat Khuzhin bash -lc "echo 'C:/tools/mingw64 /mingw ntfs binary 0 0' > /etc/fstab" 3909585338fSAzat Khuzhin bash -lc "echo 'C:/OpenSSL-Win32 /ssl ntfs binary 0 0' >> /etc/fstab" 3919585338fSAzat Khuzhin bash -lc "echo 'C:/vagrant /vagrant ntfs binary 0 0' >> /etc/fstab" 3929585338fSAzat Khuzhin 3939585338fSAzat Khuzhin bash -lc "exec 0</dev/null; exec 2>&1; cd /vagrant; bash -x ./autogen.sh && ./configure LDFLAGS='-L/ssl -L/ssl/lib -L/ssl/lib/MinGW' CFLAGS=-I/ssl/include && make -j20 verify" 3949585338fSAzat Khuzhin SHELL 3959585338fSAzat Khuzhin end 3969585338fSAzat Khuzhin end 3979585338fSAzat Khuzhinend 398