mirror of https://github.com/mono/CppSharp.git
Browse Source
- Setup for ubuntu_x64. - Clone and Compile of Llvm. - Separate settings file to configure vm locations (min recomended memory 8gb). Removed old Vagrantfile no longer relevant.pull/516/head
3 changed files with 139 additions and 52 deletions
@ -1,52 +0,0 @@
@@ -1,52 +0,0 @@
|
||||
# -*- 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 = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" |
||||
|
||||
# Disable automatic box update checking. If you disable this, then |
||||
# boxes will only be checked for updates when the user runs |
||||
# `vagrant box outdated`. This is not recommended. |
||||
# config.vm.box_check_update = false |
||||
|
||||
# Create a public network, which generally matched to bridged network. |
||||
# Bridged networks make the machine appear as another physical device on |
||||
# your network. |
||||
config.vm.network "public_network", ip: "192.168.1.20" |
||||
|
||||
# If true, then any SSH connections made will enable agent forwarding. |
||||
# Default value: false |
||||
# config.ssh.forward_agent = true |
||||
|
||||
# Share an additional folder to the guest VM. The first argument is |
||||
# the path on the host to the actual folder. The second argument is |
||||
# the path on the guest to mount the folder. And the optional third |
||||
# argument is a set of non-required options. |
||||
# config.vm.synced_folder "../data", "/vagrant_data" |
||||
|
||||
config.vm.provider :virtualbox do |vb| |
||||
vb.customize ["modifyvm", :id, "--memory", 4096] |
||||
vb.customize ["modifyvm", :id, "--cpus", 4] |
||||
end |
||||
|
||||
config.vm.provision "shell", inline: <<SCRIPT |
||||
# Build tools |
||||
apt-get install -y git build-essential clang cmake ninja-build |
||||
apt-get install -y mono-runtime mono-gmcs |
||||
|
||||
# Java runtime to run TeamCity build agent |
||||
apt-get install -y openjdk-7-jre-headless unzip |
||||
|
||||
# Get build agent from TC server and unpack in /var/TeamCity |
||||
(cd ~/; wget http://192.168.1.110/update/buildAgent.zip) |
||||
(cd /var; mkdir TeamCity; cd TeamCity) |
||||
unzip ~/buildAgent.zip |
||||
(cd bin; chmod +x agent.sh) |
||||
(cd ../conf; cp buildAgent.dist.properties buildAgent.properties) |
||||
sed -i 's/localhost/192\.168\.1\.110/' buildAgent.properties |
||||
sed -i 's/name=/name=Linux agent/' buildAgent.properties |
||||
SCRIPT |
||||
end |
@ -0,0 +1,132 @@
@@ -0,0 +1,132 @@
|
||||
# -*- mode: ruby -*- |
||||
# vi: set ft=ruby : |
||||
|
||||
#Shell Scripts go here |
||||
$script = <<SCRIPT |
||||
SCRIPT |
||||
|
||||
# All Vagrant configuration is done below. The "2" in Vagrant.configure |
||||
# configures the configuration version (we support older styles for |
||||
# backwards compatibility). Please don't change it unless you know what |
||||
# you're doing. |
||||
Vagrant.configure(2) do |config| |
||||
# The most common configuration options are documented and commented below. |
||||
# For a complete reference, please see the online documentation at |
||||
# https://docs.vagrantup.com. |
||||
|
||||
# Every Vagrant development environment requires a box. You can search for |
||||
# boxes at https://atlas.hashicorp.com/search. |
||||
config.vm.box = "ubuntu/trusty64" |
||||
|
||||
# Disable automatic box update checking. If you disable this, then |
||||
# boxes will only be checked for updates when the user runs |
||||
# `vagrant box outdated`. This is not recommended. |
||||
# config.vm.box_check_update = false |
||||
|
||||
#load external box config |
||||
external = File.read 'vmsettings.cfg' |
||||
eval external |
||||
|
||||
# Create a forwarded port mapping which allows access to a specific port |
||||
# within the machine from a port on the host machine. In the example below, |
||||
# accessing "localhost:8080" will access port 80 on the guest machine. |
||||
# config.vm.network "forwarded_port", guest: 80, host: 8080 |
||||
|
||||
# Create a private network, which allows host-only access to the machine |
||||
# using a specific IP. |
||||
# config.vm.network "private_network", ip: "192.168.33.10" |
||||
|
||||
# Create a public network, which generally matched to bridged network. |
||||
# Bridged networks make the machine appear as another physical device on |
||||
# your network. |
||||
# config.vm.network "public_network" |
||||
|
||||
# Share an additional folder to the guest VM. The first argument is |
||||
# the path on the host to the actual folder. The second argument is |
||||
# the path on the guest to mount the folder. And the optional third |
||||
# argument is a set of non-required options. |
||||
# config.vm.synced_folder "../data", "/vagrant_data" |
||||
|
||||
# Provider-specific configuration so you can fine-tune various |
||||
# backing providers for Vagrant. These expose provider-specific options. |
||||
# Example for VirtualBox: |
||||
# |
||||
# config.vm.provider "virtualbox" do |vb| |
||||
# # Display the VirtualBox GUI when booting the machine |
||||
# vb.gui = true |
||||
# |
||||
# # Customize the amount of memory on the VM: |
||||
# vb.memory = "1024" |
||||
# end |
||||
# |
||||
# View the documentation for the provider you are using for more |
||||
# information on available options. |
||||
|
||||
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies |
||||
# such as FTP and Heroku are also available. See the documentation at |
||||
# https://docs.vagrantup.com/v2/push/atlas.html for more information. |
||||
# config.push.define "atlas" do |push| |
||||
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" |
||||
# end |
||||
|
||||
# Enable provisioning with a shell script. Additional provisioners such as |
||||
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the |
||||
# documentation for more information about their specific syntax and use. |
||||
|
||||
|
||||
# this function fixes errors with ubuntu interactive shell |
||||
config.vm.provision "fix-no-tty", type: "shell" do |s| |
||||
s.privileged = false |
||||
s.inline = "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile" |
||||
end |
||||
|
||||
#this section runs as root |
||||
config.vm.provision "shell", privileged: true , inline: <<-SHELL |
||||
|
||||
# Add Repos |
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF |
||||
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list |
||||
|
||||
sudo add-apt-repository ppa:george-edison55/cmake-3.x |
||||
apt-get update |
||||
|
||||
# Build tools |
||||
apt-get install -y git build-essential clang cmake ninja-build |
||||
|
||||
# Mono |
||||
apt-get install -y mono-devel |
||||
|
||||
SHELL |
||||
|
||||
#this section runs as normal user |
||||
config.vm.provision "shell", privileged: false , inline: <<-SHELL |
||||
function mkcd () { mkdir -p "$@" && cd "$@"; } |
||||
|
||||
git clone https://github.com/mono/CppSharp.git |
||||
|
||||
cd CppSharp/deps/ |
||||
|
||||
git clone https://github.com/llvm-mirror/llvm.git |
||||
|
||||
cd llvm/ |
||||
|
||||
#change this hash if u need another version of Llvm |
||||
git reset --hard 0e8abfa6ed986c892ec723236e32e78fd9c47b8 |
||||
|
||||
cd tools/ |
||||
|
||||
git clone https://github.com/llvm-mirror/clang.git |
||||
|
||||
cd clang/ |
||||
|
||||
#change this hash if u need another version of Clang |
||||
git reset --hard 3457cd5516ac741fa106623d9578f5ac88593f4d |
||||
|
||||
mkcd ../../build |
||||
|
||||
cmake -G Ninja -DCLANG_BUILD_EXAMPLES=false -DCLANG_INCLUDE_DOCS=false -DCLANG_INCLUDE_TESTS=false -DCLANG_INCLUDE_DOCS=false -DCLANG_BUILD_EXAMPLES=false -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_INCLUDE_EXAMPLES=false -DLLVM_INCLUDE_DOCS=false -DLLVM_INCLUDE_TESTS=false .. |
||||
|
||||
ninja |
||||
|
||||
SHELL |
||||
end |
Loading…
Reference in new issue