From 17a274b670e0b1ecf1c4e8abd8f6df8f42240ab2 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 5 Jul 2016 10:36:38 -0700 Subject: [PATCH 1/4] Update dependencies list --- build.psm1 | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/build.psm1 b/build.psm1 index 0a6015f5b9..79f43e25ea 100644 --- a/build.psm1 +++ b/build.psm1 @@ -445,14 +445,30 @@ function Start-PSBootstrap { try { # Install ours and .NET's dependencies + $Deps = @() if ($IsUbuntu) { - sudo apt-get install -y -qq curl make g++ cmake libc6 libgcc1 libstdc++6 libcurl3 libgssapi-krb5-2 libicu52 liblldb-3.6 liblttng-ust0 libssl1.0.0 libunwind8 libuuid1 zlib1g clang-3.5 + # Build tools + $Deps += "curl", "g++", "cmake", "make" + # .NET Core required runtime libraries + $Deps += "libicu52", "libunwind8" + # Install dependencies + sudo apt-get install -y -qq $Deps } elseif ($IsCentos) { - sudo yum install -y -q curl make gcc-c++ cmake glibc libgcc libstdc++ libcurl krb5-libs libicu lldb openssl-libs libunwind libuuid zlib clang + # Build tools + $Deps += "curl", "gcc-c++", "cmake", "make" + # .NET Core required runtime libraries + $Deps += "libicu", "libunwind" + # Install dependencies + sudo yum install -y -q $Deps } elseif ($IsOSX) { precheck 'brew' "Bootstrap dependency 'brew' not found, must install Homebrew! See http://brew.sh/" - - brew install curl cmake openssl + # Build tools + $Deps += "curl", "cmake" + # .NET Core required runtime libraries + $Deps += "openssl" + # Install dependencies + brew install $Deps + # OpenSSL libraries must be updated brew link --force openssl } else { Write-Warning "This script only supports Ubuntu 14.04, CentOS 7, and OS X, you must install dependencies manually!" @@ -1757,4 +1773,4 @@ $script:RESX_TEMPLATE = @' {0} -'@ \ No newline at end of file +'@ From b1621edbc9b462e32f94838b9f0530502f3f125d Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 5 Jul 2016 11:03:08 -0700 Subject: [PATCH 2/4] Add packaging dependencies to Start-PSBootstrap --- build.psm1 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index 79f43e25ea..40afb847fc 100644 --- a/build.psm1 +++ b/build.psm1 @@ -436,7 +436,8 @@ function Start-PSBootstrap { [CmdletBinding()]param( [ValidateSet("dev", "beta", "preview")] [string]$Channel = "rel-1.0.0", - [string]$Version = "latest" + [string]$Version = "latest", + [switch]$Package ) log "Installing Open PowerShell build dependencies" @@ -451,6 +452,8 @@ function Start-PSBootstrap { $Deps += "curl", "g++", "cmake", "make" # .NET Core required runtime libraries $Deps += "libicu52", "libunwind8" + # Packaging tools + if ($Package) { $Deps += "ruby-dev" } # Install dependencies sudo apt-get install -y -qq $Deps } elseif ($IsCentos) { @@ -458,6 +461,8 @@ function Start-PSBootstrap { $Deps += "curl", "gcc-c++", "cmake", "make" # .NET Core required runtime libraries $Deps += "libicu", "libunwind" + # Packaging tools + if ($Package) { $Deps += "ruby-devel", "rpmbuild" } # Install dependencies sudo yum install -y -q $Deps } elseif ($IsOSX) { @@ -466,6 +471,8 @@ function Start-PSBootstrap { $Deps += "curl", "cmake" # .NET Core required runtime libraries $Deps += "openssl" + # Packaging tools + if ($Package) { $Deps += "ruby" } # Install dependencies brew install $Deps # OpenSSL libraries must be updated @@ -474,6 +481,11 @@ function Start-PSBootstrap { Write-Warning "This script only supports Ubuntu 14.04, CentOS 7, and OS X, you must install dependencies manually!" } + # Install [fpm](https://github.com/jordansissel/fpm) + if ($Package) { + gem install fpm + } + $obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain" # Install for Linux and OS X From 985564416d826dd7c512a962f37227a27b352ae4 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 5 Jul 2016 11:03:58 -0700 Subject: [PATCH 3/4] Package PowerShell on Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e0709ce23c..749714978e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_install: - git submodule update --init - ./tools/download.sh script: - - ulimit -n 4096; powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild -Publish; Start-PSPester; Start-PSxUnit" + - ulimit -n 4096; powershell -c "Import-Module ./build.psm1; Start-PSBootstrap -Package; Start-PSBuild -Publish; Start-PSPackage; Start-PSPester; Start-PSxUnit" notifications: slack: secure: sKYd4n61+ZFzGZuWGUl8V1kN0NM16wRVOFVlNhlFCwnkrEsKROb++EvXf5uwnKuzxkhEjvPWO+UFgeshQDoR93y4s5YLfhC5JupK4nUzjPzWs208KTrh8u/x9MY8X6Ojxi85EEAiku5GzMoMlkucSStZUYwbIfnelzqdw8uoRwmm2MW4XCPwsuEuDUVghyiva0Mdx1G6MopCrK8T96WywJXT3chhfZQgVt+sQCBt9g+2kjDaObKrzG0P07IVK43ZpDgnu6AoxlyBzIx9mJH2Oa/tki3/kTO72Wcp3ps3qvmiStADamzVKR9p1VlWCLWAd6VOehxuByCGEyujpzk135Wud2DZYO+8LD6inZVhFe3Wt5pCU9BDXZppiATfMCqgXEH7nK54pEn79yHcjthRJ2+Z9ot7As2fu3RSBmTAi8nRP0fxRyX/jctR3S6P0qt0y1ynx9nzBfhmhPQW0PMVazWS/nruQIvK/3iiYXjZxM5bBwIvabmwV00EYeTdbL6ufXWNgQcG1ZWkDsi2I3vst/ytUbHwaFYg83bXWpxg9DCzJeWLVUvE5/3NfBxRAuCTot/fgTEA9IYScvrlL7Q/bT0cOt0vEM98MPf1UO+WP85uxhsRgHtwDEo+jMaL6ZFkPhlV6mmmED4NdY2//a571cLNXdnuMAze5O3TWGBG53g= From 970641e691162132f79afa44a2e6270289914860 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 5 Jul 2016 11:59:51 -0700 Subject: [PATCH 4/4] Upload Travis CI packages to AWS We need to cd into tools so that the downloaded PowerShell package isn't subsequently uploaded to AWS. --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 749714978e..5cc613d036 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,16 @@ matrix: - os: osx osx_image: xcode7.3 language: generic +addons: + artifacts: + s3_region: "us-west-2" + paths: $(ls powershell*{deb,pkg} | tr "\n" ":") git: submodules: false -before_install: +install: - git config --global url.git@github.com:.insteadOf https://github.com/ - git submodule update --init - - ./tools/download.sh + - (cd tools && ./download.sh) script: - ulimit -n 4096; powershell -c "Import-Module ./build.psm1; Start-PSBootstrap -Package; Start-PSBuild -Publish; Start-PSPackage; Start-PSPester; Start-PSxUnit" notifications: