From 5800b86a237421d4e4418a0791d9a79ea20297c2 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 4 Aug 2016 10:59:02 -0700 Subject: [PATCH 1/3] Revert "Temporarily disable OS X builds on Travis CI" This reverts commit fef3871be2f6ed50335c57b9b495f07e44cacc9b. --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index aef6720e0d..36fb3023d4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ branches: os: - linux + - osx sudo: required dist: trusty osx_image: xcode8 From 39faa3dd255dfd20fe55ac3565afb1b44807f533 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 4 Aug 2016 10:16:41 -0700 Subject: [PATCH 2/3] Fix OS X OpenSSL link for .NET Core Due to https://github.com/Homebrew/brew/pull/597, .NET Core's installation instructions of `brew link --force openssl` are now invalid (for good reasons, due to security holes). Until .NET Core updates their libraries to find the OpenSSL libraries correctly, we can update them as part of `Start-PSBootstrap`. See https://github.com/dotnet/cli/issues/3964 --- build.psm1 | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/build.psm1 b/build.psm1 index a419b7c48a..ad44e0e92c 100644 --- a/build.psm1 +++ b/build.psm1 @@ -213,6 +213,13 @@ function Start-PSBuild { $RestoreArguments += "$PSScriptRoot" Start-NativeExecution { dotnet restore $RestoreArguments } + + # .NET Core's crypto library needs brew's OpenSSL libraries added to its rpath + if ($IsOSX) { + # This is the restored library used to build + # This is allowed to fail since the user may have already restored + find $env:HOME/.nuget -name System.Security.Cryptography.Native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib + } } # handle ResGen @@ -630,8 +637,6 @@ function Start-PSBootstrap { if ($Package) { $Deps += "ruby" } # Install dependencies brew install $Deps - # OpenSSL libraries must be updated - brew link --force openssl } # Install [fpm](https://github.com/jordansissel/fpm) @@ -663,6 +668,13 @@ function Start-PSBootstrap { curl -s $obtainUrl/$installScript -o $installScript chmod +x $installScript bash ./$installScript -c $Channel -v $Version + + # .NET Core's crypto library needs brew's OpenSSL libraries added to its rpath + if ($IsOSX) { + # This is the library shipped with .NET Core + # This is allowed to fail as the user may have installed other versions of dotnet + find $env:HOME/.dotnet -name System.Security.Cryptography.Native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/lib + } } # Install for Windows From e936a7cd04ee4b62777e09eab046660207077c05 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 4 Aug 2016 10:29:58 -0700 Subject: [PATCH 3/3] Remove Travis CI cache It is unbearably slow on OS X. --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36fb3023d4..186826512d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,6 @@ sudo: required dist: trusty osx_image: xcode8 -cache: - directories: - - $HOME/.dotnet - - $HOME/.nuget - addons: artifacts: s3_region: "us-west-2"