mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-18 21:17:55 +08:00
e6cabdece5
* start 2021-04-16 process Major new things: * update to macOS Big Sur (11.*) * switch from VirtualBox to Parallels due to ^ (and also ARM) Minor new things: * update from xcode CLT 12 to 12.4 This PR includes new stuff for creating the base box for parallels. Still to do: using the new box type. * update the vagrantfile stuff * link the CI to the new version * modify how macOS boxes are made the Vagrantfile for the final VM will only download the azure pipeline stuff this allows us to keep the versions of brew applications stable * fix cpus and memory * add vagrant plugins to installables * Skip cppgraphqlgen ICE. * [sdformat6] Remove unneeded include(FindBoost) which causes problems when the system cmake version doesn't match the one deployed by vcpkg. * switch to dmg for installing osxfuse/sshfs * Set cores to 11 (leaving 1 thread for host) Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
69 lines
1.9 KiB
Ruby
69 lines
1.9 KiB
Ruby
require 'json'
|
|
|
|
configuration = JSON.parse(File.read("#{__dir__}/vagrant-configuration.json"))
|
|
|
|
server = {
|
|
:hostname => configuration['machine_name'],
|
|
:box => configuration['box_name'],
|
|
:box_version => configuration['box_version'],
|
|
:ram => 12000,
|
|
:cpu => 11
|
|
}
|
|
|
|
azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.185.1/vsts-agent-osx-x64-2.185.1.tar.gz'
|
|
devops_url = configuration['devops_url']
|
|
agent_pool = configuration['agent_pool']
|
|
pat = configuration['pat']
|
|
|
|
Vagrant.configure('2') do |config|
|
|
config.vm.box = server[:box]
|
|
config.vm.box_version = server[:box_version]
|
|
config.vm.hostname = server[:hostname]
|
|
config.vm.synced_folder '.', '/vagrant', disabled: true
|
|
|
|
config.vm.provider 'parallels' do |prl|
|
|
prl.memory = server[:ram]
|
|
prl.cpus = server[:cpu]
|
|
end
|
|
|
|
config.vm.provision 'shell',
|
|
run: 'once',
|
|
name: 'Create the data directory',
|
|
inline: "mkdir ~/Data",
|
|
privileged: false
|
|
|
|
config.vm.provision 'shell',
|
|
run: 'once',
|
|
name: 'Download azure agent',
|
|
inline: "curl -s -o ~/Downloads/azure-agent.tar.gz #{azure_agent_url}",
|
|
privileged: false
|
|
|
|
config.vm.provision 'shell',
|
|
run: 'once',
|
|
name: 'Unpack azure agent',
|
|
inline: 'mkdir myagent; cd myagent; tar xf ~/Downloads/azure-agent.tar.gz',
|
|
privileged: false
|
|
|
|
config.vm.provision 'shell',
|
|
run: 'once',
|
|
name: 'Add VM to azure agent pool',
|
|
inline: "cd ~/myagent;\
|
|
./config.sh --unattended \
|
|
--url #{devops_url} \
|
|
--work ~/Data/work \
|
|
--auth pat --token #{pat} \
|
|
--pool #{agent_pool} \
|
|
--agent `hostname` \
|
|
--replace \
|
|
--acceptTeeEula",
|
|
privileged: false
|
|
|
|
# Start listening for jobs
|
|
config.vm.provision 'shell',
|
|
run: 'always',
|
|
name: 'Start running azure pipelines',
|
|
inline: 'cd /Users/vagrant/myagent;\
|
|
nohup ./run.sh&',
|
|
privileged: false
|
|
end
|