mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-02 10:23:25 +08:00
Vagrant: compile wxpython in home for resolute and future releases switch to excluding older versions to avoid needing to change this when making new releases
168 lines
6.9 KiB
Ruby
168 lines
6.9 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
# Testing an ArduPilot VM:
|
|
# rm -rf /vagrant/build
|
|
# dpkg -l | grep modemmanager
|
|
# sim_vehicle.py --map --console # in the starting directory should start a Copter simulation
|
|
# sim_vehicle.py --debug --gdb
|
|
# sim_vehicle.py --debug --valgrind
|
|
#
|
|
# Make testing rather faster:
|
|
# time rsync -aPH /vagrant/ $HOME/ardupilot --exclude=/build/ --delete-excluded # real 50s
|
|
# time (cd $HOME/ardupilot && ./waf configure --board=fmuv2 && ./waf build --target=bin/ardusub) # ~4 minutes
|
|
# time (cd $HOME/ardupilot && ./waf configure --board=fmuv3 && ./waf build --target=bin/ardusub) # ~4 minutes (after building fmuv2)
|
|
# time (cd $HOME/ardupilot && ./waf configure --board=navio2 && ./waf build --target=bin/arduplane) # ~6 minutes
|
|
# time (cd $HOME/ardupilot && ./Tools/autotest/sim_vehicle.py --map --console -v ArduPlane -f jsbsim) # should test JSBSim
|
|
# time (cd $HOME/ardupilot && ./Tools/autotest/autotest.py build.Rover test.Rover)
|
|
|
|
# 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.ssh.forward_x11 = true
|
|
|
|
# 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|
|
|
# Don't boot with headless mode
|
|
# vb.gui = true
|
|
#
|
|
# # Use VBoxManage to customize the VM. For example to change memory:
|
|
vb.customize ["modifyvm", :id, "--memory", "3192"]
|
|
vb.customize ["modifyvm", :id, "--ioapic", "on"]
|
|
vb.customize ["modifyvm", :id, "--cpus", "2"]
|
|
# Make some effort to avoid clock skew
|
|
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", "5000"]
|
|
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-start"]
|
|
vb.customize ["guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-on-restore", "1"]
|
|
end
|
|
|
|
# If you are on Windows then you must use a version of git >= 1.8.x
|
|
# to update the submodules in order to build. Older versions of git
|
|
# use absolute paths for submodules which confuses things.
|
|
|
|
# removing this line causes "A box must be specified." error
|
|
# and this is the default box that will be booted if no name is specified
|
|
config.vm.boot_timeout = 1500
|
|
|
|
# Ubuntu releases: https://releases.ubuntu.com
|
|
# https://ubuntu.com/about/release-cycle -- Try here first and then fall back to:
|
|
# https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions
|
|
|
|
# 22.04 LTS Standard Support EOL May 2027
|
|
config.vm.define "autotest-server", primary: true do |autotest|
|
|
autotest.vm.box = "ubuntu/jammy64"
|
|
autotest.vm.provision :shell, path: "Tools/vagrant/initvagrant-autotest-server.sh"
|
|
autotest.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (autotest-server)"
|
|
end
|
|
autotest.vm.boot_timeout = 1200
|
|
end
|
|
|
|
# 22.04 LTS Standard Support EOL May 2027
|
|
config.vm.define "jammy", primary: true do |jammy|
|
|
jammy.vm.box = "ubuntu/jammy64"
|
|
jammy.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh"
|
|
jammy.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (jammy)"
|
|
end
|
|
jammy.vm.boot_timeout = 1200
|
|
end
|
|
config.vm.define "jammy-desktop", autostart: false do |jammy|
|
|
jammy.vm.box = "ubuntu/jammy64"
|
|
jammy.vm.provision :shell, path: "Tools/vagrant/initvagrant-desktop.sh"
|
|
jammy.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (jammy-desktop)"
|
|
vb.gui = true
|
|
end
|
|
jammy.vm.boot_timeout = 1200
|
|
end
|
|
|
|
# 24.04 LTS Standard Support EOL May 2029
|
|
# note the use of "bento" here; Ubuntu stopped providing Vagrant
|
|
# images due to Hashicorp adopting the "Business Source License".
|
|
config.vm.define "noble", autostart: false do |noble|
|
|
noble.vm.box = "bento/ubuntu-24.04"
|
|
noble.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh"
|
|
noble.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (noble)"
|
|
end
|
|
noble.vm.boot_timeout = 1200
|
|
end
|
|
config.vm.define "noble-desktop", autostart: false do |noble|
|
|
noble.vm.box = "bento/ubuntu-24.04"
|
|
noble.vm.provision :shell, path: "Tools/vagrant/initvagrant-desktop.sh"
|
|
noble.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (noble-desktop)"
|
|
vb.gui = true
|
|
end
|
|
noble.vm.boot_timeout = 1200
|
|
end
|
|
|
|
# 25.04 Standard Support EOL Jan 2026
|
|
# note the use of "alvistack" here; Ubuntu stopped providing Vagrant
|
|
# images due to Hashicorp adopting the "Business Source License".
|
|
config.vm.define "plucky", autostart: false do |plucky|
|
|
plucky.vm.box = "alvistack/ubuntu-25.04"
|
|
plucky.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh"
|
|
plucky.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (plucky)"
|
|
end
|
|
plucky.vm.boot_timeout = 1200
|
|
end
|
|
config.vm.define "plucky-desktop", autostart: false do |plucky|
|
|
plucky.vm.box = "alvistack/ubuntu-25.04"
|
|
plucky.vm.provision :shell, path: "Tools/vagrant/initvagrant-desktop.sh"
|
|
plucky.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (plucky-desktop)"
|
|
vb.gui = true
|
|
end
|
|
plucky.vm.boot_timeout = 1200
|
|
end
|
|
|
|
# 25.10 Standard Support EOL Jul 2026
|
|
# note the use of "alvistack" here; Ubuntu stopped providing Vagrant
|
|
# images due to Hashicorp adopting the "Business Source License".
|
|
config.vm.define "questing", autostart: false do |questing|
|
|
questing.vm.box = "alvistack/ubuntu-25.10"
|
|
questing.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh"
|
|
questing.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (questing)"
|
|
end
|
|
questing.vm.boot_timeout = 1200
|
|
end
|
|
config.vm.define "questing-desktop", autostart: false do |questing|
|
|
questing.vm.box = "alvistack/ubuntu-25.10"
|
|
questing.vm.provision :shell, path: "Tools/vagrant/initvagrant-desktop.sh"
|
|
questing.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (questing-desktop)"
|
|
vb.gui = true
|
|
end
|
|
questing.vm.boot_timeout = 1200
|
|
end
|
|
|
|
# 26.04 LTS EOL Jul 2031
|
|
# note the use of "bento" here; Ubuntu stopped providing Vagrant
|
|
# images due to Hashicorp adopting the "Business Source License".
|
|
config.vm.define "resolute", autostart: false do |resolute|
|
|
resolute.vm.box = "bento/ubuntu-26.04"
|
|
resolute.vm.provision :shell, path: "Tools/vagrant/initvagrant.sh"
|
|
resolute.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (resolute)"
|
|
end
|
|
resolute.vm.boot_timeout = 1200
|
|
end
|
|
config.vm.define "resolute-desktop", autostart: false do |resolute|
|
|
resolute.vm.box = "bento/ubuntu-26.04"
|
|
resolute.vm.provision :shell, path: "Tools/vagrant/initvagrant-desktop.sh"
|
|
resolute.vm.provider "virtualbox" do |vb|
|
|
vb.name = "ArduPilot (resolute-desktop)"
|
|
vb.gui = true
|
|
end
|
|
resolute.vm.boot_timeout = 1200
|
|
end
|
|
end
|