diff --git a/.travis.yml b/.travis.yml index 9f559ae7e..b4b2f1717 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,19 +9,23 @@ osx_image: xcode8 env: - GITHUB_TOKEN=a27573e27bea23fb05393ead69511b09e3b224be + cache: directories: - $HOME/.dotnet - $HOME/.nuget + addons: artifacts: s3_region: "us-west-2" paths: $(ls powershell*{deb,pkg} | tr "\n" ":") + git: submodules: false + install: - git config --global url.git@github.com:.insteadOf https://github.com/ - git submodule update --init - (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" + +script: ./tools/travis.sh diff --git a/tools/travis.sh b/tools/travis.sh new file mode 100755 index 000000000..bcbc560a1 --- /dev/null +++ b/tools/travis.sh @@ -0,0 +1,7 @@ +ulimit -n 4096 +# Only build packages for branches, not pull requests +if [[ $TRAVIS_PULL_REQUEST == false ]]; then + powershell -c "Import-Module ./build.psm1; Start-PSBootstrap -Package; Start-PSBuild -Publish; Start-PSPackage; Start-PSPester; Start-PSxUnit" +else + powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild; Start-PSPester; Start-PSxUnit" +fi