Skip to content

Commit

Permalink
Updated scripts to pin dnx version. Updated build to pin the version,…
Browse files Browse the repository at this point in the history
… added in missing coreclr runtimes to the build outputs

Updated build process for appveyor to deploy windows based assets
Updated build process for travis to deploy linux and osx based assets
Fix issue with too many files on osx
  • Loading branch information
david-driscoll committed Jan 15, 2016
1 parent 3114911 commit cffb8d2
Show file tree
Hide file tree
Showing 23 changed files with 346 additions and 377 deletions.
68 changes: 37 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,45 +29,51 @@ addons:
- zlib1g
- curl
- tree
before_deploy:
- openssl enc -aes-256-cbc -a -salt -in travis_rsa.enc -out ~/.ssh/id_rsa -pass pass:$OPENSSL_PASSKEY -d
- chmod 600 ~/.ssh/id_rsa
- eval `ssh-agent -s`
- ssh-add ~/.ssh/id_rsa
deploy:
provider: releases
api_key:
secure: N9hansErZKHl7G5Ed/hcBgwcvLuRjB7YAskAvSAYB+luacV6rSK7Vlm/4NyjaZCwWv5wOdBphle2S4yZLRDTdMwLrdQWwWYeZI60kE22c1amKJaf6j5ai2u/P3bt55klQ2yO2U/LacwHVoRtJlVdwSAXuDQ3zMd88VbBModQyxE=
file:
- 'omnisharp.tar.gz'
- 'omnisharp.bootstrap.tar.gz'
- 'artifacts/omnisharp-coreclr-darwin-x64.tar.gz'
- 'artifacts/omnisharp-coreclr-darwin-x64.tar.gz'
- 'artifacts/omnisharp.boostrap-coreclr-darwin-x64.tar.gz'
- 'artifacts/omnisharp-coreclr-linux-x64.tar.gz'
- 'artifacts/omnisharp-mono.tar.gz'
- 'artifacts/omnisharp-coreclr-linux-x64.tar.gz'
- 'artifacts/omnisharp-mono.tar.gz'
skip_cleanup: true
on:
repo: OmniSharp/omnisharp-roslyn
tags: true
after_deploy: |
OMNISHARP_VERSION="1.0.0-dev";
if [ $TRAVIS_TAG ]; then
OMNISHARP_VERSION=${TRAVIS_TAG:1};
openssl enc -aes-256-cbc -a -salt -in travis_rsa.enc -out ~/.ssh/id_rsa -pass pass:$OPENSSL_PASSKEY -d
chmod 600 ~/.ssh/id_rsa
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
OMNISHARP_VERSION="1.0.0-dev";
if [ $TRAVIS_TAG ]; then
OMNISHARP_VERSION=${TRAVIS_TAG:1};
fi
nuget push artifacts/nuget/Release/OmniSharp.Host.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.Bootstrap.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.Dnx.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.MSBuild.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.Nuget.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.Roslyn.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.Roslyn.CSharp.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.ScriptCs.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/nuget/Release/OmniSharp.Stdio.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
BRANCH_NAME="upgrade/omnisharp-roslyn-$TRAVIS_TAG"
git config --global user.name "OmniSharp Bot"
git config --global user.email "omnisharp-bot@users.noreply.github.com"
git clone git@github.com:OmniSharp/omnisharp-node-client.git ~/omnisharp-node-client
pushd ~/omnisharp-node-client
git checkout -b $BRANCH_NAME
cat package.json > package2.json
cat package2.json | jq '."omnisharp-roslyn"="'$TRAVIS_TAG'"' > package.json
git add package.json
git commit -m "Update omnisharp-roslyn to $TRAVIS_TAG"
git push origin $BRANCH_NAME
curl -X POST -H 'Authorization: token '$GITHUB_API_TOKEN'' -d '{ "title": "Upgrade to OmniSharp/omnisharp-roslyn '$TRAVIS_TAG'", "body": "*Automated PR* - Upgrade omnisharp-roslyn to '$TRAVIS_TAG'. [release patch]", "head": "'$BRANCH_NAME'", "base": "master" }' https://api.github.com/repos/OmniSharp/omnisharp-node-client/pulls
fi
nuget push artifacts/build/nuget/Release/OmniSharp.Host.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.Bootstrap.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.Dnx.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.MSBuild.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.Nuget.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.Roslyn.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.Roslyn.CSharp.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.ScriptCs.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
nuget push artifacts/build/nuget/Release/OmniSharp.Stdio.$OMNISHARP_VERSION.nupkg $MYGET_AUTH -Source https://www.myget.org/F/omnisharp/api/v2/package
BRANCH_NAME="upgrade/omnisharp-roslyn-$TRAVIS_TAG"
git config --global user.name "OmniSharp Bot"
git config --global user.email "omnisharp-bot@users.noreply.github.com"
git clone git@github.com:OmniSharp/omnisharp-node-client.git ~/omnisharp-node-client
pushd ~/omnisharp-node-client
git checkout -b $BRANCH_NAME
cat package.json > package2.json
cat package2.json | jq '."omnisharp-roslyn"="'$TRAVIS_TAG'"' > package.json
git add package.json
git commit -m "Update omnisharp-roslyn to $TRAVIS_TAG"
git push origin $BRANCH_NAME
curl -X POST -H 'Authorization: token '$GITHUB_API_TOKEN'' -d '{ "title": "Upgrade to OmniSharp/omnisharp-roslyn '$TRAVIS_TAG'", "body": "*Automated PR* - Upgrade omnisharp-roslyn to '$TRAVIS_TAG'. [release patch]", "head": "'$BRANCH_NAME'", "base": "master" }' https://api.github.com/repos/OmniSharp/omnisharp-node-client/pulls
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Run the server with ```./scripts/Omnisharp -s /path/to/project -p portnumber```

Check out the issue tracker https://huboard.com/OmniSharp/omnisharp-roslyn

## ASPNET RC2 Note
For the latest version you must have one of the specific pinned versions of ASPNET RC2 installed, they are as follows...
* `dnx-clr-win-x86.1.0.0-rc2-16386`
* `dnx-mono.1.0.0-rc2-16386`
* `dnx-coreclr-win-x64.1.0.0-rc2-16386`
* `dnx-coreclr-darwin-x64.1.0.0-rc2-16386`
* `dnx-coreclr-linux-x64.1.0.0-rc2-16386`

## Help wanted!
Visit https://jabbr.net/#/rooms/omnisharp if you'd like to help out.
8 changes: 8 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ init:
test: off # this turns of AppVeyor automatic searching for test-assemblies, not the actual testing
build_script:
- build.cmd
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
auth_token:
secure: YW4vAIFrVIdyKBNxyVGWGKHP2UejoZcTcD0cf7KYEgZefUWY2XFHjetDW4Q0cICx
artifact: /artifact/.*\.zip/
on:
appveyor_repo_tag: true
213 changes: 105 additions & 108 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,118 +16,115 @@ if %ERRORLEVEL% neq 0 (
rmdir /s /q artifacts
set
call dnvm update-self
call dnvm upgrade -u
call dnvm upgrade -u -r coreclr
call dnvm install 1.0.0-rc2-16386 -u -r clr -arch x86
call dnvm install 1.0.0-rc2-16386 -u -r clr -arch x64
call dnvm install 1.0.0-rc2-16386 -u -r coreclr -arch x86
call dnvm install 1.0.0-rc2-16386 -u -r coreclr -arch x64

call dnu restore
call dnu restore --quiet --parallel
if %errorlevel% neq 0 exit /b %errorlevel%

pushd tests\OmniSharp.Bootstrap.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Dnx.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Plugins.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Roslyn.CSharp.Tests
call dnx test -parallel none
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Stdio.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd
call:_test "OmniSharp.Bootstrap.Tests" "clr"
call:_test "OmniSharp.Bootstrap.Tests" "coreclr"
call:_test "OmniSharp.Dnx.Tests" "clr"
call:_test "OmniSharp.Dnx.Tests" "coreclr"
call:_test "OmniSharp.MSBuild.Tests" "clr"
:: Not supported yet
::call:_test "OmniSharp.MSBuild.Tests" "coreclr"
call:_test "OmniSharp.Plugins.Tests" "clr"
call:_test "OmniSharp.Plugins.Tests" "coreclr"
call:_test "OmniSharp.Roslyn.CSharp.Tests" "clr" "none"
call:_test "OmniSharp.Roslyn.CSharp.Tests" "coreclr" "none"
call:_test "OmniSharp.ScriptCs.Tests" "clr"
:: Not supported yet
::call:_test "OmniSharp.ScriptCs.Tests" "coreclr"
call:_test "OmniSharp.Stdio.Tests" "clr"
call:_test "OmniSharp.Stdio.Tests" "coreclr"
call:_test "OmniSharp.Tests" "clr"
call:_test "OmniSharp.Tests" "coreclr"

:: omnisharp-clr-win-x86.zip
call:_publish "OmniSharp" "clr" "x86" "artifacts\clr-win-x86" "..\omnisharp-clr-win-x86"
:: omnisharp-coreclr-win-x86.zip
call:_publish "OmniSharp" "coreclr" "x86" "artifacts\coreclr-win-x86" "..\omnisharp-coreclr-win-x86"
:: omnisharp-clr-win-x64.zip
call:_publish "OmniSharp" "clr" "x64" "artifacts\clr-win-x64" "..\omnisharp-clr-win-x64"
:: omnisharp-coreclr-win-x64.zip
call:_publish "OmniSharp" "coreclr" "x64" "artifacts\coreclr-win-x64" "..\omnisharp-coreclr-win-x64"
:: omnisharp.zip
:::: TODO

:: omnisharp.bootstrap-clr-win-x86.zip
call:_publish "OmniSharp.Bootstrap" "clr" "x86" "artifacts\boot-clr-win-x86" "..\omnisharp.bootstrap-clr-win-x86"
:: omnisharp.bootstrap-coreclr-win-x86.zip
call:_publish "OmniSharp.Bootstrap" "coreclr" "x86" "artifacts\boot-coreclr-win-x86" "..\omnisharp.bootstrap-coreclr-win-x86"
:: omnisharp.bootstrap-clr-win-x64.zip
call:_publish "OmniSharp.Bootstrap" "clr" "x64" "artifacts\boot-clr-win-x64" "..\omnisharp.bootstrap-clr-win-x64"
:: omnisharp.bootstrap-coreclr-win-x64.zip
call:_publish "OmniSharp.Bootstrap" "coreclr" "x64" "artifacts\boot-coreclr-win-x64" "..\omnisharp.bootstrap-coreclr-win-x64"
:: omnisharp.boostrap.zip
:::: TODO

call dnvm use 1.0.0-rc2-16386 -r coreclr -arch x86
call:_pack OmniSharp.Host
call:_pack OmniSharp.Abstractions
call:_pack OmniSharp.Bootstrap
call:_pack OmniSharp.Dnx
call:_pack OmniSharp.MSBuild
call:_pack OmniSharp.Nuget
call:_pack OmniSharp.Roslyn
call:_pack OmniSharp.Roslyn.CSharp
call:_pack OmniSharp.ScriptCs
call:_pack OmniSharp.Stdio

pushd tests\OmniSharp.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

call dnvm upgrade -u -r clr

pushd tests\OmniSharp.Bootstrap.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Dnx.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Plugins.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Roslyn.CSharp.Tests
call dnx test -parallel none
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Stdio.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.MSBuild.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
popd

pushd tests\OmniSharp.ScriptCs.Tests
call dnx test
if %errorlevel% neq 0 exit /b %errorlevel%
GOTO:EOF

::--------------------------------------------------------
::-- Functions
::--------------------------------------------------------
:_test - %~1=project %~2=parallel
setlocal
call dnvm use 1.0.0-rc2-16386 -r %~2 -arch x86
pushd tests\%~1
if "%~2" == "" (
call dnx test
) else (
call dnx test -parallel none
)
if %errorlevel% neq 0 (
echo "Tests failed for src/%~1 with runtime %~2"
exit /b 1
)
popd

call dnvm upgrade -u -r coreclr

rem call dnu pack src\OmniSharp.Host --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Abstractions --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Bootstrap --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Dnx --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.MSBuild --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Nuget --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Roslyn --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Roslyn.CSharp --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.ScriptCs --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%
rem call dnu pack src\OmniSharp.Stdio --configuration Release --out artifacts\build\nuget
rem if %errorlevel% neq 0 exit /b %errorlevel%

rem call dnu publish artifacts\OmniSharp --configuration Release --no-source --out artifacts\build\omnisharp --runtime active
rem if %errorlevel% neq 0 exit /b %errorlevel%

rem pushd artifacts\build\omnisharp
rem call tar -zcf ..\..\..\omnisharp.tar.gz .
rem popd

rem call dnu publish src\OmniSharp.Bootstrap --configuration Release --no-source --out artifacts\build\omnisharp.bootstrap --runtime active

rem pushd artifacts\build\omnisharp.bootstrap
rem call tar -zcf ..\..\..\omnisharp.bootstrap.tar.gz .
rem popd

endlocal
GOTO:EOF

:_pack - %~1=project
setlocal
call dnu restore src\%~1 --quiet
call dnu pack src\%~1 --configuration Release --quiet --out artifacts\nuget
if %errorlevel% neq 0 (
echo "Package failed for src/%~1, destination: %~4"
exit /b 1
)
endlocal
GOTO:EOF

:_publish - %~1=project %~2=runtime %~3=arch %~4=dest %~5=zip
setlocal
call dnvm use 1.0.0-rc2-16386 -r %~2 -arch %~3
call dnu publish "src\%~1" --configuration Release --no-source --quiet --runtime active --out "%~4"
if %errorlevel% neq 0 (
echo "Publish failed for src/%~1 with runtime %~2-%~3, destination: %~4"
exit /b 1
)
pushd %~4\approot
call 7z a -r ..\%~5.zip .
if %errorlevel% neq 0 (
echo "Zip failed for src/%~1 with runtime %~2-%~3, destination: %~4"
exit /b 1
)
popd
endlocal
GOTO:EOF
Loading

0 comments on commit cffb8d2

Please sign in to comment.