mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 02:41:47 +08:00
Update macOS for January 2024 (#35617)
macOS 14.2.1 on amd64, 14.3 on arm64 XCode Console Tools 15.1 Other changes: macOS install is done from the installers rather than from the recovery partition readme.md is now written for a vcpkg-team audience vagrant is removed as a dependency so that discussion of how to persist the VMs between machines could be included arm64 is added using https://github.com/s-u/macosvm
This commit is contained in:
parent
f45fd3334f
commit
cf20e29526
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "libgwenhywfar",
|
||||
"version-semver": "5.6.0",
|
||||
"port-version": 4,
|
||||
"port-version": 5,
|
||||
"description": "A helper library for networking and security applications and libraries",
|
||||
"homepage": "https://www.aquamaniac.de/rdm/",
|
||||
"supports": "!windows",
|
||||
"supports": "!windows & !(osx & arm64)",
|
||||
"dependencies": [
|
||||
"libgcrypt",
|
||||
{
|
||||
|
@ -5,8 +5,8 @@ includedir=${prefix}/include/OpenSP
|
||||
|
||||
Name: opensp
|
||||
Description: SGML parser algorithm library
|
||||
Version: @OPENSP_VERSION@
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -losp
|
||||
Libs.private: @EXTRA_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
Cflags.private:
|
||||
Cflags.private:
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(OPENSP_VERSION 1.5.2)
|
||||
|
||||
set(PATCHES opensp_1.5.2-13.diff) # http://deb.debian.org/debian/pool/main/o/opensp/opensp_1.5.2-13.diff.gz
|
||||
set(PATCHES
|
||||
opensp_1.5.2-13.diff # http://deb.debian.org/debian/pool/main/o/opensp/opensp_1.5.2-13.diff.gz
|
||||
use-cpp-using-declarations.patch
|
||||
)
|
||||
if (VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_UWP)
|
||||
list(APPEND PATCHES windows_cmake_build.diff) # https://invent.kde.org/packaging/craft-blueprints-kde/-/tree/master/libs/libopensp
|
||||
endif()
|
||||
@ -9,15 +10,15 @@ if (VCPKG_TARGET_IS_UWP)
|
||||
endif()
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://downloads.sourceforge.net/project/openjade/opensp/${OPENSP_VERSION}/OpenSP-${OPENSP_VERSION}.tar.gz"
|
||||
FILENAME "OpenSP-${OPENSP_VERSION}.tar.gz"
|
||||
URLS "https://downloads.sourceforge.net/project/openjade/opensp/${VERSION}/OpenSP-${VERSION}.tar.gz"
|
||||
FILENAME "OpenSP-${VERSION}.tar.gz"
|
||||
SHA512 a7dcc246ba7f58969ecd6d107c7b82dede811e65f375b7aa3e683621f2c6ff3e7dccefdd79098fcadad6cca8bb94c2933c63f4701be2c002f9a56f1bbe6b047e
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
SOURCE_BASE ${OPENSP_VERSION}
|
||||
SOURCE_BASE ${VERSION}
|
||||
PATCHES ${PATCHES}
|
||||
)
|
||||
|
||||
|
72
ports/libopensp/use-cpp-using-declarations.patch
Normal file
72
ports/libopensp/use-cpp-using-declarations.patch
Normal file
@ -0,0 +1,72 @@
|
||||
diff --git a/include/IList.h b/include/IList.h
|
||||
index e66cd00..c94cfed 100644
|
||||
--- a/include/IList.h
|
||||
+++ b/include/IList.h
|
||||
@@ -26,7 +26,9 @@ public:
|
||||
void swap(IList<T> &list) { IListBase::swap(list); }
|
||||
T *head() const { return (T *)IListBase::head(); }
|
||||
T *get() { return (T *)IListBase::get(); }
|
||||
+ using
|
||||
IListBase::clear;
|
||||
+ using
|
||||
IListBase::empty;
|
||||
friend class IListIter<T>;
|
||||
private:
|
||||
diff --git a/include/IListIter.h b/include/IListIter.h
|
||||
index 74e1bd6..d322bf8 100644
|
||||
--- a/include/IListIter.h
|
||||
+++ b/include/IListIter.h
|
||||
@@ -17,7 +17,9 @@ public:
|
||||
IListIter(const IList<T> &list) : IListIterBase(list) { }
|
||||
T *cur() const { return (T *)IListIterBase::cur(); }
|
||||
|
||||
+ using
|
||||
IListIterBase::next;
|
||||
+ using
|
||||
IListIterBase::done;
|
||||
};
|
||||
|
||||
diff --git a/include/Ptr.h b/include/Ptr.h
|
||||
index c6b2767..5dda0ca 100644
|
||||
--- a/include/Ptr.h
|
||||
+++ b/include/Ptr.h
|
||||
@@ -69,7 +69,9 @@ public:
|
||||
const T *operator->() const { return Ptr<T>::pointer(); }
|
||||
const T &operator*() const { return *Ptr<T>::pointer(); }
|
||||
void swap(ConstPtr<T> &p) { Ptr<T>::swap(p); }
|
||||
+ using
|
||||
Ptr<T>::isNull;
|
||||
+ using
|
||||
Ptr<T>::clear;
|
||||
Boolean operator==(const Ptr<T> &p) const { return Ptr<T>::operator==(p); }
|
||||
Boolean operator!=(const Ptr<T> &p) const { return Ptr<T>::operator!=(p); }
|
||||
diff --git a/lib/Parser.h b/lib/Parser.h
|
||||
index e721000..c6c41b2 100644
|
||||
--- a/lib/Parser.h
|
||||
+++ b/lib/Parser.h
|
||||
@@ -62,15 +62,25 @@ public:
|
||||
Parser(const SgmlParser::Params &);
|
||||
Event *nextEvent();
|
||||
void parseAll(EventHandler &, const volatile sig_atomic_t *cancelPtr);
|
||||
+ using
|
||||
ParserState::sdPointer;
|
||||
+ using
|
||||
ParserState::instanceSyntaxPointer;
|
||||
+ using
|
||||
ParserState::prologSyntaxPointer;
|
||||
+ using
|
||||
ParserState::activateLinkType;
|
||||
+ using
|
||||
ParserState::allLinkTypesActivated;
|
||||
+ using
|
||||
ParserState::entityManager;
|
||||
+ using
|
||||
ParserState::entityCatalog;
|
||||
+ using
|
||||
ParserState::baseDtd;
|
||||
+ using
|
||||
ParserState::options;
|
||||
+ using
|
||||
ParserState::instantiateDtd;
|
||||
friend class PiAttspecParser;
|
||||
private:
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "libopensp",
|
||||
"version": "1.5.2",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "SGML parser algorithm",
|
||||
"homepage": "http://openjade.sourceforge.net",
|
||||
"license": "MIT",
|
||||
|
@ -11,10 +11,10 @@ vcpkg_from_github(
|
||||
|
||||
vcpkg_find_acquire_program(FLEX)
|
||||
get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY)
|
||||
vcpkg_add_to_path("${FLEX_DIR}")
|
||||
vcpkg_add_to_path(PREPEND "${FLEX_DIR}")
|
||||
vcpkg_find_acquire_program(BISON)
|
||||
get_filename_component(BISON_DIR "${BISON}" DIRECTORY)
|
||||
vcpkg_add_to_path("${BISON_DIR}")
|
||||
vcpkg_add_to_path(PREPEND "${BISON_DIR}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "openturns",
|
||||
"version": "1.20",
|
||||
"port-version": 1,
|
||||
"description": "OpenTURNS is a scientific C++ and Python library featuring an internal data model and algorithms dedicated to the treatment of uncertainties.",
|
||||
"homepage": "http://www.openturns.org",
|
||||
"license": null,
|
||||
|
@ -1,3 +1,10 @@
|
||||
vcpkg_download_distfile(
|
||||
OSX_INTEL_ALIGNMENT_FIX
|
||||
URLS https://github.com/zyantific/zydis/commit/a605f54580c26d2164530fab323057834569d169.patch?full_index=1
|
||||
SHA512 15fad10e4880ab2ee494babc0451b96604a6cc00c09c6740c6b97b83718e01d8e117614bf8f9ec8a6777e9baa1336c7f540709b21dcdc9b53f912bd117f1d3c0
|
||||
FILENAME zydis-intel-alignment-fix-a605f54580c26d2164530fab323057834569d169.patch
|
||||
)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO zyantific/zydis
|
||||
@ -6,6 +13,7 @@ vcpkg_from_github(
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
zycore.patch
|
||||
"${OSX_INTEL_ALIGNMENT_FIX}"
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZYDIS_BUILD_SHARED_LIB)
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "zydis",
|
||||
"version-semver": "4.0.0",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "Fast and lightweight x86/x86-64 disassembler library.",
|
||||
"homepage": "https://zydis.re",
|
||||
"license": "MIT",
|
||||
|
@ -5,7 +5,8 @@ variables:
|
||||
android-pool: 'PrAnd-1ES-Pool'
|
||||
linux-pool: 'PrLin-1ES-Pool'
|
||||
windows-pool: 'PrWin-2024-01-11'
|
||||
osx-pool: 'PrOsx-2023-09-11'
|
||||
osx-pool: 'PrOsx-2024-01-18'
|
||||
osx-arm64-pool: 'PrOsx-2024-01-22-arm64'
|
||||
linux-docker-image: 'andcontainerregistry.azurecr.io/vcpkg-android:2024-01-11'
|
||||
|
||||
parameters:
|
||||
@ -77,10 +78,20 @@ jobs:
|
||||
|
||||
- template: osx/azure-pipelines.yml
|
||||
parameters:
|
||||
triplet: x64-osx
|
||||
jobName: x64_osx
|
||||
poolName: $(osx-pool)
|
||||
vcpkgToolSha: ${{ parameters.vcpkgToolSha }}
|
||||
tripletPattern: ${{ parameters.tripletPattern }}
|
||||
|
||||
- template: osx/azure-pipelines.yml
|
||||
parameters:
|
||||
triplet: arm64-osx
|
||||
jobName: arm64_osx
|
||||
poolName: $(osx-arm64-pool)
|
||||
vcpkgToolSha: ${{ parameters.vcpkgToolSha }}
|
||||
tripletPattern: ${{ parameters.tripletPattern }}
|
||||
|
||||
- template: linux/azure-pipelines.yml
|
||||
parameters:
|
||||
poolName: $(linux-pool)
|
||||
|
@ -1,203 +1,246 @@
|
||||
# `vcpkg-eg-mac` VMs
|
||||
|
||||
## Table of Contents
|
||||
This is the checklist for what the vcpkg team does when updating the macOS machines in the pool.
|
||||
|
||||
- [`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)
|
||||
## Creating new base images
|
||||
|
||||
## Basic Usage
|
||||
### Prerequisites
|
||||
|
||||
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):
|
||||
|
||||
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.
|
||||
|
||||
[these instructions]: #setting-up-a-new-macos-machine
|
||||
|
||||
### 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.
|
||||
This is pretty easy, but the results of the creation are not public,
|
||||
since we're concerned about licensing.
|
||||
However, if you're sure you're following Apple's licensing,
|
||||
you can set up your own vagrant boxes that are the same as ours by doing the following:
|
||||
|
||||
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: <https://developer.apple.com/downloads>
|
||||
|
||||
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:
|
||||
|
||||
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,
|
||||
and turn it on.
|
||||
You'll then want to add the vagrant SSH keys to the VM's vagrant user.
|
||||
Open the terminal application and run the following:
|
||||
|
||||
```sh
|
||||
$ # basic stuff
|
||||
$ date | sudo tee '/etc/vagrant_box_build_time'
|
||||
$ printf 'vagrant\tALL=(ALL)\tNOPASSWD:\tALL\n' | sudo tee -a '/etc/sudoers.d/vagrant'
|
||||
$ sudo chmod 0440 '/etc/sudoers.d/vagrant'
|
||||
$ # then install vagrant keys
|
||||
$ mkdir -p ~/.ssh
|
||||
$ curl -fsSL 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' >~/.ssh/authorized_keys
|
||||
$ chmod 0600 ~/.ssh/authorized_keys
|
||||
```
|
||||
|
||||
Now, let's package the VM into a base box.
|
||||
(The following instructions are adapted from
|
||||
[these official instructions][base-box-instructions]).
|
||||
|
||||
Shut down the VM cleanly. On the host, run the following commands:
|
||||
|
||||
```sh
|
||||
$ cd ~/Parallels
|
||||
$ echo '{ "provider": "parallels" }' >metadata.json
|
||||
$ prl_disk_tool compact --hdd ./<name of VM>.pvm/harddisk.hdd
|
||||
$ tar zcvf <name-of-box>.box ./metadata.json ./<name of VM>.pvm
|
||||
$ rm ./metadata.json
|
||||
```
|
||||
|
||||
This will create a box file which contains all the necessary data.
|
||||
|
||||
```sh
|
||||
$ vagrant box add <name-of-box>.box --name <name-of-box>
|
||||
```
|
||||
|
||||
Then, we'll create the final box,
|
||||
which contains all the necessary programs for doing CI work.
|
||||
Copy `Vagrantfile-box.rb` as `Vagrantfile`
|
||||
into a new directory. Edit the config.vm.box line to <name-of-box>.
|
||||
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, 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
|
||||
|
||||
### 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
|
||||
|
||||
First, make sure that your software is up to date, first by checking in
|
||||
|
||||
* macOS system settings
|
||||
* Parallels' UI
|
||||
* homebrew:
|
||||
- [ ] A Parallels license for amd64 or [macosvm](https://github.com/s-u/macosvm) allow-listed
|
||||
by macOS for arm64. Note that the directory 'Parallels' is still used when using `macosvm`
|
||||
just so that scripts know where to find the VM and friends.
|
||||
- [ ] 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>
|
||||
If you are doing this from a local macos box, you can skip to the "update the macos host" step.
|
||||
If copying from a local box to one of the macOS machines, you can use scp:
|
||||
```sh
|
||||
$ brew update
|
||||
$ brew upgrade
|
||||
scp Command_Line_Tools_for_Xcode_15.dmg vcpkg@<DNS of the machine>:/Users/vcpkg/clt.dmg
|
||||
```
|
||||
|
||||
If this machine has been used before, you might have to remove an existing boxes:
|
||||
### Instructions (AMD64)
|
||||
|
||||
```sh
|
||||
$ cd ~/vagrant/vcpkg-ec-mac
|
||||
$ vagrant halt
|
||||
$ vagrant destroy
|
||||
$ cd ~
|
||||
$ rm -rf ~/vagrant
|
||||
$ mkdir ~/vagrant
|
||||
```
|
||||
- [ ] Go to https://dev.azure.com/vcpkg/public/_settings/agentqueues , pick the current osx queue,
|
||||
and delete one of the agents that are idle.
|
||||
- [ ] Go to that machine in the KVM. (Passwords are stored as secrets in the CPP_GITHUB\vcpkg\vcpkgmm-passwords key vault)
|
||||
- [ ] Open a terminal and destroy any old vagrant VMs or boxes
|
||||
```sh
|
||||
cd ~/vagrant
|
||||
vagrant halt
|
||||
vagrant destroy
|
||||
vagrant box list
|
||||
vagrant box remove <any boxes listed by previous command>
|
||||
brew remove hashicorp-vagrant
|
||||
```
|
||||
- [ ] Open the Parallels Control Center, and delete the active VM.
|
||||
- [ ] Update the macos host
|
||||
- [ ] Update or install parallels
|
||||
- [ ] Download the macOS installer from the app store. See https://support.apple.com/en-us/102662
|
||||
Note: This portion of the instructions is that which breaks most often depending on what Parallels and macOS are doing.
|
||||
You might need to use `softwareupdate --fetch-full-installer --full-installer-version 14.2` and point Parallels
|
||||
at that resulting installer in 'Applications' instead.
|
||||
- [ ] Run parallels, and select that installer you just downloaded. Name the VM "vcpkg-osx-<DATE>-amd64", for example "vcpkg-osx-2024-01-18-amd64".
|
||||
- [ ] When creating the VM, customize the hardware to the following:
|
||||
* 12 processors
|
||||
* 24000 MB of memory
|
||||
* 350 GB disk
|
||||
* Do not share mac camera
|
||||
- [ ] Install MacOS like you would on real hardware.
|
||||
* Apple ID: 'Set Up Later' / Skip
|
||||
* Account name: vcpkg
|
||||
* Account password: vcpkg
|
||||
- [ ] Install Parallels Tools
|
||||
- [ ] Restart the VM
|
||||
- [ ] Change the desktop background to a solid color
|
||||
- [ ] Enable remote login in System Settings -> General -> Sharing -> Remote Login
|
||||
- [ ] Shut down the VM cleanly
|
||||
- [ ] Set the VM 'Isolated'
|
||||
- [ ] Update the Azure Agent URI in setup-box.sh to the current version. You can find this by going to the agent pool, selecting "New agent", picking macOS, and copying the link. For example https://vstsagentpackage.azureedge.net/agent/3.232.0/vsts-agent-osx-x64-3.232.0.tar.gz
|
||||
- [ ] In the guest, set the vcpkg user to be able to use sudo without a password:
|
||||
```sh
|
||||
printf 'vcpkg\tALL=(ALL)\tNOPASSWD:\tALL\n' | sudo tee -a '/etc/sudoers.d/vcpkg'
|
||||
sudo chmod 0440 '/etc/sudoers.d/vcpkg'
|
||||
```
|
||||
- [ ] Copy setup-guest, setup-box.sh, and the xcode installer renamed to 'clt.dmg' to the host, and run setup-guest.sh. For example:
|
||||
```sh
|
||||
scp ./setup-guest.sh vcpkg@MACHINE:/Users/vcpkg/Downloads
|
||||
scp ./setup-box.sh vcpkg@MACHINE:/Users/vcpkg/Downloads
|
||||
scp path/to/console/tools.dmg vcpkg@MACHINE:/Users/vcpkg/Downloads/clt.dmg
|
||||
ssh vcpkg@MACHINE
|
||||
cd /Users/vcpkg/Downloads
|
||||
chmod +x ./setup-guest.sh
|
||||
./setup-guest.sh
|
||||
exit
|
||||
```
|
||||
- [ ] Shut down the VM cleanly.
|
||||
- [ ] In Parallels control center, right click the VM and select "Prepare for Transfer"
|
||||
- [ ] In Parallels control center, right click the VM and remove it, but "Keep Files"
|
||||
- [ ] Copy the packaged VM to Azure Storage, with something like:
|
||||
```sh
|
||||
ssh vcpkg@MACHINE
|
||||
brew install azcopy
|
||||
azcopy copy ~/Parallels/vcpkg-macos-2024-01-18-amd64.pvmp "https://vcpkgimageminting...../pvms?<SAS>"
|
||||
azcopy copy ~/Parallels/vcpkg-macos-2024-01-18-amd64.sha256.txt "https://vcpkgimageminting...../pvms?<SAS>"
|
||||
```
|
||||
- [ ] Go to https://dev.azure.com/vcpkg/public/_settings/agentqueues and create a new self hosted Agent pool named `PrOsx-YYYY-MM-DD` based on the current date. Check 'Grant access permission to all pipelines.'
|
||||
- [ ] Remove the macOS installer from Applications
|
||||
- [ ] Follow the "Deploying images" steps below for each machine in the fleet.
|
||||
|
||||
[grab a PAT], mint a SAS token to vcpkg-image-minting/vcpkgvagrantboxes/boxes, and pull the box:
|
||||
### Instructions (ARM64)
|
||||
|
||||
```sh
|
||||
$ vagrant box list
|
||||
$ vagrant box remove <any boxes listed by previous command>
|
||||
$ vagrant box add 'https://vcpkgvagrantboxes.blob.core.windows.net/boxes/<name of box>.box?<SAS token>' --name <name of box>
|
||||
```
|
||||
- [ ] Go to https://dev.azure.com/vcpkg/public/_settings/agentqueues , pick the current osx queue,
|
||||
and delete one of the agents that are idle.
|
||||
- [ ] Go to that machine in the KVM. (Passwords are stored as secrets in the CPP_GITHUB\vcpkg\vcpkgmm-passwords key vault)
|
||||
- [ ] Update the macos host
|
||||
- [ ] (Once only) install `macosvm` to `~` (this tarball is also backed up in our `vcpkg-image-minting` storage account):
|
||||
```sh
|
||||
curl -L -o macosvm-0.2-1-arm64-darwin21.tar.gz https://github.com/s-u/macosvm/releases/download/0.2-1/macosvm-0.2-1-arm64-darwin21.tar.gz
|
||||
tar xvf macosvm-0.2-1-arm64-darwin21.tar.gz
|
||||
rm macosvm-0.2-1-arm64-darwin21.tar.gz
|
||||
```
|
||||
- [ ] Download the matching `.ipsw` for the macOS copy to install. See https://mrmacintosh.com/apple-silicon-m1-full-macos-restore-ipsw-firmware-files-database/ ; links there to find the .ipsw. Example: https://updates.cdn-apple.com/2024WinterFCS/fullrestores/042-78241/B45074EB-2891-4C05-BCA4-7463F3AC0982/UniversalMac_14.3_23D56_Restore.ipsw
|
||||
- [ ] Determine the VM name using the form "vcpkg-osx-<date>-arm64", for example "vcpkg-osx-2024-01-22-arm64".
|
||||
- [ ] Open a terminal and run the following commands to create the VM with vcpkg-osx-2024-01-22-arm64 and UniversalMac_14.3_23D56_Restore.ipsw replaced as appropriate.
|
||||
```sh
|
||||
mkdir -p ~/Parallels/vcpkg-osx-2024-01-22-arm64
|
||||
cd ~/Parallels/vcpkg-osx-2024-01-22-arm64
|
||||
~/macosvm --disk disk.img,size=500g --aux aux.img -c 8 -r 12g --restore ~/UniversalMac_14.3_23D56_Restore.ipsw ./vm.json
|
||||
~/macosvm -g ./vm.json
|
||||
```
|
||||
- [ ] Follow prompts as you would on real hardware.
|
||||
* Apple ID: 'Set Up Later' / Skip
|
||||
* Account name: vcpkg
|
||||
* Account password: vcpkg
|
||||
* No location services
|
||||
* Yes send crash reports
|
||||
- [ ] Set the desktop wallpaper to a fixed color from Settings -> Wallpaper . (This makes the KVM a lot easier to use :) )
|
||||
- [ ] Enable remote login in the VM: Settings -> General -> Sharing -> Remote Login
|
||||
- [ ] Set the vcpkg user to be able to use sudo without a password:
|
||||
```sh
|
||||
ssh -o StrictHostKeychecking=no vcpkg@vcpkgs-Virtual-Machine.local
|
||||
printf 'vcpkg\tALL=(ALL)\tNOPASSWD:\tALL\n' | sudo tee -a '/etc/sudoers.d/vcpkg'
|
||||
sudo chmod 0440 '/etc/sudoers.d/vcpkg'
|
||||
exit
|
||||
```
|
||||
- [ ] Update the Azure Agent URI in setup-box.sh to the current version. You can find this by going to the agent pool, selecting "New agent", picking macOS, and copying the link. For example https://vstsagentpackage.azureedge.net/agent/3.232.1/vsts-agent-osx-arm64-3.232.1.tar.gz
|
||||
- [ ] Copy setup-box.sh and the xcode installer renamed to 'clt.dmg' to the host. For example from a dev workstation:
|
||||
```sh
|
||||
scp ./setup-guest.sh vcpkg@MACHINE:/Users/vcpkg
|
||||
scp ./setup-box.sh vcpkg@MACHINE:/Users/vcpkg
|
||||
scp path/to/console/tools.dmg vcpkg@MACHINE:/Users/vcpkg/clt.dmg
|
||||
ssh vcpkg@MACHINE
|
||||
chmod +x setup-guest.sh
|
||||
./setup-guest.sh
|
||||
rm setup-guest.sh
|
||||
rm setup-box.sh
|
||||
```
|
||||
- [ ] Shut down the VM cleanly.
|
||||
- [ ] Remove the VM in Parallels Control Center, and 'Keep Files'
|
||||
- [ ] Mint a SAS token to vcpkgimageminting/pvms with read, add, create, write, and list permissions.
|
||||
- [ ] Open a terminal on the host and package the VM into a tarball:
|
||||
```sh
|
||||
cd ~/Parallels
|
||||
aa archive -d vcpkg-osx-<date>-arm64 -o vcpkg-osx-<date>-arm64.aar -enable-holes
|
||||
brew install azcopy
|
||||
azcopy copy vcpkg-osx-<date>-arm64.aar "https://vcpkgimageminting.blob.core.windows.net/pvms?<SAS>"
|
||||
rm *.aar
|
||||
```
|
||||
- [ ] Go to https://dev.azure.com/vcpkg/public/_settings/agentqueues and create a new self hosted Agent pool named `PrOsx-YYYY-MM-DD-arm64` based on the current date. Check 'Grant access permission to all pipelines.'
|
||||
- [ ] Follow the "Deploying images" steps below for each machine in the fleet.
|
||||
|
||||
Copy the contents of Vagrantfile-vm.rb to ~/vagrant/Vagrantfile, and edit the values at the top
|
||||
to match this particular machine:
|
||||
## Deploying images
|
||||
|
||||
* machine_name
|
||||
* box
|
||||
* azure_agent_url should be changed to the latest version
|
||||
* agent_pool
|
||||
* pat
|
||||
### Running the VM (AMD64)
|
||||
|
||||
Then:
|
||||
Run these steps on each machine to add to the fleet. Skip steps that were done implicitly above if this machine was used to build a box.
|
||||
|
||||
```sh
|
||||
$ cd ~/vagrant
|
||||
$ vagrant up
|
||||
```
|
||||
- [ ] If this machine was used before, delete it from the pool of which it is a member from https://dev.azure.com/vcpkg/public/_settings/agentqueues
|
||||
- [ ] Log in to the machine using the KVM.
|
||||
- [ ] Open a terminal and destroy any old vagrant VMs or boxes
|
||||
```sh
|
||||
$ cd ~/vagrant
|
||||
$ vagrant halt
|
||||
$ vagrant destroy
|
||||
$ vagrant box list
|
||||
$ vagrant box remove <any boxes listed by previous command except the one to use>
|
||||
$ brew remove hashicorp-vagrant
|
||||
```
|
||||
- [ ] Check for software updates in macOS system settings
|
||||
- [ ] Check for software updates in Parallels' UI
|
||||
- [ ] Mint a SAS token URI to the box to use from the Azure portal if you don't already have one, and download the VM. (Recommend running this via SSH from domain joined machine due to containing SAS tokens)
|
||||
```sh
|
||||
brew install azcopy
|
||||
cd ~/Parallels
|
||||
azcopy copy "https://vcpkgimageminting.blob.core.windows.net/pvms/vcpkg-osx-<DATE>-amd64.pvmp?<SAS>" .
|
||||
azcopy copy "https://vcpkgimageminting.blob.core.windows.net/pvms/vcpkg-osx-<DATE>-amd64.sha256.txt?<SAS>" .
|
||||
```
|
||||
- [ ] Open the .pvmp in Parallels, and unpack it.
|
||||
- [ ] Start the VM
|
||||
- [ ] [grab a PAT][] if you don't already have one
|
||||
- [ ] Copy the guest deploy script to the host, and run it with a first parameter of your PAT
|
||||
```sh
|
||||
scp ./register-guest.sh vcpkg@MACHINE:/Users/vcpkg
|
||||
ssh vcpkg@MACHINE
|
||||
chmod +x /Users/vcpkg/register-guest.sh
|
||||
/Users/vcpkg/register-guest.sh <PAT>
|
||||
```
|
||||
- [ ] Open a terminal window on the host and run the agent
|
||||
```
|
||||
ssh -i ~/Parallels/*/id_guest -o StrictHostKeychecking=no vcpkg@`prlctl list --full | sed -nr 's/^.*running *([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/\1/p'`
|
||||
~/myagent/run.sh
|
||||
```
|
||||
- [ ] Check that the machine shows up in the pool, and lock the vcpkg user on the host.
|
||||
- [ ] Lock the screen on the host.
|
||||
- [ ] Update the "vcpkg Macs" spreadsheet line for the machine with the new pool.
|
||||
|
||||
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
|
||||
|
||||
### Running the VM (ARM64)
|
||||
|
||||
Run these steps on each machine to add to the fleet. Skip steps that were done implicitly above if this machine was used to build a box.
|
||||
|
||||
- [ ] If this machine was used before, delete it from the pool of which it is a member from https://dev.azure.com/vcpkg/public/_settings/agentqueues
|
||||
- [ ] Log in to the machine using the KVM.
|
||||
- [ ] Check for software updates in macOS system settings
|
||||
- [ ] (Once only) install `macosvm` to `~` (this tarball is also backed up in our `vcpkg-image-minting` storage account):
|
||||
```sh
|
||||
curl -L -o macosvm-0.2-1-arm64-darwin21.tar.gz https://github.com/s-u/macosvm/releases/download/0.2-1/macosvm-0.2-1-arm64-darwin21.tar.gz
|
||||
tar xvf macosvm-0.2-1-arm64-darwin21.tar.gz
|
||||
rm macosvm-0.2-1-arm64-darwin21.tar.gz
|
||||
```
|
||||
- [ ] Skip if this is the image building machine. Mint a SAS token URI to the box to use from the Azure portal if you don't already have one, and download the VM. (Recommend running this via SSH from domain joined machine due to containing SAS tokens)
|
||||
```sh
|
||||
mkdir -p ~/Parallels
|
||||
cd ~/Parallels
|
||||
azcopy copy "https://vcpkgimageminting.blob.core.windows.net/pvms/vcpkg-osx-<DATE>-arm64.aar?<SAS>" vcpkg-osx-<DATE>-arm64.aar
|
||||
aa extract -d vcpkg-osx-<DATE>-arm64 -i ./vcpkg-osx-<DATE>-arm64.aar -enable-holes
|
||||
```
|
||||
- [ ] Open a separate terminal window on the host and start the VM by running:
|
||||
```sh
|
||||
cd ~/Parallels/vcpkg-osx-<DATE>-arm64
|
||||
~/macosvm ./vm.json
|
||||
```
|
||||
- [ ] [grab a PAT][] if you don't already have one
|
||||
- [ ] Copy the guest deploy script to the host, and run it with a first parameter of your PAT. From a developer machine:
|
||||
```sh
|
||||
scp ./register-guest.sh vcpkg@MACHINE:/Users/vcpkg
|
||||
ssh vcpkg@MACHINE
|
||||
chmod +x register-guest.sh
|
||||
./register-guest.sh <PAT>
|
||||
rm register-guest.sh
|
||||
exit
|
||||
```
|
||||
- [ ] In the KVM's terminal, relaunch the VM in ephemeral mode with:
|
||||
```sh
|
||||
~/macosvm --ephemeral ./vm.json
|
||||
```
|
||||
- [ ] Open a terminal window on the host and run the agent
|
||||
```sh
|
||||
ssh -i ~/Parallels/*/id_guest -o StrictHostKeychecking=no vcpkg@vcpkgs-Virtual-Machine.local
|
||||
~/myagent/run.sh
|
||||
```
|
||||
- [ ] Check that the machine shows up in the pool, and lock the vcpkg user on the host.
|
||||
- [ ] Lock the screen on the host.
|
||||
- [ ] Update the "vcpkg Macs" spreadsheet line for the machine with the new pool.
|
||||
|
||||
[grab a PAT]: #getting-an-azure-pipelines-pat
|
||||
|
||||
@ -214,13 +257,3 @@ 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
|
||||
|
||||
* 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
|
||||
```
|
||||
|
@ -1,31 +0,0 @@
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = 'macos-13-5'
|
||||
config.vm.synced_folder '.', '/Users/vagrant/shared'
|
||||
|
||||
config.vm.provision 'shell',
|
||||
run: 'once',
|
||||
name: 'Install Xcode Command Line Tools: attach dmg file',
|
||||
inline: 'hdiutil attach shared/clt.dmg -mountpoint /Volumes/setup-installer',
|
||||
privileged: false
|
||||
config.vm.provision 'shell',
|
||||
run: 'once',
|
||||
name: 'Install Xcode Command Line Tools: run installer',
|
||||
inline: 'installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /',
|
||||
privileged: true
|
||||
config.vm.provision 'shell',
|
||||
run: 'once',
|
||||
name: 'Install XCode Command Line Tools: detach dmg file',
|
||||
inline: 'hdiutil detach /Volumes/setup-installer',
|
||||
privileged: false
|
||||
|
||||
config.vm.provision 'shell',
|
||||
run: 'once',
|
||||
name: 'Install brew',
|
||||
inline: '/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"',
|
||||
privileged: false
|
||||
config.vm.provision 'shell',
|
||||
run: 'once',
|
||||
name: 'Install brew applications',
|
||||
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
|
@ -1,63 +0,0 @@
|
||||
server = {
|
||||
:machine_name => 'vcpkg-eg-mac-11',
|
||||
:box => 'vcpkg-macos-2023-09-11',
|
||||
:box_version => '0',
|
||||
:ram => 24000,
|
||||
:cpu => 12
|
||||
}
|
||||
|
||||
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 = '<replace with PAT>'
|
||||
|
||||
Vagrant.configure('2') do |config|
|
||||
config.vm.box = server[:box]
|
||||
config.vm.box_version = server[:box_version]
|
||||
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 #{server[:machine_name]} \
|
||||
--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
|
@ -7,6 +7,12 @@ parameters:
|
||||
displayName: 'Custom SHA of vcpkg-tool to use rather than bootstrap'
|
||||
type: string
|
||||
default: 'use default'
|
||||
- name: triplet
|
||||
type: string
|
||||
default: 'x64-osx'
|
||||
- name: jobName
|
||||
type: string
|
||||
default: 'x64_osx'
|
||||
- name: poolName
|
||||
type: string
|
||||
- name: tripletPattern
|
||||
@ -15,8 +21,8 @@ parameters:
|
||||
default: ''
|
||||
|
||||
jobs:
|
||||
- job: x64_osx
|
||||
condition: and(succeeded(), contains('^x64-osx$', '${{ parameters.tripletPattern }}'))
|
||||
- job: ${{ parameters.jobName }}
|
||||
condition: and(succeeded(), contains('^${{ parameters.triplet }}$', '${{ parameters.tripletPattern }}'))
|
||||
pool:
|
||||
name: ${{ parameters.poolName }}
|
||||
workspace:
|
||||
@ -24,9 +30,9 @@ jobs:
|
||||
timeoutInMinutes: 2880 # 2 days
|
||||
variables:
|
||||
- name: WORKING_ROOT
|
||||
value: /Users/vagrant/Data
|
||||
value: /Users/vcpkg/Data
|
||||
- name: VCPKG_DOWNLOADS
|
||||
value: /Users/vagrant/Data/downloads
|
||||
value: /Users/vcpkg/Data/downloads
|
||||
- group: vcpkg-binary-caching-credentials
|
||||
- name: X_VCPKG_BINARY_SOURCE_STUB
|
||||
value: "x-azblob,$(root-bin-url),$(sas-bin)" # not in eastasia due to physical location
|
||||
@ -43,9 +49,7 @@ jobs:
|
||||
- bash: ./bootstrap-vcpkg.sh
|
||||
displayName: 'Bootstrap vcpkg'
|
||||
condition: eq('use default', '${{ parameters.vcpkgToolSha }}')
|
||||
- bash: |
|
||||
brew install cmake
|
||||
./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }}
|
||||
- bash: ./scripts/azure-pipelines/bootstrap-from-source.sh ${{ parameters.vcpkgToolSha }}
|
||||
displayName: "Build vcpkg with CMake"
|
||||
condition: ne('use default', '${{ parameters.vcpkgToolSha }}')
|
||||
- task: PowerShell@2
|
||||
@ -54,7 +58,7 @@ jobs:
|
||||
failOnStderr: true
|
||||
filePath: 'scripts/azure-pipelines/test-modified-ports.ps1'
|
||||
arguments: >
|
||||
-Triplet "x64-osx"
|
||||
-Triplet ${{ parameters.triplet }}
|
||||
-BuildReason "$(Build.Reason)"
|
||||
-BinarySourceStub "${{ variables.X_VCPKG_BINARY_SOURCE_STUB }}"
|
||||
-WorkingRoot "${{ variables.WORKING_ROOT }}"
|
||||
@ -64,23 +68,23 @@ jobs:
|
||||
displayName: 'Publish Artifact: failure logs for x64-osx'
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/failure-logs'
|
||||
ArtifactName: 'failure logs for x64-osx${{ variables.Postfix }}'
|
||||
ArtifactName: 'failure logs for ${{ parameters.triplet }}'
|
||||
condition: ne(variables['FAILURE_LOGS_EMPTY'], 'True')
|
||||
- bash: python3 scripts/file_script.py /Users/vagrant/Data/installed/vcpkg/info/
|
||||
- bash: python3 scripts/file_script.py /Users/vcpkg/Data/installed/vcpkg/info/
|
||||
displayName: 'Build a file list for all packages'
|
||||
condition: always()
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: file lists for x64-osx${{ variables.Postfix }}'
|
||||
displayName: 'Publish Artifact: file lists for ${{ parameters.triplet }}'
|
||||
condition: always()
|
||||
inputs:
|
||||
PathtoPublish: scripts/list_files
|
||||
ArtifactName: 'file lists for x64-osx${{ variables.Postfix }}'
|
||||
ArtifactName: 'file lists for ${{ parameters.triplet }}'
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish Test Results'
|
||||
condition: ne(variables['XML_RESULTS_FILE'], '')
|
||||
inputs:
|
||||
testRunTitle: x64-osx
|
||||
testRunTitle: ${{ parameters.triplet }}
|
||||
testResultsFormat: xUnit
|
||||
testResultsFiles: $(XML_RESULTS_FILE)
|
||||
platform: x64-osx
|
||||
platform: ${{ parameters.triplet }}
|
||||
configuration: static
|
||||
|
20
scripts/azure-pipelines/osx/register-guest.sh
Normal file
20
scripts/azure-pipelines/osx/register-guest.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
if [ -z "$1" ]; then
|
||||
echo "PAT missing"
|
||||
exit 1
|
||||
fi
|
||||
export AGENT=`hostname | sed -nr 's/([^.]+).+/\1/p'`
|
||||
if [ `uname -m` = 'arm64' ]; then
|
||||
export POOL=`echo ~/Parallels/* | sed -nr 's/\/Users\/vcpkg\/Parallels\/vcpkg-osx-([0-9]{4}-[0-9]{2}-[0-9]{2})-arm64/PrOsx-\1-arm64/p'`
|
||||
# on arm64, DNS works
|
||||
export SSH_COOKIE=vcpkg@vcpkgs-Virtual-Machine.local
|
||||
else
|
||||
export POOL=`echo ~/Parallels/*.pvm | sed -nr 's/\/Users\/vcpkg\/Parallels\/vcpkg-osx-([0-9]{4}-[0-9]{2}-[0-9]{2})-amd64\.pvm/PrOsx-\1/p'`
|
||||
# on amd64, DNS does not work, but luckily for us prlctl does know the IP
|
||||
export GUEST_IP=`prlctl list --full | sed -nr 's/^.*running *([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/\1/p'`
|
||||
export SSH_COOKIE=vcpkg@$GUEST_IP
|
||||
fi
|
||||
ssh $SSH_COOKIE -i ~/Parallels/*/id_guest -o StrictHostKeychecking=no "~/myagent/config.sh --unattended --url https://dev.azure.com/vcpkg --work ~/Data/work --auth pat --token $1 --pool $POOL --agent $AGENT --replace --acceptTeeEula"
|
||||
if [ `uname -m` = 'arm64' ]; then
|
||||
ssh $SSH_COOKIE -i ~/Parallels/*/id_guest -o StrictHostKeychecking=no "sudo shutdown -h now"
|
||||
fi
|
24
scripts/azure-pipelines/osx/setup-box.sh
Normal file
24
scripts/azure-pipelines/osx/setup-box.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
hdiutil attach clt.dmg -mountpoint /Volumes/setup-installer
|
||||
sudo installer -pkg "/Volumes/setup-installer/Command Line Tools.pkg" -target /
|
||||
hdiutil detach /Volumes/setup-installer
|
||||
rm clt.dmg
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
if [ `uname -m` = 'arm64' ]; then
|
||||
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/vcpkg/.zprofile
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
else
|
||||
(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/vcpkg/.zprofile
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
fi
|
||||
brew install autoconf-archive autoconf automake bison cmake gettext gfortran gperf gtk-doc libtool meson mono nasm ninja pkg-config powershell texinfo yasm
|
||||
mkdir ~/Data
|
||||
if [ `uname -m` = 'arm64' ]; then
|
||||
curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.232.1/vsts-agent-osx-arm64-3.232.1.tar.gz
|
||||
else
|
||||
curl -s -o ~/Downloads/azure-agent.tar.gz https://vstsagentpackage.azureedge.net/agent/3.232.1/vsts-agent-osx-x64-3.232.1.tar.gz
|
||||
fi
|
||||
mkdir ~/myagent
|
||||
tar xf ~/Downloads/azure-agent.tar.gz -C ~/myagent
|
||||
rm ~/Downloads/azure-agent.tar.gz
|
||||
rm setup-box.sh
|
20
scripts/azure-pipelines/osx/setup-guest.sh
Normal file
20
scripts/azure-pipelines/osx/setup-guest.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
export VM_DIRECTORY=`ls ~/Parallels | grep vcpkg-osx`
|
||||
export SSH_KEY="$HOME/Parallels/$VM_DIRECTORY/id_guest"
|
||||
export SSH_PUBLIC_KEY="$SSH_KEY.pub"
|
||||
ssh-keygen -P '' -f "$SSH_KEY"
|
||||
if [ `uname -m` = 'arm64' ]; then
|
||||
# on arm64, prlctl does not know the IP address, but luckily for us DNS works
|
||||
export SSH_COOKIE=vcpkg@vcpkgs-Virtual-Machine.local
|
||||
else
|
||||
# on amd64, DNS does not work, but luckily for us prlctl does know the IP
|
||||
export GUEST_IP=`prlctl list --full | sed -nr 's/^.*running *([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}).*/\1/p'`
|
||||
export SSH_COOKIE=vcpkg@$GUEST_IP
|
||||
fi
|
||||
echo Type 'vcpkg' and press enter
|
||||
ssh-copy-id -o StrictHostKeychecking=no -i "$SSH_PUBLIC_KEY" $SSH_COOKIE
|
||||
echo Keys deployed
|
||||
ssh $SSH_COOKIE -o StrictHostKeychecking=no -i "$SSH_KEY" echo hello from \`hostname\`
|
||||
scp -o StrictHostKeychecking=no -i "$SSH_KEY" ./setup-box.sh $SSH_COOKIE:/Users/vcpkg/setup-box.sh
|
||||
ssh $SSH_COOKIE -o StrictHostKeychecking=no -i "$SSH_KEY" chmod +x /Users/vcpkg/setup-box.sh
|
||||
ssh $SSH_COOKIE -o StrictHostKeychecking=no -i "$SSH_KEY" /Users/vcpkg/setup-box.sh
|
@ -37,3 +37,4 @@
|
||||
this N is the other key. (Jan = 2, Feb = 1, Mar = 2, and so on)
|
||||
* [ ] Mint a new macOS base box. (See instructions in `scripts/azure-pipelines/osx/README.md`)
|
||||
* [ ] Deploy the new base box to all hosts.
|
||||
* [ ] Update the software on the CTI's machine #12 to match.
|
||||
|
@ -108,7 +108,7 @@ if ($IsLinuxHost) {
|
||||
$env:HOME = '/home/agent'
|
||||
$executableExtension = [string]::Empty
|
||||
}
|
||||
elseif ($Triplet -eq 'x64-osx') {
|
||||
elseif ($Triplet -eq 'x64-osx' -or $Triplet -eq 'arm64-osx') {
|
||||
$executableExtension = [string]::Empty
|
||||
}
|
||||
else {
|
||||
|
@ -45,20 +45,21 @@ ace:x64-android=fail
|
||||
allegro5:arm-neon-android=fail
|
||||
allegro5:arm64-android=fail
|
||||
allegro5:x64-android=fail
|
||||
# Fails with "fatal error LNK1322: cannot avoid potential ARM hazard" even with /Gy
|
||||
allegro5:arm64-windows=fail
|
||||
# Fails to build in CMake 3.28 attempting to pass $<LINK_ONLY:ZLIB::ZLIB>; https://gitlab.kitware.com/cmake/cmake/-/issues/25635
|
||||
allegro5:x64-osx=fail
|
||||
allegro5:arm64-osx=fail
|
||||
ampl-asl:x64-android=fail
|
||||
apr:arm-neon-android=fail
|
||||
apr:arm64-android=fail
|
||||
apr:x64-android=fail
|
||||
# Cross compiling CI machine cannot run gen_test_char to generate apr_escape_test_char.h
|
||||
apr:arm64-windows=fail
|
||||
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
|
||||
apr:arm64-windows=fail
|
||||
avro-c:arm-neon-android=fail
|
||||
avro-c:arm64-android=fail
|
||||
avro-c:x64-android=fail
|
||||
@ -519,6 +520,8 @@ libcrafter:x64-android=fail
|
||||
libdc1394:arm-neon-android=fail
|
||||
libdc1394:x64-android=fail
|
||||
libdc1394:arm64-android=fail
|
||||
# Fails to build due to incompatible delcaration of select in macOS 14.2
|
||||
libgo:x64-osx=fail
|
||||
libgo:x64-android=fail
|
||||
libgpg-error:arm-neon-android=fail
|
||||
libgpg-error:arm64-android=fail
|
||||
@ -607,15 +610,16 @@ libraw:arm-neon-android=fail
|
||||
# Conflicts with openssl
|
||||
libressl:arm-neon-android=skip
|
||||
libressl:arm64-android=skip
|
||||
libressl:x64-android=skip
|
||||
libressl:arm64-windows=skip
|
||||
libressl:arm64-osx=skip
|
||||
libressl:arm64-uwp=skip
|
||||
libressl:arm64-windows=skip
|
||||
libressl:x64-android=skip
|
||||
libressl:x64-linux=skip
|
||||
libressl:x64-osx=skip
|
||||
libressl:x64-uwp=skip
|
||||
libressl:x64-windows=skip
|
||||
libressl:x64-windows-static=skip
|
||||
libressl:x64-windows-static-md=skip
|
||||
libressl:x64-windows-static=skip
|
||||
libressl:x64-windows=skip
|
||||
libressl:x86-windows=skip
|
||||
libsoundio:arm64-windows=fail
|
||||
libtar:arm-neon-android=fail
|
||||
@ -775,6 +779,7 @@ nana:arm64-android=fail
|
||||
nana:x64-android=fail
|
||||
nana:x64-linux=fail
|
||||
nana:x64-osx=fail
|
||||
nana:arm64-osx=fail
|
||||
nanodbc:x64-linux=skip
|
||||
netcdf-cxx4:x64-windows-static-md=fail
|
||||
ngspice:x64-android=fail
|
||||
@ -861,23 +866,23 @@ openscap:arm64-osx=fail
|
||||
openscap:x64-windows-static-md=fail
|
||||
openscap:x64-windows-static=fail
|
||||
opensubdiv:x64-android=fail
|
||||
# osx needs bison 3.4 installed
|
||||
openturns:x64-osx=fail
|
||||
openvpn3:x64-osx=fail
|
||||
openvpn3:arm64-osx=fail
|
||||
openvr:x64-windows-static=fail
|
||||
optional-bare:arm64-windows = skip
|
||||
optional-bare:arm64-uwp = skip
|
||||
optional-bare:x64-linux = skip
|
||||
optional-bare:x64-osx = skip
|
||||
optional-bare:x64-uwp = skip
|
||||
optional-bare:x64-windows = skip
|
||||
optional-bare:x64-windows-static = skip
|
||||
# Conflicts with optional-lite, by the same author
|
||||
optional-bare:arm-neon-android=skip
|
||||
optional-bare:arm64-android=skip
|
||||
optional-bare:arm64-osx=skip
|
||||
optional-bare:arm64-uwp=skip
|
||||
optional-bare:arm64-windows=skip
|
||||
optional-bare:x64-android=skip
|
||||
optional-bare:x64-linux=skip
|
||||
optional-bare:x64-osx=skip
|
||||
optional-bare:x64-uwp=skip
|
||||
optional-bare:x64-windows-static-md=skip
|
||||
optional-bare:x86-windows = skip
|
||||
optional-lite:arm-neon-android=fail
|
||||
optional-lite:arm64-android=fail
|
||||
optional-lite:x64-android=fail
|
||||
optional-bare:x64-windows-static=skip
|
||||
optional-bare:x64-windows=skip
|
||||
optional-bare:x86-windows=skip
|
||||
orc:arm-neon-android=fail
|
||||
orc:arm64-android=fail
|
||||
orc:x64-android=fail
|
||||
|
@ -4386,7 +4386,7 @@
|
||||
},
|
||||
"libgwenhywfar": {
|
||||
"baseline": "5.6.0",
|
||||
"port-version": 4
|
||||
"port-version": 5
|
||||
},
|
||||
"libgxps": {
|
||||
"baseline": "0.3.2",
|
||||
@ -4654,7 +4654,7 @@
|
||||
},
|
||||
"libopensp": {
|
||||
"baseline": "1.5.2",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"libopnmidi": {
|
||||
"baseline": "1.5.1",
|
||||
@ -6422,7 +6422,7 @@
|
||||
},
|
||||
"openturns": {
|
||||
"baseline": "1.20",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"openvdb": {
|
||||
"baseline": "11.0.0",
|
||||
@ -9538,7 +9538,7 @@
|
||||
},
|
||||
"zydis": {
|
||||
"baseline": "4.0.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"zyre": {
|
||||
"baseline": "2019-07-07",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "8b4376fdc006cc932f5bc581b32479ebd273b275",
|
||||
"version-semver": "5.6.0",
|
||||
"port-version": 5
|
||||
},
|
||||
{
|
||||
"git-tree": "6402ae94301ce25a7f846286954d8847e1360871",
|
||||
"version-semver": "5.6.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a3322b1400f902d5b02c9bebb18dbde53f88c4ce",
|
||||
"version": "1.5.2",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "88324b68d25d7301351327cd25493d4f13658cf1",
|
||||
"version": "1.5.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1533ede792f48bee5c53f35de06c493e6ed0ab0a",
|
||||
"version": "1.20",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "7df4639f8285df19714604b6df8f55f170c938f4",
|
||||
"version": "1.20",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "4057692f573c3990f5767e5e2952fc54a76cb1c9",
|
||||
"version-semver": "4.0.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "743422a6b31df7e852fdc96cc14fe95a3f8a8136",
|
||||
"version-semver": "4.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user