Skip to content

Commit

Permalink
[macos ci] update to 2022-01-03 (#22314)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
strega-nil authored Jan 11, 2022
1 parent 964e758 commit 5edd518
Show file tree
Hide file tree
Showing 22 changed files with 272 additions and 242 deletions.
31 changes: 31 additions & 0 deletions ports/ace/fix-macos-12.patch
Original file line number Diff line number Diff line change
@@ -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))
6 changes: 3 additions & 3 deletions ports/ace/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion ports/ace/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ace",
"version": "7.0.5",
"port-version": 2,
"port-version": 3,
"maintainers": "Johnny Willemsen <[email protected]>",
"description": "The ADAPTIVE Communication Environment",
"homepage": "https://www.dre.vanderbilt.edu/~schmidt/ACE.html",
Expand Down
15 changes: 15 additions & 0 deletions ports/libpqxx/fix_build_with_apple_clang_13.patch
Original file line number Diff line number Diff line change
@@ -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;
}

1 change: 1 addition & 0 deletions ports/libpqxx/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
2 changes: 1 addition & 1 deletion ports/libpqxx/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
11 changes: 10 additions & 1 deletion ports/libsoundio/fix_cmakelists.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
2 changes: 1 addition & 1 deletion ports/libsoundio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/azure-pipelines-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
68 changes: 0 additions & 68 deletions scripts/azure-pipelines/osx/Get-InternalBaseBox.ps1

This file was deleted.

30 changes: 13 additions & 17 deletions scripts/azure-pipelines/osx/Install-Prerequisites.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 ','
Expand Down
Loading

0 comments on commit 5edd518

Please sign in to comment.