Skip to content

Commit

Permalink
Merge pull request #906 from OmniSharp/dev
Browse files Browse the repository at this point in the history
Merge dev into master
  • Loading branch information
DustinCampbell authored Jul 5, 2017
2 parents 72bcb4c + c754f3a commit e18913e
Show file tree
Hide file tree
Showing 574 changed files with 16,289 additions and 9,310 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ TestResults/
.nuget/
*.sln.ide/
_ReSharper.*/
packages/
artifacts/
PublishProfiles/
*.user
Expand All @@ -31,13 +30,16 @@ buildlog
*.lock.json
/omnisharp*.tar.gz
scripts/Omnisharp*
.msbuild-*/

# NuGet
*.nuget.targets

# Build folder
.tools/
.dotnet/
.dotnet-legacy/
tools/*
!tools/packages.config

# VS Code
/.vscode/settings.json
Expand Down
60 changes: 48 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,55 @@ env:
global:
secure: m2PtYwYOhaK0uFMZ19ZxApZwWZeAIq1dS//jx/5I3txpIWD+TfycQMAWYxycFJ/GJkeVF29P4Zz1uyS2XKKjPJpp2Pds98FNQyDv3OftpLAVa0drsjfhurVlBmSdrV7GH6ncKfvhd+h7KVK5vbZc+NeR4dH7eNvN/jraS//AMJg=
mono:
- 4.2.3
- 4.8.0
os:
- linux
- osx
osx_image: xcode7.3
# install automaically retries
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install jq; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew link --force openssl; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew list; fi
- ./build.sh -target=Restore

# Ensure MSBuild is installed
before_install:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get -qq update
sudo apt-get install msbuild
fi
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew install jq
brew install openssl
ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
brew list
fi
- |
# This is a temporary fix to workaround a problem where Travis picks up a build of Mono on OSX that
# includes a broken version of MSBuild.
#
# See https://github.com/mono/msbuild/commit/cff4013ba3a69f82dc0ae96b3e15af700d8f74ef
# for the fix this is replicating.
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
MSBUILD_BIN=/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/msbuild/15.0/bin
if [ ! -d $MSBUILD_BIN ] || [ -f $MSBUILD_BIN/System.Reflection.Metadata.dll ]; then
echo "WORKAROUND: Time to remove System.Reflection.Metadata.dll workaround"
else
echo "WORKAROUND: Copying System.Reflection.Metadata.dll to Mono MSBuild"
sudo cp $MSBUILD_BIN/Roslyn/System.Reflection.Metadata.dll $MSBUILD_BIN/System.Reflection.Metadata.dll
fi
fi
- msbuild /version

script:
- travis_retry ./build.sh -target=TravisTestAll
- ./build.sh -target=Travis -archive
- travis_retry ./build.sh --target TravisTestAll
- ./build.sh --target Travis --archive

addons:
apt:
packages:
Expand All @@ -31,23 +64,26 @@ addons:
- libunwind8
- zlib1g
- curl

notifications:
slack:
rooms:
- omnisharp:U358j4McaEOIzFqXvGexVokC#general
on_success: change
on_failure: always
on_pull_requests: false

deploy:
provider: releases
api_key:
secure: N9hansErZKHl7G5Ed/hcBgwcvLuRjB7YAskAvSAYB+luacV6rSK7Vlm/4NyjaZCwWv5wOdBphle2S4yZLRDTdMwLrdQWwWYeZI60kE22c1amKJaf6j5ai2u/P3bt55klQ2yO2U/LacwHVoRtJlVdwSAXuDQ3zMd88VbBModQyxE=
secure: EsRemh0XwJc3jhIjaxSuAhcm0AGjFwa3HO6oWzJOoupX0l+HV5CxrJqui//sqJ/jK4nnwNcTfMyMFTAz2t6nWCmuwuezTncty/uNTXE0Whe+3WWc/BakfEdBrCfnRhGhwQ5EW2Y6BasuF0f/hpjnucqpNxcKmKOZvThzv93bmSA=
file_glob: true
file: artifacts/package/*.tar.gz
skip_cleanup: true
on:
repo: OmniSharp/omnisharp-roslyn
tags: true

after_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
Expand Down
22 changes: 22 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "./msbuild.sh",
"args": [
"OmniSharp.sln",
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true"
],
"taskSelector": "/t:",
"showOutput": "silent",
"tasks": [
{
"taskName": "build",
// Show the output window only if unrecognized errors occur.
"showOutput": "silent",
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
}
66 changes: 41 additions & 25 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,55 @@
# Requirements

## Windows

In order to build OmniSharp, the [.NET 4.6 targeting pack](http://go.microsoft.com/fwlink/?LinkId=528261) must be installed if it isn't already.

## macOS

**Mono 4.8.0** or greater is required. You can install this using the latest [.pkg](http://www.mono-project.com/download/#download-mac) or install it view [Homebrew](https://brew.sh/):

```
brew update
brew install mono
brew install caskroom/cask/mono-mdk
```

## Linux

Because OmniSharp uses the .NET Core SDK as part of the build, not all Linux distros are supported. A good rule of thumb is to check the list [here](https://www.microsoft.com/net/download/linux) to see if your particular distro is supported.

**Mono 4.8.0** or greater is required. Each distro or derivative has it's own set of instructions for installing Mono which you can find [here](http://www.mono-project.com/download/#download-lin).

In addition, the `msbuild` package must be installed. On Debian, Ubuntu, and derivatives, this can be achieved by first adding the Mono Project GPG signing key and package repository using the instructions [here](http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives). Then, install msbuild via apt-get.

```
sudo apt-get install msbuild
```

# Usage

Run `build.(ps1|sh)` with the desired set of arguments (see below for options).
The build script itself is `build.cake`, written in C# using the Cake build automation system.
The build script itself is `build.cake`, written in C# using the [Cake build automation system](http://cakebuild.net/).
All build related activites should be encapsulated in this file for cross-platform access.

# Arguments

## Primary

`-target=TargetName`: The name of the build task/target to execute (see below for listing and details).
`-target TargetName`: The name of the build task/target to execute (see below for listing and details).
Defaults to `Default`.

`-configuration=(Release|Debug)`: The configuration to build.
`-configuration (Release|Debug)`: The configuration to build.
Defaults to `Release`.

## Extra

`-test-configuration=(Release|Debug)`: The configuration to use for the unit tests.
`-test-configuration (Release|Debug)`: The configuration to use for the unit tests.
Defaults to `Debug`.
`-install-path=Path`: Path used for the **Install** target.

`-install-path Path`: Path used for the **Install** target.
Defaults to `(%USERPROFILE%|$HOME)/.omnisharp/local`

`-archive`: Enable the generation of publishable archives after a build.

Note: On macOS/Linux, be sure to pass the arguments above with double slashes! (e.g. `--target TargetName`).

# Targets

**Default**: Alias for Local.
Expand All @@ -38,9 +64,6 @@ All build related activites should be encapsulated in this file for cross-platfo

**Install**: Same as quick, but installs the generated binaries into `install-path`.

**SetPackageVersions**: Updates the dependency versions found within `project.json` files using information from `depversion.json`.
Used for maintainence within the project, not needed for end-users. More information below.

# Configuration files

## build.json
Expand All @@ -49,16 +72,13 @@ A number of build-related options, including folder names for different entities

**DotNetInstallScriptURL**: The URL where the .NET SDK install script is located.
Can be used to pin to a specific script version, if a breaking change occurs.

**"DotNetChannel"**: The .NET SDK channel used for retreiving the tools.

**"DotNetVersion"**: The .NET SDK version used for the build. Can be used to pin to a specific version.
Using the string `Latest` will retrieve the latest version.
**DotNetChannel**: The .NET Core SDK channel used for retreiving the tools.

## depversion.json
**DotNetVersion**: The .NET Core SDK version used for the build. Can be used to pin to a specific version.
Using the string `Latest` will retrieve the latest version.

A listing of all dependencies (and their desired versions) used by `project.json` files throughout the project.
Allows for quick and automatic updates to the dependency version numbers using the **SetPackageVersions** target.
**LegacyDotNetVersion**: The .NET Core SDK version used to restore packages for various test assets that are project.json-based.

# Artifacts generated

Expand All @@ -69,7 +89,3 @@ Allows for quick and automatic updates to the dependency version numbers using t
* Binaries of OmniSharp and its libraries cross-compiled for other runtimes (if selected in **PopulateRuntimes**) `artifacts/publish/OmniSharp/{runtime}/{framework}/`
* Test logs in `artifacts/logs`
* Archived binaries in `artifacts/package` (only if `-archive` used on command line)

# Requirements

The build system requires Mono to be installed on non-Windows machines as Cake is not built using .NET Core (yet).
3 changes: 0 additions & 3 deletions MAINTAINERS

This file was deleted.

19 changes: 8 additions & 11 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="Roslyn" value="https://www.myget.org/F/roslyn-nightly/api/v3/index.json" />
<add key="aspnetcidev" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
<add key="dotnetcore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="nugetbuild" value="https://www.myget.org/F/nugetbuild/api/v3/index.json" />
<clear/>
<add key="buildtools" value="https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
</packageSources>
</configuration>
Loading

0 comments on commit e18913e

Please sign in to comment.