mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 22:01:37 +08:00
[macos ci] update to 2022-01-03 (#22314)
* [macos ci] update to 2022-01-03 * update the instructions * forgot to update azure-pipelines-osx.yml * install parallels in Install-Prerequisites.ps1 * oops * fix ace, libsoundio, and libpqxx * tensorflow doesn't yet support macOS 12
This commit is contained in:
parent
964e75806b
commit
5edd518dc3
31
ports/ace/fix-macos-12.patch
Normal file
31
ports/ace/fix-macos-12.patch
Normal file
@ -0,0 +1,31 @@
|
||||
--- /dev/null
|
||||
+++ b/include/makeinclude/platform_macosx_monterey.GNU
|
||||
@@ -0,0 +1,2 @@
|
||||
+include $(ACE_ROOT)/include/makeinclude/platform_macosx_bigsur.GNU
|
||||
+
|
||||
|
||||
--- a/include/makeinclude/platform_macosx.GNU
|
||||
+++ b/include/makeinclude/platform_macosx.GNU
|
||||
@@ -24,6 +24,9 @@
|
||||
MACOS_CODENAME_VER_11_1 := bigsur
|
||||
MACOS_CODENAME_VER_11_2 := bigsur
|
||||
MACOS_CODENAME_VER_11_latest := bigsur
|
||||
+MACOS_CODENAME_VER_12_0 := monterey
|
||||
+MACOS_CODENAME_VER_12_1 := monterey
|
||||
+MACOS_CODENAME_VER_12_latest := monterey
|
||||
|
||||
MACOS_CODENAME = $(MACOS_CODENAME_VER_$(MACOS_MAJOR_VERSION)_$(MACOS_MINOR_VERSION))
|
||||
|
||||
@@ -42,6 +45,12 @@ else ifeq ($(MACOS_MAJOR_VERSION), 11)
|
||||
## just use the latest known version
|
||||
MACOS_CODENAME = $(MACOS_CODENAME_VER_11_latest)
|
||||
endif
|
||||
+else ifeq ($(MACOS_MAJOR_VERSION),12)
|
||||
+ ifeq ($(shell test $(MACOS_MINOR_VERSION) -gt 1; echo $$?),0)
|
||||
+ ## if the detected version is greater than the latest know version,
|
||||
+ ## just use the latest known version
|
||||
+ MACOS_CODENAME = $(MACOS_CODENAME_VER_12_latest)
|
||||
+ endif
|
||||
else
|
||||
## Unsupported major version
|
||||
$(error Unsupported MacOS version $(MACOS_RELEASE_VERSION))
|
@ -13,7 +13,6 @@ if("tao" IN_LIST FEATURES)
|
||||
SHA512 3ea0cc7b35433d7c41f51137caacd394a976cf4d5c2972a35015901b3ba172bacff0216a3146bf632b929a63853b7123019382c22d14c6d64e43a71a61b88023
|
||||
)
|
||||
else()
|
||||
# VCPKG_TARGET_IS_LINUX
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE%2BTAO-src-${ACE_VERSION}.tar.gz"
|
||||
FILENAME ACE-TAO-${ACE_VERSION}.tar.gz
|
||||
@ -28,8 +27,7 @@ else()
|
||||
FILENAME ACE-src-${ACE_VERSION}.zip
|
||||
SHA512 73707c92a0533ab60f090cfb620d508755b8267e2b83fb52d9903c4d780d2e2b504545433fdbe34801d4895cf938ecc5a5f26c34528851080bcce07f5a501ac1
|
||||
)
|
||||
else(VCPKG_TARGET_IS_WINDOWS)
|
||||
# VCPKG_TARGET_IS_LINUX
|
||||
else()
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/DOCGroup/ACE_TAO/releases/download/ACE%2BTAO-${ACE_VERSION_DIRECTORY}/ACE-src-${ACE_VERSION}.tar.gz"
|
||||
FILENAME ACE-src-${ACE_VERSION}.tar.gz
|
||||
@ -41,6 +39,8 @@ endif()
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
PATCHES
|
||||
fix-macos-12.patch
|
||||
)
|
||||
|
||||
set(ACE_ROOT ${SOURCE_PATH})
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ace",
|
||||
"version": "7.0.5",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"maintainers": "Johnny Willemsen <jwillemsen@remedy.nl>",
|
||||
"description": "The ADAPTIVE Communication Environment",
|
||||
"homepage": "https://www.dre.vanderbilt.edu/~schmidt/ACE.html",
|
||||
|
15
ports/libpqxx/fix_build_with_apple_clang_13.patch
Normal file
15
ports/libpqxx/fix_build_with_apple_clang_13.patch
Normal file
@ -0,0 +1,15 @@
|
||||
# apple clang 13 has a bug where [[likely]] or [[unlikely]] returns
|
||||
# don't count for checking that a constexpr function has a return,
|
||||
# so at least one return must be unmarked
|
||||
--- a/src/robusttransaction.cxx
|
||||
+++ b/src/robusttransaction.cxx
|
||||
@@ -62,9 +62,8 @@ constexpr tx_stat parse_status(std::string_view text) noexcept
|
||||
case 'i':
|
||||
if (text == in_progress)
|
||||
PQXX_LIKELY return tx_in_progress;
|
||||
break;
|
||||
}
|
||||
- PQXX_UNLIKELY
|
||||
return tx_unknown;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix_build_with_vs2017.patch
|
||||
fix_build_with_apple_clang_13.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/config-public-compiler.h.in" DESTINATION "${SOURCE_PATH}")
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "libpqxx",
|
||||
"version-semver": "7.6.0",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "The official C++ client API for PostgreSQL",
|
||||
"homepage": "https://www.postgresql.org/",
|
||||
"dependencies": [
|
||||
|
@ -19,7 +19,16 @@ index 6541f1b..e81bdce 100644
|
||||
endif()
|
||||
|
||||
if(BUILD_STATIC_LIBS)
|
||||
@@ -243,9 +245,26 @@ if(BUILD_STATIC_LIBS)
|
||||
@@ -204,8 +206,7 @@ if(MSVC)
|
||||
set(EXAMPLE_CFLAGS "/W4")
|
||||
set(TEST_CFLAGS "${LIB_CFLAGS}")
|
||||
set(TEST_LDFLAGS " ")
|
||||
set(LIBM " ")
|
||||
else()
|
||||
- set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror -pedantic")
|
||||
set(LIB_CFLAGS "-std=c11 -fvisibility=hidden -Wall -Werror=strict-prototypes -Werror=old-style-definition -Werror=missing-prototypes -D_REENTRANT -D_POSIX_C_SOURCE=200809L -Wno-missing-braces")
|
||||
set(EXAMPLE_CFLAGS "-std=c99 -Wall")
|
||||
@@ -243,9 +244,26 @@ if(BUILD_STATIC_LIBS)
|
||||
COMPILE_FLAGS ${LIB_CFLAGS}
|
||||
LINKER_LANGUAGE C
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "libsoundio",
|
||||
"version": "2.0.0",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "libsoundio is C library providing cross-platform audio input and output.",
|
||||
"homepage": "http://libsound.io/",
|
||||
"supports": "!uwp",
|
||||
|
@ -2,7 +2,7 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
variables:
|
||||
osx-pool: 'PrOsx-2021-07-27'
|
||||
osx-pool: 'PrOsx-2022-01-03'
|
||||
|
||||
jobs:
|
||||
- template: osx/azure-pipelines.yml
|
||||
|
@ -4,7 +4,7 @@
|
||||
variables:
|
||||
windows-pool: 'PrWin-2021-12-14'
|
||||
linux-pool: 'PrLin-2021-12-13'
|
||||
osx-pool: 'PrOsx-2021-07-27'
|
||||
osx-pool: 'PrOsx-2022-01-03'
|
||||
|
||||
jobs:
|
||||
- template: windows/azure-pipelines.yml
|
||||
|
@ -1,68 +0,0 @@
|
||||
#!pwsh
|
||||
#Requires -Version 6.0
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Installs the base box at the specified version from the share.
|
||||
|
||||
.PARAMETER FileshareMachine
|
||||
The machine which is acting as a fileshare
|
||||
|
||||
.PARAMETER BoxVersion
|
||||
The version of the box to add. Defaults to latest if nothing is passed.
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$True)]
|
||||
[String]$FileshareMachine,
|
||||
|
||||
[Parameter()]
|
||||
[String]$BoxVersion
|
||||
)
|
||||
|
||||
Set-StrictMode -Version 2
|
||||
|
||||
if (-not $IsMacOS) {
|
||||
throw 'This script should only be run on a macOS host'
|
||||
}
|
||||
|
||||
$mountPoint = '/Users/vcpkg/vagrant/share'
|
||||
|
||||
if (mount | grep "on $mountPoint (") {
|
||||
umount $mountPoint
|
||||
if (-not $?) {
|
||||
Write-Error "umount $mountPoint failed with return code $LASTEXITCODE."
|
||||
throw
|
||||
}
|
||||
}
|
||||
|
||||
sshfs "fileshare@${FileshareMachine}:/Users/fileshare/share" $mountPoint
|
||||
if ($LASTEXITCODE -eq 1) {
|
||||
Write-Error 'sshfs returned 1.
|
||||
This means that the osxfuse kernel extension was not allowed to load.
|
||||
You may need to force un/reinstall osxfuse and/or sshfs with
|
||||
brew uninstall osxfuse
|
||||
brew uninstall sshfs
|
||||
brew install osxfuse
|
||||
brew install sshfs
|
||||
Then, rerun this script.
|
||||
|
||||
If you''ve already done that, Please open
|
||||
System Preferences > Security & Privacy > General,
|
||||
and allow the kernel extension to load.
|
||||
Then, rerun this script.
|
||||
|
||||
If you''ve already done this, you probably need to add your ssh keys to the fileshare machine.'
|
||||
throw
|
||||
} elseif (-not $?) {
|
||||
Write-Error "sshfs failed with return code $LASTEXITCODE."
|
||||
throw
|
||||
}
|
||||
|
||||
if (-not [String]::IsNullOrEmpty($BoxVersion)) {
|
||||
$versionArgs = @("--box-version", $BoxVersion)
|
||||
} else {
|
||||
$versionArgs = @()
|
||||
}
|
||||
|
||||
vagrant box add "$mountPoint/vcpkg-boxes/macos-ci.json" @versionArgs
|
@ -65,8 +65,19 @@ Installing anyways."
|
||||
Get-RemoteFile -OutFile $pathToDmg -Uri $_.DmgUrl -Sha256 $_.Sha256
|
||||
|
||||
hdiutil attach $pathToDmg -mountpoint /Volumes/setup-installer
|
||||
sudo installer -pkg "/Volumes/setup-installer/$($_.InstallerPath)" -target /
|
||||
hdiutil detach /Volumes/setup-installer
|
||||
|
||||
if ($null -ne (Get-Member -InputObject $_ -Name 'InstallationCommands')) {
|
||||
$_.InstallationCommands | % {
|
||||
Write-Host "> $($_ -join ' ')"
|
||||
& $_[0] $_[1..$_.Length] | Write-Host
|
||||
}
|
||||
} elseif ($null -ne (Get-Member -InputObject $_ -Name 'InstallerPath')) {
|
||||
sudo installer -pkg "/Volumes/setup-installer/$($_.InstallerPath)" -target /
|
||||
hdiutil detach /Volumes/setup-installer
|
||||
} else {
|
||||
Write-Error "$($_.Name) installer object has a DmgUrl, but neither an InstallerPath nor an InstallationCommands"
|
||||
throw
|
||||
}
|
||||
} elseif ($null -ne (Get-Member -InputObject $_ -Name 'PkgUrl')) {
|
||||
$pathToPkg = "~/Downloads/$($_.Name).pkg"
|
||||
Get-RemoteFile -OutFile $pathToPkg -Uri $_.PkgUrl -Sha256 $_.Sha256
|
||||
@ -78,21 +89,6 @@ Installing anyways."
|
||||
}
|
||||
}
|
||||
|
||||
$Installables.Brew | ForEach-Object {
|
||||
$installable = $_
|
||||
if ($null -eq (Get-Member -InputObject $installable -Name 'Kind')) {
|
||||
brew install $installable.Name
|
||||
} else {
|
||||
switch ($installable.Kind) {
|
||||
'cask' { brew install --cask $installable.Name }
|
||||
default {
|
||||
Write-Error "Invalid kind: $_. Expected either empty, or 'cask'."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
brew upgrade
|
||||
|
||||
$installedVagrantPlugins = @{}
|
||||
vagrant plugin list --machine-readable | ForEach-Object {
|
||||
$timestamp, $target, $type, $data = $_ -split ','
|
||||
|
@ -5,102 +5,30 @@
|
||||
- [`vcpkg-eg-mac` VMs](#vcpkg-eg-mac-vms)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Basic Usage](#basic-usage)
|
||||
- [Creating a new Vagrant box](#creating-a-new-vagrant-box)
|
||||
- [VM Software Versions](#vm-software-versions)
|
||||
- [Creating a New Azure Agent Pool](#creating-a-new-azure-agent-pool)
|
||||
- [Running the VM](#running-the-vm)
|
||||
- [Getting an Azure Pipelines PAT](#getting-an-azure-pipelines-pat)
|
||||
- [Setting up a new macOS machine](#setting-up-a-new-macos-machine)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [Creating a new Vagrant box](#creating-a-new-vagrant-box)
|
||||
- [VM Software Versions](#vm-software-versions)
|
||||
- [(Internal) Accessing the macOS fileshare](#internal-accessing-the-macos-fileshare)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [(Internal) Accessing the macOS fileshare](#internal-accessing-the-macos-fileshare)
|
||||
|
||||
## Basic Usage
|
||||
|
||||
The simplest usage, and one which should be used for when spinning up
|
||||
new VMs, and when restarting old ones, is a simple:
|
||||
The most common operation here is to set up a new VM for Azure
|
||||
pipelines; we try to make that operation as easy as possible.
|
||||
It should take all of three steps, assuming the machine is
|
||||
already set up (or read [these instructions] for how to set up a machine):
|
||||
|
||||
```
|
||||
$ cd ~/vagrant/vcpkg-eg-mac
|
||||
$ vagrant up
|
||||
```
|
||||
1. [Create a new vagrant box](#creating-a-new-vagrant-box)
|
||||
2. [Create a new agent pool](#creating-a-new-azure-agent-pool)
|
||||
3. [Setup and run the vagrant VM](#running-the-vm)
|
||||
4. Update `azure-pipelines.yml` and `azure-pipelines-osx.yml` to point to the new macOS pool.
|
||||
|
||||
Any modifications to the machines should be made in `configuration/Vagrantfile`
|
||||
and `Setup-VagrantMachines.ps1`, and make sure to push any changes!
|
||||
[these instructions]: #setting-up-a-new-macos-machine
|
||||
|
||||
## Setting up a new macOS machine
|
||||
|
||||
Before anything else, one must download `brew` and `powershell`.
|
||||
|
||||
```sh
|
||||
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
$ brew cask install powershell
|
||||
```
|
||||
|
||||
Then, we need to download the `vcpkg` repository:
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/microsoft/vcpkg
|
||||
```
|
||||
|
||||
Then, we need to mint an SSH key:
|
||||
|
||||
```sh
|
||||
$ ssh-keygen
|
||||
$ cat .ssh/id_rsa.pub
|
||||
```
|
||||
|
||||
Add that SSH key to `authorized_keys` on the file share machine with the base box.
|
||||
|
||||
Next, install prerequisites and grab the current base box with:
|
||||
```sh
|
||||
$ cd vcpkg/scripts/azure-pipelines/osx
|
||||
$ ./Install-Prerequisites.ps1 -Force
|
||||
$ ./Get-InternalBaseBox.ps1 -FileshareMachine vcpkgmm-01.guest.corp.microsoft.com -BoxVersion 2020-09-28
|
||||
```
|
||||
|
||||
... where -BoxVersion is the version you want to use.
|
||||
|
||||
Getting the base box will fail due to missing kernel modules for osxfuse, sshfs, and/or VirtualBox.
|
||||
Log in to the machine, open System Preferences > Security & Privacy > General, and allow the kernel
|
||||
extensions for VirtualBox and sshfs to load. Then, again:
|
||||
|
||||
```sh
|
||||
$ ./Get-InternalBaseBox.ps1 -FileshareMachine vcpkgmm-01.guest.corp.microsoft.com -BoxVersion 2020-09-28
|
||||
```
|
||||
|
||||
Replace `XX` with the number of
|
||||
the virtual machine. Generally, that should be the same as the number
|
||||
for the physical machine; i.e., vcpkgmm-04 would use 04.
|
||||
|
||||
```sh
|
||||
# NOTE: you may get an error about CoreCLR; see the following paragraph if you do
|
||||
$ ./Setup-VagrantMachines.ps1 \
|
||||
-MachineId XX \
|
||||
-DevopsPat '<get this from azure devops; it needs agent pool read and manage access>' \
|
||||
-Date <this is the date of the pool; 2021-04-16 at time of writing>
|
||||
$ cd ~/vagrant/vcpkg-eg-mac
|
||||
$ vagrant up
|
||||
```
|
||||
|
||||
If you see the following error:
|
||||
|
||||
```
|
||||
Failed to initialize CoreCLR, HRESULT: 0x8007001F
|
||||
```
|
||||
|
||||
You have to reboot the machine; run
|
||||
|
||||
```sh
|
||||
$ sudo shutdown -r now
|
||||
```
|
||||
|
||||
and wait for the machine to start back up. Then, start again from where the error was emitted.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
The following are issues that we've run into:
|
||||
|
||||
- (with a Parallels box) `vagrant up` doesn't work, and vagrant gives the error that the VM is `'stopped'`.
|
||||
- Try logging into the GUI with the KVM, and retrying `vagrant up`.
|
||||
|
||||
## Creating a new Vagrant box
|
||||
### Creating a new Vagrant box
|
||||
|
||||
Whenever we want to install updated versions of the command line tools,
|
||||
or of macOS, we need to create a new vagrant box.
|
||||
@ -111,15 +39,17 @@ you can set up your own vagrant boxes that are the same as ours by doing the fol
|
||||
|
||||
You'll need some prerequisites:
|
||||
|
||||
- vagrant - found at <https://www.vagrantup.com/>
|
||||
- The vagrant-parallels plugin - `vagrant plugin install vagrant-parallels`
|
||||
- Parallels - found at <https://parallels.com>
|
||||
- An Xcode installer - you can get this from Apple's developer website,
|
||||
although you'll need to sign in first: <https://developer.apple.com/downloads>
|
||||
- The software installed by `Install-Prerequisites.ps1`
|
||||
|
||||
If you're updating the CI pool, make sure you update macOS.
|
||||
|
||||
First, you'll need to create a base VM;
|
||||
this is where you determine what version of macOS is installed.
|
||||
Just follow the Parallels process for creating a macOS VM.
|
||||
Follow the Parallels process for creating a macOS VM; this involves
|
||||
updating to whatever version, and then scrolling right until you find
|
||||
"Install macOS from recovery partition".
|
||||
|
||||
Once you've done this, you can run through the installation of macOS onto a new VM.
|
||||
You should set the username to `vagrant`.
|
||||
@ -191,39 +121,141 @@ Once you've done that, add the software versions under [VM Software Versions](#v
|
||||
|
||||
[base-box-instructions]: https://parallels.github.io/vagrant-parallels/docs/boxes/base.html
|
||||
|
||||
### VM Software Versions
|
||||
#### VM Software Versions
|
||||
|
||||
* 2020-09-28:
|
||||
* macOS: 10.15.6
|
||||
* Xcode CLTs: 12
|
||||
* 2021-04-16:
|
||||
* macOS: 11.2.3
|
||||
* Xcode CLTs: 12.4
|
||||
* 2022-03-01:
|
||||
* macOS: 12.1
|
||||
* Xcode CLTs: 13.2
|
||||
* 2021-07-27:
|
||||
* macOS: 11.5.1
|
||||
* Xcode CLTs: 12.5.1
|
||||
* 2021-04-16:
|
||||
* macOS: 11.2.3
|
||||
* Xcode CLTs: 12.4
|
||||
* 2020-09-28:
|
||||
* macOS: 10.15.6
|
||||
* Xcode CLTs: 12
|
||||
|
||||
### (Internal) Accessing the macOS fileshare
|
||||
### Creating a New Azure Agent Pool
|
||||
|
||||
When updating the macOS machines to a new version, you'll need to create
|
||||
a new agent pool for the machines to join. The standard for this is to
|
||||
name it `PrOsx-YYYY-MM-DD`, with `YYYY-MM-DD` the day that the process
|
||||
is started.
|
||||
|
||||
In order to create a new agent pool, go to the `vcpkg/public` project;
|
||||
go to `Project settings`, then go to `Agent pools` under `Pipelines`.
|
||||
Add a new self-hosted pool, name it as above, and make certain to check
|
||||
the box for "Grant access permission to all pipelines".
|
||||
|
||||
Once you've done this, you are done; you can start adding new machines
|
||||
to the pool!
|
||||
|
||||
### Running the VM
|
||||
|
||||
Before anything else, you'll probably want to destroy any old VMs,
|
||||
and remove any old vagrant boxes:
|
||||
|
||||
```ps1
|
||||
$ cd ~/vagrant/vcpkg-eg-mac
|
||||
$ vagrant destroy -f
|
||||
$ cd ~
|
||||
$ rm -rf ~/vagrant/vcpkg-eg-mac
|
||||
```
|
||||
|
||||
Then, make sure that your software is up to date:
|
||||
```sh
|
||||
$ ./Install-Prerequisites.ps1
|
||||
```
|
||||
|
||||
as well as checking to make sure macOS is up to date.
|
||||
|
||||
Then, follow the instructions for [accessing the fileshare][access-fileshare].
|
||||
|
||||
And finally, [grab a PAT], add the vagrant box, set up the VM, and run it:
|
||||
```sh
|
||||
$ vagrant box add ~/vagrant/share/boxes/macos-ci.json
|
||||
$ ./Setup-VagrantMachines.ps1 -Date <YYYY-MM-DD> -Pat <PAT>
|
||||
$ cd ~/vagrant/vcpkg-eg-mac
|
||||
$ vagrant up
|
||||
```
|
||||
|
||||
[grab a PAT]: #getting-an-azure-pipelines-pat
|
||||
|
||||
## Getting an Azure Pipelines PAT
|
||||
|
||||
Personal Access Tokens are an important part of this process,
|
||||
and they are fairly easy to generate.
|
||||
On ADO, under the correct project (in vcpkg's case, "vcpkg"),
|
||||
click on the "User Settings" icon, then go to "Personal access tokens".
|
||||
It is the icon to the left of your user icon, in the top right corner.
|
||||
|
||||
Then, create a new token, give it a name, make sure it expires quickly,
|
||||
and give it a custom defined scope that includes the
|
||||
"Agent pools: Read & manage" permission (you'll need to "Show all scopes"
|
||||
to access this).
|
||||
You can now copy this token and use it to allow machines to join.
|
||||
|
||||
## Setting up a new macOS machine
|
||||
|
||||
Before anything else, one must download `brew` and `powershell`.
|
||||
|
||||
```sh
|
||||
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
|
||||
$ brew cask install powershell
|
||||
```
|
||||
|
||||
Then, we need to download the `vcpkg` repository:
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/microsoft/vcpkg
|
||||
```
|
||||
|
||||
Then, we need to mint an SSH key:
|
||||
|
||||
```sh
|
||||
$ ssh-keygen
|
||||
$ cat .ssh/id_rsa.pub
|
||||
```
|
||||
|
||||
Add that SSH key to `authorized_keys` on the file share machine with the base box.
|
||||
|
||||
Next, install prerequisites:
|
||||
```sh
|
||||
$ cd vcpkg/scripts/azure-pipelines/osx
|
||||
$ ./Install-Prerequisites.ps1 -Force
|
||||
```
|
||||
|
||||
And finally, make sure you can [access the fileshare][access-fileshare].
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
The following are issues that we've run into:
|
||||
|
||||
- (with a Parallels box) `vagrant up` doesn't work, and vagrant gives the error that the VM is `'stopped'`.
|
||||
- Try logging into the GUI with the KVM, and retrying `vagrant up`.
|
||||
- (when running a powershell script) The error `Failed to initialize CoreCLR, HRESULT: 0x8007001F` is printed.
|
||||
- Reboot the machine; run
|
||||
```sh
|
||||
$ sudo shutdown -r now
|
||||
```
|
||||
and wait for the machine to start back up. Then, start again from where the error was emitted.
|
||||
|
||||
## (Internal) Accessing the macOS fileshare
|
||||
|
||||
The fileshare is located on `vcpkgmm-01`, under the `fileshare` user, in the `share` directory.
|
||||
In order to get `sshfs` working on the physical machine,
|
||||
You can run `Install-Prerequisites.ps1` to grab the right software, then either:
|
||||
|
||||
```sh
|
||||
$ mkdir vagrant/share
|
||||
$ sshfs fileshare@<vcpkgmm-01 URN>:/Users/fileshare/share vagrant/share
|
||||
$ mkdir -p vagrant/share
|
||||
$ sshfs fileshare@vcpkgmm-01:share vagrant/share
|
||||
```
|
||||
|
||||
or you can just run
|
||||
|
||||
```sh
|
||||
$ ./Get-InternalBaseBox.ps1
|
||||
```
|
||||
|
||||
which will do the thing automatically.
|
||||
|
||||
If you get an error, that means that gatekeeper has prevented the kernel extension from loading,
|
||||
so you'll need to access the GUI of the machine, go to System Preferences,
|
||||
Security & Privacy, General, unlock the settings,
|
||||
and allow system extensions from the osxfuse developer to run.
|
||||
Then, you'll be able to add the fileshare as an sshfs.
|
||||
|
||||
[access-fileshare]: #internal-accessing-the-macos-fileshare
|
||||
|
@ -92,14 +92,16 @@ if ([String]::IsNullOrEmpty($MachineId)) {
|
||||
}
|
||||
|
||||
if (Test-Path '~/vagrant/vcpkg-eg-mac') {
|
||||
Write-Host 'Deleting existing directories'
|
||||
|
||||
Push-Location '~/vagrant/vcpkg-eg-mac'
|
||||
try {
|
||||
Write-Host 'Deleting existing directories'
|
||||
vagrant destroy -f
|
||||
Remove-Item -Recurse -Force -LiteralPath '~/vagrant/vcpkg-eg-mac' | Out-Null
|
||||
} finally {
|
||||
Pop-Location
|
||||
vagrant destroy -f
|
||||
if (-not $?) {
|
||||
throw "Failed to destroy vagrant VM."
|
||||
}
|
||||
Pop-Location
|
||||
|
||||
Remove-Item -Recurse -Force -LiteralPath '~/vagrant/vcpkg-eg-mac' | Out-Null
|
||||
}
|
||||
|
||||
Write-Host 'Creating new directories'
|
||||
|
@ -3,14 +3,14 @@ require 'json'
|
||||
configuration = JSON.parse(File.read("#{__dir__}/vagrant-configuration.json"))
|
||||
|
||||
server = {
|
||||
:hostname => configuration['machine_name'],
|
||||
:machine_name => 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'
|
||||
azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.195.2/vsts-agent-osx-x64-2.195.2.tar.gz'
|
||||
devops_url = configuration['devops_url']
|
||||
agent_pool = configuration['agent_pool']
|
||||
pat = configuration['pat']
|
||||
@ -18,7 +18,6 @@ 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|
|
||||
@ -53,7 +52,7 @@ Vagrant.configure('2') do |config|
|
||||
--work ~/Data/work \
|
||||
--auth pat --token #{pat} \
|
||||
--pool #{agent_pool} \
|
||||
--agent `hostname` \
|
||||
--agent #{server[:machine_name]} \
|
||||
--replace \
|
||||
--acceptTeeEula",
|
||||
privileged: false
|
||||
|
@ -6,18 +6,33 @@
|
||||
"Name": "vagrant",
|
||||
"VersionCommand": [ "vagrant", "-v" ],
|
||||
"VersionRegex": "Vagrant (.*)",
|
||||
"Version": "2.2.18",
|
||||
"DmgUrl": "https://releases.hashicorp.com/vagrant/2.2.18/vagrant_2.2.18_x86_64.dmg",
|
||||
"Sha256": "B4E8103AABDF29F18F592CD6DE4FA03BF182FBC192A0757B5E18156CB18FA672",
|
||||
"Version": "2.2.19",
|
||||
"DmgUrl": "https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.dmg",
|
||||
"Sha256": "6307BE217813A11C9E106448BF232803031E434A08C8B2DF8C62FDC9E8543845",
|
||||
"InstallerPath": "vagrant.pkg"
|
||||
},
|
||||
{
|
||||
"Name": "Parallels",
|
||||
"VersionCommand": [ "cat", "/Applications/Parallels Desktop.app/Contents/Info.plist" ],
|
||||
"VersionRegex": "<key>CFBundleShortVersionString</key>[\\n\\t ]*<string>([0-9.]+)</string>",
|
||||
"Version": "17.1.1",
|
||||
"DmgUrl": "https://download.parallels.com/desktop/v17/17.1.1-51537/ParallelsDesktop-17.1.1-51537.dmg",
|
||||
"Sha256": "BD7BE2DF4D1B3508C127CF1D9C1EF93CDDA63384BCF3893A77FBC9F1169765A9",
|
||||
"InstallationCommands": [
|
||||
[ "bash", "-c", "ps x | grep 'Parallels Desktop' | grep -v 'grep' | sed -E 's/^ *([0-9]+).*(\\/Applications.*)$/\\1: \\2/'" ],
|
||||
[ "bash", "-c", "ps x | grep 'Parallels Desktop' | grep -v 'grep' | sed -E 's/^ *([0-9]+).*$/\\1/' | xargs -p kill" ],
|
||||
[ "sudo", "rm", "-rf", "/Applications/Parallels Desktop.app" ],
|
||||
[ "sudo", "cp", "-r", "/Volumes/setup-installer/Parallels Desktop.app", "/Applications" ],
|
||||
[ "sudo", "/Applications/Parallels Desktop.app/Contents/MacOS/inittool2", "init", "-b", "/Applications/Parallels Desktop.app" ]
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "osxfuse",
|
||||
"VersionCommand": [ "cat", "/Library/Filesystems/macfuse.fs/Contents/version.plist" ],
|
||||
"VersionRegex": "<key>CFBundleVersion</key>[\\n\\t ]*<string>([0-9.]+)</string>",
|
||||
"Version": "4.1.2",
|
||||
"DmgUrl": "https://github.com/osxfuse/osxfuse/releases/download/macfuse-4.1.2/macfuse-4.1.2.dmg",
|
||||
"Sha256": "9FF344DE38BAD5AC5ECA5194DA00A2BA35DD6AFDB9039133B5446168F8EDAFDB",
|
||||
"Version": "4.2.4",
|
||||
"DmgUrl": "https://github.com/osxfuse/osxfuse/releases/download/macfuse-4.2.4/macfuse-4.2.4.dmg",
|
||||
"Sha256": "82A2C30B3A7BF56AA2755C0C192FB50D9EECC3FE42505AB4E8679B50306188BD",
|
||||
"InstallerPath": "Install macFUSE.pkg"
|
||||
},
|
||||
{
|
||||
@ -29,12 +44,10 @@
|
||||
"Sha256": "F8F4F71814273EA42DBE6CD92199F7CFF418571FFD1B10C0608878D3472D2162"
|
||||
}
|
||||
],
|
||||
"Brew": [
|
||||
],
|
||||
"VagrantPlugins": [
|
||||
{
|
||||
"Name": "vagrant-parallels",
|
||||
"Version": "2.2.3"
|
||||
"Version": "2.2.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -9,7 +9,6 @@
|
||||
},
|
||||
"required": [
|
||||
"Applications",
|
||||
"Brew",
|
||||
"VagrantPlugins"
|
||||
],
|
||||
"properties": {
|
||||
@ -48,22 +47,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Brew": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [ "Name" ],
|
||||
"properties": {
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"Kind": {
|
||||
"type": "string",
|
||||
"enum": [ "cask" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"VagrantPlugins": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -1436,6 +1436,8 @@ tcl:arm64-windows=fail
|
||||
tcl:x64-uwp=fail
|
||||
telnetpp:arm-uwp=fail
|
||||
telnetpp:x64-uwp=fail
|
||||
tensorflow:x64-osx=fail
|
||||
tensorflow-cc:x64-osx=fail
|
||||
theia:arm64-windows = skip
|
||||
theia:arm-uwp = skip
|
||||
theia:x64-uwp = skip
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "2fdbe23020728d91dbae5249ed04b42b4b882a87",
|
||||
"version": "7.0.5",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "1801922b3e4808edcd0b55b6a800bbb1c01687a6",
|
||||
"version": "7.0.5",
|
||||
|
@ -18,7 +18,7 @@
|
||||
},
|
||||
"ace": {
|
||||
"baseline": "7.0.5",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"activemq-cpp": {
|
||||
"baseline": "3.9.5",
|
||||
@ -3810,7 +3810,7 @@
|
||||
},
|
||||
"libpqxx": {
|
||||
"baseline": "7.6.0",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"libprotobuf-mutator": {
|
||||
"baseline": "1.0",
|
||||
@ -3918,7 +3918,7 @@
|
||||
},
|
||||
"libsoundio": {
|
||||
"baseline": "2.0.0",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"libspatialindex": {
|
||||
"baseline": "1.9.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "6dd0107ca668c589cf18a57a884dd3ef276730cf",
|
||||
"version-semver": "7.6.0",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "5c4df2807e229629d04aecc0a66f11219d4dcbcd",
|
||||
"version-semver": "7.6.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ea8a154b722a142045906b20d2df00a38d330d6b",
|
||||
"version": "2.0.0",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "96de946826ca6aafdc9409f9d75f02a6d082cffb",
|
||||
"version": "2.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user