From d99b6930b920d85dd4e1edbac37ecb3f354185c0 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Thu, 14 Sep 2023 14:02:46 -0700 Subject: [PATCH] Update macOS to 13.5 and xcode 14.3.1. (#33722) --- ports/urho3d/macosx.patch | 24 ++- ports/urho3d/vcpkg.json | 2 +- scripts/azure-pipelines/azure-pipelines.yml | 2 +- .../osx/Install-Prerequisites.ps1 | 128 ----------- scripts/azure-pipelines/osx/README.md | 200 ++++++++---------- .../osx/Setup-VagrantMachines.ps1 | 126 ----------- scripts/azure-pipelines/osx/Utilities.psm1 | 90 -------- .../{configuration => }/Vagrantfile-box.rb | 8 +- .../osx/{configuration => }/Vagrantfile-vm.rb | 20 +- .../osx/configuration/installables.json | 53 ----- .../configuration/installables.schema.json | 66 ------ .../vagrant-box-configuration.json | 25 --- .../vagrant-box-configuration.schema.json | 18 -- .../vagrant-configuration.schema.json | 35 --- .../patch-tuesday-checklist.md | 2 + scripts/ci.baseline.txt | 17 +- versions/baseline.json | 2 +- versions/u-/urho3d.json | 5 + 18 files changed, 140 insertions(+), 683 deletions(-) delete mode 100755 scripts/azure-pipelines/osx/Install-Prerequisites.ps1 delete mode 100755 scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 delete mode 100644 scripts/azure-pipelines/osx/Utilities.psm1 rename scripts/azure-pipelines/osx/{configuration => }/Vagrantfile-box.rb (79%) rename scripts/azure-pipelines/osx/{configuration => }/Vagrantfile-vm.rb (78%) delete mode 100644 scripts/azure-pipelines/osx/configuration/installables.json delete mode 100644 scripts/azure-pipelines/osx/configuration/installables.schema.json delete mode 100644 scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json delete mode 100644 scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json delete mode 100644 scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json diff --git a/ports/urho3d/macosx.patch b/ports/urho3d/macosx.patch index edcae1460d..bc346def6d 100644 --- a/ports/urho3d/macosx.patch +++ b/ports/urho3d/macosx.patch @@ -1,5 +1,5 @@ diff --git a/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h b/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h -index 6378d468a..c8563db52 100644 +index 6378d46..c8563db 100644 --- a/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h +++ b/Source/ThirdParty/Assimp/contrib/zlib/gzguts.h @@ -38,6 +38,9 @@ @@ -13,7 +13,7 @@ index 6378d468a..c8563db52 100644 #if defined(_WIN32) # define WIDECHAR diff --git a/Source/ThirdParty/Civetweb/src/civetweb.c b/Source/ThirdParty/Civetweb/src/civetweb.c -index 4d26e0a83..2bd577e81 100644 +index 4d26e0a..2bd577e 100644 --- a/Source/ThirdParty/Civetweb/src/civetweb.c +++ b/Source/ThirdParty/Civetweb/src/civetweb.c @@ -167,6 +167,8 @@ mg_static_assert(sizeof(void *) >= sizeof(int), "data type size check"); @@ -25,3 +25,23 @@ index 4d26e0a83..2bd577e81 100644 #if !defined(DEBUG_TRACE) #if defined(DEBUG) +diff --git a/Source/ThirdParty/SDL/CMakeLists.txt b/Source/ThirdParty/SDL/CMakeLists.txt +index 5c4ef27..fd4c4dd 100644 +--- a/Source/ThirdParty/SDL/CMakeLists.txt ++++ b/Source/ThirdParty/SDL/CMakeLists.txt +@@ -428,15 +428,6 @@ if(USE_GCC OR USE_CLANG) + list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing") + endif() + +- check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT) +- if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT) +- check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT) +- # Urho3D - bug fix - SDL does not build cleanly for Android platform with this flag on, make a tweak here rather than changing on their code +- if(HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT AND NOT ANDROID) +- list(APPEND EXTRA_CFLAGS "-Werror=declaration-after-statement") +- endif() +- list(APPEND EXTRA_CFLAGS "-Wdeclaration-after-statement") +- endif() + + if(DEPENDENCY_TRACKING) + check_c_source_compiles(" diff --git a/ports/urho3d/vcpkg.json b/ports/urho3d/vcpkg.json index 680d5d0c2d..52a7da5b3e 100644 --- a/ports/urho3d/vcpkg.json +++ b/ports/urho3d/vcpkg.json @@ -2,7 +2,7 @@ "$note": "Due to the upstream modification of the dependent source code, the internal port of vcpkg cannot be used.", "name": "urho3d", "version-date": "2021-03-01", - "port-version": 4, + "port-version": 5, "description": "Urho3D is a free lightweight, cross-platform 2D and 3D game engine implemented in C++ and released under the MIT license. Greatly inspired by OGRE and Horde3D.", "homepage": "https://github.com/urho3d/Urho3D", "supports": "!(arm | uwp)", diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 094904e700..85c131640d 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -5,7 +5,7 @@ variables: android-pool: 'PrAnd-1ES-Pool' linux-pool: 'PrLin-1ES-Pool' windows-pool: 'PrWin-2023-08-09' - osx-pool: 'PrOsx-2022-02-04' + osx-pool: 'PrOsx-2023-09-11' linux-docker-image: 'andcontainerregistry.azurecr.io/vcpkg-android:2023-04-20' parameters: diff --git a/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 b/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 deleted file mode 100755 index 979c41a741..0000000000 --- a/scripts/azure-pipelines/osx/Install-Prerequisites.ps1 +++ /dev/null @@ -1,128 +0,0 @@ -#!pwsh -#Requires -Version 6.0 - -<# -.SYNOPSIS -Installs the set of prerequisites for the macOS CI hosts. - -.DESCRIPTION -Install-Prerequisites.ps1 installs all of the necessary prerequisites -to run the vcpkg macOS CI in a vagrant virtual machine, -skipping all prerequisites that are already installed and of the right version. - -.INPUTS -None - -.OUTPUTS -None -#> -[CmdletBinding()] -Param() - -Set-StrictMode -Version 2 - -if (-not $IsMacOS) { - Write-Error 'This script should only be run on a macOS host' - throw -} - -Import-Module "$PSScriptRoot/Utilities.psm1" - -$Installables = Get-Content "$PSScriptRoot/configuration/installables.json" | ConvertFrom-Json - -$Installables.Applications | ForEach-Object { - $VersionCommand = $_.VersionCommand - $InstalledVersion = (& $VersionCommand[0] $VersionCommand[1..$VersionCommand.Length]) - if (-not $?) { - Write-Host "$($_.Name) not installed; installing now" - } else { - $InstalledVersion = $InstalledVersion -join "`n" - if ($InstalledVersion -match $_.VersionRegex) { - if ($Matches.Count -ne 2) { - Write-Error "$($_.Name) has a malformed version regex ($($_.VersionRegex)); it should have a single capture group - (it has $($Matches.Count - 1))" - throw - } - if ($Matches[1] -eq $_.Version) { - Write-Host "$($_.Name) already installed and at the correct version ($($Matches[1]))" - return - } else { - Write-Host "$($_.Name) already installed but with the incorrect version - installed version: '$($Matches[1])' - required version : '$($_.Version)' -upgrading now." - } - } else { - Write-Warning "$($_.Name)'s version command ($($VersionCommand -join ' ')) returned a value we did not expect: - $InstalledVersion - expected a version matching the regex: $($_.VersionRegex) -Installing anyways." - } - } - - if ($null -ne (Get-Member -InputObject $_ -Name 'DmgUrl')) { - $pathToDmg = "~/Downloads/$($_.Name).dmg" - Get-RemoteFile -OutFile $pathToDmg -Uri $_.DmgUrl -Sha256 $_.Sha256 - - hdiutil attach $pathToDmg -mountpoint /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 - - sudo installer -pkg $pathToPkg -target / - } else { - Write-Error "$($_.Name) does not have an installer in the configuration file." - throw - } -} - -$installedVagrantPlugins = @{} -vagrant plugin list --machine-readable | ForEach-Object { - $timestamp, $target, $type, $data = $_ -split ',' - switch ($type) { - # these are not important - 'ui' { } - 'plugin-version-constraint' { } - 'plugin-name' { - $installedVagrantPlugins[$data] = $Null - } - 'plugin-version' { - $version = $data -replace '%!\(VAGRANT_COMMA\)',',' - if ($version -notmatch '^(.*), global') { - Write-Error "Invalid version string for plugin ${target}: $version" - throw - } - $installedVagrantPlugins[$target] = $Matches[1] - } - default { - Write-Warning "Unknown plugin list member type $type for plugin $target" - } - } -} -$Installables.VagrantPlugins | ForEach-Object { - if (-not $installedVagrantPlugins.Contains($_.Name)) { - Write-Host "$($_.Name) not installed; installing now" - } elseif ($installedVagrantPlugins[$_.Name] -ne $_.Version) { - Write-Host "$($_.Name) already installed but with the incorrect version - installed version: '$($installedVagrantPlugins[$_.Name])' - required version: '$($_.Version)'" - } else { - Write-Host "$($_.Name) already installed and at the correct version ($($_.Version))" - return - } - - vagrant plugin install $_.Name --plugin-version $_.Version -} diff --git a/scripts/azure-pipelines/osx/README.md b/scripts/azure-pipelines/osx/README.md index 9dffe7249f..d7ccbd9544 100644 --- a/scripts/azure-pipelines/osx/README.md +++ b/scripts/azure-pipelines/osx/README.md @@ -11,8 +11,6 @@ - [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) - - [(Internal) Accessing the macOS fileshare](#internal-accessing-the-macos-fileshare) ## Basic Usage @@ -41,18 +39,31 @@ You'll need some prerequisites: - An Xcode installer - you can get this from Apple's developer website, although you'll need to sign in first: -- 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. -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". +Follow the Parallels process for creating a macOS VM: -Once you've done this, you can run through the installation of macOS onto a new VM. -You should set the username to `vagrant`. +1. Get a machine with matching version of Parallels. +2. If you haven't already, install Vagrant and vagrant-parallels: + ```sh + $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + $ brew install hashicorp/tap/hashicorp-vagrant + $ vagrant plugin install vagrant-parallels + ``` +3. Update your MacOS host. +4. Run parallels, and select 'Other Options' -> 'Install macOS 13.5.2 Using the Recovery Partition' (version number to change :)) +5. Install MacOS like you would on real hardware. + * Apple ID: 'Set Up Later' / Skip + * Account name: vagrant + * Account password: vagrant +6. Install Parallels Tools +7. Shut down the VM +8. Open Parallels Control Center, right click the VM, and make the following edits: + * 12 processors + * 24000 MB of memory Once it's finished installing, make sure to turn on the SSH server. Open System Preferences, then go to Sharing > Remote Login, @@ -71,73 +82,57 @@ $ curl -fsSL 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' $ chmod 0600 ~/.ssh/authorized_keys ``` -Finally, you'll need to install the Parallel Tools. -From your host, in the top bar, -go to Actions > Install Parallels Tools..., -and then follow the instructions. - Now, let's package the VM into a base box. (The following instructions are adapted from [these official instructions][base-box-instructions]). -Run the following commands: +Shut down the VM cleanly. On the host, run the following commands: ```sh $ cd ~/Parallels $ echo '{ "provider": "parallels" }' >metadata.json -$ tar zcvf .box ./metadata.json ./.pvm +$ prl_disk_tool compact --hdd ./.pvm/harddisk.hdd +$ tar zcvf .box ./metadata.json ./.pvm +$ rm ./metadata.json ``` This will create a box file which contains all the necessary data. -You can delete the `metadata.json` file after. - -Once you've done that, you can upload it to the fileshare, -under `share/boxes/macos-base`, add it to `share/boxes/macos-base.json`, -and finally add it to vagrant: ```sh -$ vagrant box add ~/vagrant/share/boxes/macos-base.json +$ vagrant box add .box --name ``` Then, we'll create the final box, which contains all the necessary programs for doing CI work. -Copy `configuration/Vagrantfile-box.rb` as `Vagrantfile`, and -`configuration/vagrant-box-configuration.json` -into a new directory; into that same directory, -download the Xcode command line tools dmg, and name it `clt.dmg`. +Copy `Vagrantfile-box.rb` as `Vagrantfile` +into a new directory. Edit the config.vm.box line to . +Into that same directory, download the Xcode command line tools dmg, typically from +https://developer.apple.com/download/all/ , and name it `clt.dmg`. Then, run the following in that directory: ```sh $ vagrant up $ vagrant package +$ vagrant destroy ``` This will create a `package.box`, which is the box file for the base VM. -Once you've created this box, if you're making it the new box for the CI, -upload it to the fileshare, under `share/boxes/macos-ci`. -Then, add the metadata about the box (the name and version) to -`share/boxes/macos-ci.json`. +Once you've created this box, log in to the Azure Portal, and upload the box to +vcpkg-image-minting/vcpkgvagrantboxes/boxes. (You might need to use scp to copy the box to +a machine that can see the Portal) + Once you've done that, add the software versions under [VM Software Versions](#vm-software-versions). [base-box-instructions]: https://parallels.github.io/vagrant-parallels/docs/boxes/base.html #### VM Software Versions +* 2023-09-11 + * macOS: 13.5 + * Xcode CLTs: 14.3.1 * 2022-02-04 (minor update to 2022-01-03) * macOS: 12.1 * Xcode CLTs: 13.2 -* 2022-01-03: - * 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 ### Creating a New Azure Agent Pool @@ -156,27 +151,54 @@ to the pool! ### Running the VM -First, make sure that your software is up to date: +First, make sure that your software is up to date, first by checking in + +* macOS system settings +* Parallels' UI +* homebrew: + ```sh + $ brew update + $ brew upgrade + ``` + +If this machine has been used before, you might have to remove an existing boxes: + ```sh -$ cd ~/vcpkg -$ git fetch -$ git switch -d origin/master -$ ./scripts/azure-pipelines/osx/Install-Prerequisites.ps1 +$ cd ~/vagrant/vcpkg-ec-mac +$ vagrant halt +$ vagrant destroy +$ cd ~ +$ rm -rf ~/vagrant +$ mkdir ~/vagrant ``` -as well as checking to make sure macOS is up to date. +[grab a PAT], mint a SAS token to vcpkg-image-minting/vcpkgvagrantboxes/boxes, and pull the box: -Then, follow the instructions for [accessing ~/vagrant/share][access-fileshare]. - -And finally, [grab a PAT], update the vagrant box, set up the VM, and run it: ```sh -$ vagrant box remove -f vcpkg/macos-ci # This won't do anything if the machine never had a box before -$ vagrant box add ~/vagrant/share/boxes/macos-ci.json -$ ~/vcpkg/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 -Date -DevopsPat -$ cd ~/vagrant/vcpkg-eg-mac -$ vagrant up # if this fails, reboot through the kvm and/or log in interactively, then come back here +$ vagrant box list +$ vagrant box remove +$ vagrant box add 'https://vcpkgvagrantboxes.blob.core.windows.net/boxes/.box?' --name ``` +Copy the contents of Vagrantfile-vm.rb to ~/vagrant/Vagrantfile, and edit the values at the top +to match this particular machine: + +* machine_name +* box +* azure_agent_url should be changed to the latest version +* agent_pool +* pat + +Then: + +```sh +$ cd ~/vagrant +$ vagrant up +``` + +If the `vagrant up` fails you might need to `vagrant halt` and rerun from within the KVM as +sometimes over SSH this fails. + [grab a PAT]: #getting-an-azure-pipelines-pat ## Getting an Azure Pipelines PAT @@ -195,64 +217,10 @@ 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 ~/vagrant/share][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 -p ~/vagrant/share -$ sshfs fileshare@vcpkgmm-01:share ~/vagrant/share -``` - -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 ~/vagrant/share as an sshfs. - -[access-fileshare]: #internal-accessing-the-macos-fileshare +* Install Parallels +* Install Homebrew + ```sh + $ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" + $ brew install hashicorp/tap/hashicorp-vagrant + $ vagrant plugin install vagrant-parallels + ``` diff --git a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 b/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 deleted file mode 100755 index eb978d42c4..0000000000 --- a/scripts/azure-pipelines/osx/Setup-VagrantMachines.ps1 +++ /dev/null @@ -1,126 +0,0 @@ -#!pwsh -#Requires -Version 6.0 - -<# -.SYNOPSIS -Sets up the configuration for the vagrant virtual machines. - -.DESCRIPTION -Setup-VagrantMachines.ps1 sets up the virtual machines for -vcpkg's macOS CI. It puts the VagrantFile and necessary -configuration JSON file into ~/vagrant/vcpkg-eg-mac. - -.PARAMETER MachineId -The number to give the machine; should match [0-9]{2}. -Defaults to the numbers at the end of the machine name, -assuming that that machine name matches `VCPKGMM-[0-9]{2}`. - -.PARAMETER DevopsPat -The personal access token which has Read & Manage permissions on the ADO pool. - -.PARAMETER Date -The date on which this pool is being created. Sets the default values for BoxVersion and AgentPool. - -.PARAMETER BoxVersion -The version of the box to use. If -Date is passed, uses that as the version. - -.PARAMETER AgentPool -The agent pool to add the machine to. If -Date is passed, uses "PrOsx-$Date" as the pool. - -.PARAMETER DevopsUrl -The URL of the ADO instance; defaults to vcpkg's, which is https://dev.azure.com/vcpkg. - -.PARAMETER BaseName -The base name for the vagrant VM; the machine name is $BaseName-$MachineId. -Defaults to 'vcpkg-eg-mac'. - -.PARAMETER BoxName -The name of the box to use. Defaults to 'vcpkg/macos-ci', -which is only available internally. - -.INPUTS -None - -.OUTPUTS -None -#> -[CmdletBinding(PositionalBinding=$False, DefaultParameterSetName='DefineDate')] -Param( - [Parameter(Mandatory=$False)] - [String]$MachineId, - - [Parameter(Mandatory=$True)] - [String]$DevopsPat, - - [Parameter(Mandatory=$True, ParameterSetName='DefineDate')] - [String]$Date, - - [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] - [String]$BoxVersion, - - [Parameter(Mandatory=$True, ParameterSetName='DefineVersionAndAgentPool')] - [String]$AgentPool, - - [Parameter(Mandatory=$False)] - [String]$DevopsUrl = 'https://dev.azure.com/vcpkg', - - [Parameter()] - [String]$BaseName = 'vcpkg-eg-mac', - - [Parameter()] - [String]$BoxName = 'vcpkg/macos-ci' -) - -Set-StrictMode -Version 2 - -if (-not $IsMacOS) { - throw 'This script should only be run on a macOS host' -} - -if (-not [String]::IsNullOrEmpty($Date)) { - $BoxVersion = $Date - $AgentPool = "PrOsx-$Date" -} - -if ([String]::IsNullOrEmpty($MachineId)) { - $hostname = hostname -s - if ($hostname -match '^VCPKGMM-([0-9]{2})$') { - $MachineId = $matches[1] - } else { - Write-Error "Hostname ($hostname) does not match the expected format (VCPKGMM-NN). Please pass -MachineId in order to give the VM a number." - } -} - -if (Test-Path '~/vagrant/vcpkg-eg-mac') { - Write-Host 'Deleting existing directories' - - Push-Location '~/vagrant/vcpkg-eg-mac' - 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' -if (-not (Test-Path -Path '~/vagrant')) { - New-Item -ItemType 'Directory' -Path '~/vagrant' | Out-Null -} -New-Item -ItemType 'Directory' -Path '~/vagrant/vcpkg-eg-mac' | Out-Null - -Copy-Item ` - -Path "$PSScriptRoot/configuration/Vagrantfile-vm.rb" ` - -Destination '~/vagrant/vcpkg-eg-mac/Vagrantfile' - -$configuration = @{ - pat = $DevopsPat - agent_pool = $AgentPool - devops_url = $DevopsUrl - machine_name = "${BaseName}-${MachineId}" - box_name = $BoxName - box_version = $BoxVersion -} -ConvertTo-Json -InputObject $configuration -Depth 5 ` - | Set-Content -Path '~/vagrant/vcpkg-eg-mac/vagrant-configuration.json' diff --git a/scripts/azure-pipelines/osx/Utilities.psm1 b/scripts/azure-pipelines/osx/Utilities.psm1 deleted file mode 100644 index 620ec7f4b0..0000000000 --- a/scripts/azure-pipelines/osx/Utilities.psm1 +++ /dev/null @@ -1,90 +0,0 @@ -#Requires -Version 6.0 -Set-StrictMode -Version 2 - -<# -.SYNOPSIS -Returns whether the specified command exists in the current environment. - -.DESCRIPTION -Get-CommandExists takes a string as a parameter, -and returns whether it exists in the current environment; -either a function, alias, or an executable in the path. -It's somewhat equivalent to `which`. - -.PARAMETER Name -Specifies the name of the command which may or may not exist. - -.INPUTS -System.String - The name of the command. - -.OUTPUTS -System.Boolean - Whether the command exists. -#> -function Get-CommandExists -{ - [CmdletBinding()] - [OutputType([Boolean])] - Param( - [Parameter(ValueFromPipeline)] - [String]$Name - ) - - $null -ne (Get-Command -Name $Name -ErrorAction SilentlyContinue) -} - -<# -.SYNOPSIS -Downloads a file and checks its hash. - -.DESCRIPTION -Get-RemoteFile takes a URI and a hash, -downloads the file at that URI to OutFile, -and checks that the hash of the downloaded file. -It then returns a FileInfo object corresponding to the downloaded file. - -.PARAMETER OutFile -Specifies the file path to download to. - -.PARAMETER Uri -The URI to download from. - -.PARAMETER Sha256 -The expected SHA256 of the downloaded file. - -.INPUTS -None - -.OUTPUTS -System.IO.FileInfo - The FileInfo for the downloaded file. -#> -function Get-RemoteFile -{ - [CmdletBinding(PositionalBinding=$False)] - [OutputType([System.IO.FileInfo])] - Param( - [Parameter(Mandatory=$True)] - [String]$OutFile, - [Parameter(Mandatory=$True)] - [String]$Uri, - [Parameter(Mandatory=$True)] - [String]$Sha256 - ) - - Invoke-WebRequest -OutFile $OutFile -Uri $Uri - $actualHash = Get-FileHash -Algorithm SHA256 -Path $OutFile - - if ($actualHash.Hash -ne $Sha256) { - throw @" -Invalid hash for file $OutFile; - expected: $Sha256 - found: $($actualHash.Hash) -Please make sure that the hash in the powershell file is correct. -"@ - } - - Get-Item $OutFile -} - diff --git a/scripts/azure-pipelines/osx/configuration/Vagrantfile-box.rb b/scripts/azure-pipelines/osx/Vagrantfile-box.rb similarity index 79% rename from scripts/azure-pipelines/osx/configuration/Vagrantfile-box.rb rename to scripts/azure-pipelines/osx/Vagrantfile-box.rb index cbe76a7207..ae7d9bbcf5 100644 --- a/scripts/azure-pipelines/osx/configuration/Vagrantfile-box.rb +++ b/scripts/azure-pipelines/osx/Vagrantfile-box.rb @@ -1,9 +1,5 @@ -require 'json' - -configuration = JSON.parse(File.read("#{__dir__}/vagrant-box-configuration.json")) - Vagrant.configure('2') do |config| - config.vm.box = 'vcpkg/macos-base' + config.vm.box = 'macos-13-5' config.vm.synced_folder '.', '/Users/vagrant/shared' config.vm.provision 'shell', @@ -30,6 +26,6 @@ Vagrant.configure('2') do |config| config.vm.provision 'shell', run: 'once', name: 'Install brew applications', - inline: "brew install #{configuration['brew'].join(' ')} && brew install --cask #{configuration['brew-cask'].join(' ')}", + inline: "brew install autoconf-archive autoconf automake bison cmake gettext gfortran gperf gtk-doc libtool meson mono nasm ninja pkg-config powershell texinfo yasm", privileged: false end diff --git a/scripts/azure-pipelines/osx/configuration/Vagrantfile-vm.rb b/scripts/azure-pipelines/osx/Vagrantfile-vm.rb similarity index 78% rename from scripts/azure-pipelines/osx/configuration/Vagrantfile-vm.rb rename to scripts/azure-pipelines/osx/Vagrantfile-vm.rb index 0b2df0219e..3460783c2f 100644 --- a/scripts/azure-pipelines/osx/configuration/Vagrantfile-vm.rb +++ b/scripts/azure-pipelines/osx/Vagrantfile-vm.rb @@ -1,19 +1,15 @@ -require 'json' - -configuration = JSON.parse(File.read("#{__dir__}/vagrant-configuration.json")) - server = { - :machine_name => configuration['machine_name'], - :box => configuration['box_name'], - :box_version => configuration['box_version'], + :machine_name => 'vcpkg-eg-mac-11', + :box => 'vcpkg-macos-2023-09-11', + :box_version => '0', :ram => 24000, - :cpu => 11 + :cpu => 12 } -azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/2.198.3/vsts-agent-osx-x64-2.198.3.tar.gz' -devops_url = configuration['devops_url'] -agent_pool = configuration['agent_pool'] -pat = configuration['pat'] +azure_agent_url = 'https://vstsagentpackage.azureedge.net/agent/3.225.0/vsts-agent-osx-x64-3.225.0.tar.gz' +devops_url = 'https://dev.azure.com/vcpkg' +agent_pool = 'PrOsx-2023-09-11' +pat = '' Vagrant.configure('2') do |config| config.vm.box = server[:box] diff --git a/scripts/azure-pipelines/osx/configuration/installables.json b/scripts/azure-pipelines/osx/configuration/installables.json deleted file mode 100644 index 3ae97f355a..0000000000 --- a/scripts/azure-pipelines/osx/configuration/installables.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "./installables.schema.json", - - "Applications": [ - { - "Name": "vagrant", - "VersionCommand": [ "vagrant", "-v" ], - "VersionRegex": "Vagrant (.*)", - "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": "CFBundleShortVersionString[\\n\\t ]*([0-9.]+)", - "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": "CFBundleVersion[\\n\\t ]*([0-9.]+)", - "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" - }, - { - "Name": "sshfs", - "VersionCommand": [ "sshfs", "--version" ], - "VersionRegex": "SSHFS version [0-9.]* \\(OSXFUSE SSHFS (.*)\\)", - "Version": "2.5.0", - "PkgUrl": "https://github.com/osxfuse/sshfs/releases/download/osxfuse-sshfs-2.5.0/sshfs-2.5.0.pkg", - "Sha256": "F8F4F71814273EA42DBE6CD92199F7CFF418571FFD1B10C0608878D3472D2162" - } - ], - "VagrantPlugins": [ - { - "Name": "vagrant-parallels", - "Version": "2.2.4" - } - ] -} diff --git a/scripts/azure-pipelines/osx/configuration/installables.schema.json b/scripts/azure-pipelines/osx/configuration/installables.schema.json deleted file mode 100644 index 6237243c2f..0000000000 --- a/scripts/azure-pipelines/osx/configuration/installables.schema.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema", - "type": "object", - "definitions": { - "sha256": { - "type": "string", - "pattern": "[A-Z0-9]{64}" - } - }, - "required": [ - "Applications", - "VagrantPlugins" - ], - "properties": { - "Applications": { - "type": "array", - "items": { - "type": "object", - "properties": { - "Name": { - "type": "string" - }, - "VersionCommand": { - "type": "array", - "items": { - "type": "string" - }, - "minItems": 1 - }, - "VersionRegex": { - "type": "string", - "format": "regex" - }, - "Version": { - "type": "string" - }, - "DmgUrl": { - "type": "string", - "format": "uri" - }, - "Sha256": { - "$ref": "#/definitions/sha256" - }, - "InstallerPath": { - "type": "string" - } - } - } - }, - "VagrantPlugins": { - "type": "array", - "items": { - "type": "object", - "required": [ "Name", "Version" ], - "properties": { - "Name": { - "type": "string" - }, - "Version": { - "type": "string" - } - } - } - } - } -} diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json b/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json deleted file mode 100644 index 75cb83719e..0000000000 --- a/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "./vagrant-box-configuration.schema.json", - "brew": [ - "autoconf-archive", - "autoconf", - "automake", - "bison", - "cmake", - "gettext", - "gfortran", - "gperf", - "gtk-doc", - "libtool", - "meson", - "mono", - "nasm", - "ninja", - "pkg-config", - "texinfo", - "yasm" - ], - "brew-cask": [ - "powershell" - ] -} diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json b/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json deleted file mode 100644 index 80845f70f9..0000000000 --- a/scripts/azure-pipelines/osx/configuration/vagrant-box-configuration.schema.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft-07/schema", - "type": "object", - "required": [ - "brew", - "brew-cask" - ], - "properties": { - "brew": { - "type": "array", - "items": { "type": "string" } - }, - "brew-cask": { - "type": "array", - "items": { "type": "string" } - } - } -} diff --git a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json b/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json deleted file mode 100644 index 91540d77c9..0000000000 --- a/scripts/azure-pipelines/osx/configuration/vagrant-configuration.schema.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2019-09/schema", - - "type": "object", - - "required": [ - "pat", - "agent_pool", - "devops_url", - "machine_name", - "box_name", - "box_version" - ], - - "properties": { - "pat": { - "type": "string" - }, - "agent_pool": { - "type": "string" - }, - "devops_url": { - "type": "string" - }, - "machine_name": { - "type": "string" - }, - "box_name": { - "type": "string" - }, - "box_version": { - "type": "string" - } - } -} diff --git a/scripts/azure-pipelines/patch-tuesday-checklist.md b/scripts/azure-pipelines/patch-tuesday-checklist.md index 651bdd4589..1ceb337444 100644 --- a/scripts/azure-pipelines/patch-tuesday-checklist.md +++ b/scripts/azure-pipelines/patch-tuesday-checklist.md @@ -18,3 +18,5 @@ refs/pull/NUMBER/head * [ ] Run `generate-sas-tokens.ps1` and update the relevant libraries on dev.azure.com/vcpkg and devdiv.visualstudio.com. +* [ ] Mint a new macOS base box. +* [ ] Deploy the new base box to all hosts. diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 9ec464ef34..09bf836897 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -53,6 +53,8 @@ apsi:arm-neon-android=fail apsi:x64-android=fail # Broken with CUDA 12; needs update to 3.8.3 and https://github.com/arrayfire/arrayfire/issues/3349 fixed arrayfire:x64-linux=fail +# Appears to trigger some form of malformed code on XCode 14.3.1 +arrayfire:x64-osx=fail # Fails with "fatal error LNK1322: cannot avoid potential ARM hazard" even with /Gy allegro5:arm64-windows=fail # Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h @@ -72,11 +74,11 @@ bento4:arm-neon-android=fail berkeleydb:arm-neon-android=fail berkeleydb:arm64-android=fail berkeleydb:x64-android=fail -bgfx:x64-osx=fail # MacOSX12.1.sdk doesn't define MTLGPUFamilyApple8 binlog:arm-neon-android=fail bitserializer:arm64-osx=fail blitz:x64-android=fail -blitz:x64-linux=fail # python2 +blitz:x64-linux=fail # python2 +blitz:x64-osx=fail boinc:arm-neon-android=fail boinc:arm64-android=fail boinc:x64-android=fail @@ -225,10 +227,10 @@ coin-or-ipopt:x64-linux=fail concurrencpp:arm-neon-android=fail concurrencpp:arm64-android=fail concurrencpp:x64-android=fail -concurrencpp:x64-osx=fail coroutine:arm-neon-android=fail coroutine:arm64-android=fail coroutine:x64-android=fail +coroutine:x64-osx=fail cpp-ipc:arm-neon-android=fail cpp-ipc:arm64-android=fail cpp-ipc:x64-android=fail @@ -535,6 +537,7 @@ jinja2cpplight:x64-android=fail json-schema-validator:arm-neon-android=fail json-schema-validator:arm64-android=fail keystone:x64-linux=fail # python2 +keystone:x64-osx=fail kfr:x64-android=fail kfr:x64-uwp=fail lastools:arm-neon-android=fail @@ -671,6 +674,7 @@ libtins:arm64-android=fail libtins:x64-android=fail libtomcrypt:arm64-windows=fail libtomcrypt:arm-uwp=fail +libtorch:x64-osx=fail libusb:arm-neon-android=fail libusb:arm64-android=fail libusb:x64-android=fail @@ -1245,6 +1249,13 @@ tensorflow-cc:x64-android=fail tensorflow-cc:x64-windows-static-md=fail tensorflow-cc:x64-windows-static=fail tensorflow-cc:x64-windows=fail +# tensorflow is broken with system libraries on macOS 13.5 +# Also skipping because our macOS machines are relatively underpowered and this saves 8 hours of CI +# time for a relatively unpopular library / system combo. +tensorflow:x64-osx=skip +tensorflow:arm-osx=skip +tensorflow-cc:x64-osx=skip +tensorflow-cc:arm-osx=skip thorvg:arm-neon-android=fail thorvg:arm64-android=fail diff --git a/versions/baseline.json b/versions/baseline.json index 01c49e3ab6..262a565bfe 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -8470,7 +8470,7 @@ }, "urho3d": { "baseline": "2021-03-01", - "port-version": 4 + "port-version": 5 }, "uriparser": { "baseline": "0.9.7", diff --git a/versions/u-/urho3d.json b/versions/u-/urho3d.json index 1009d23737..4c27e17c4e 100644 --- a/versions/u-/urho3d.json +++ b/versions/u-/urho3d.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "aceb5375954d594c93c9e75ff4fd7ea0cfdb9323", + "version-date": "2021-03-01", + "port-version": 5 + }, { "git-tree": "fe6e49016a6f15bc04e04727f2e4712e75625425", "version-date": "2021-03-01",