-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Linux #39
Enable Linux #39
Conversation
build.sh
Outdated
|
||
SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | ||
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.ps1
Outdated
@@ -95,7 +95,7 @@ function InstallToolset { | |||
CreateDirectory $TempDir | |||
$proj = Join-Path $TempDir "_restore.proj" | |||
'<Project Sdk="RoslynTools.RepoToolset"><Target Name="NoOp"/></Project>' | Set-Content $proj | |||
& $DotNetExe msbuild $proj /t:NoOp /m /nologo /clp:None /warnaserror /flp:v=diag /v:$verbosity /p:NuGetPackageRoot=$NuGetPackageRoot /p:__ExcludeSdkImports=true | |||
& $DotNetExe msbuild $proj /t:NoOp /m /nologo /clp:None /warnaserror /v:$verbosity /p:NuGetPackageRoot=$NuGetPackageRoot /p:__ExcludeSdkImports=true |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
@@ -0,0 +1,340 @@ | |||
#!/bin/bash | |||
|
|||
build=false |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the scripts a standard bootstrapper script from RepoToolset? Or do we have to maintain this separately?
build/build.sh
Outdated
fi | ||
|
||
# Install 1.0 shared framework | ||
NetCoreApp10Version="1.0.5" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
esac | ||
done | ||
|
||
function CreateDirectory { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
verbosity="minimal" | ||
properties="" | ||
|
||
while [[ $# > 0 ]]; do |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
} | ||
|
||
function readJson { | ||
UNAMESTR=`uname` |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
bash "$DotNetInstallScript" --channel "Preview" --version $NetCoreApp10Version --shared-runtime $DotNetInstallVerbosity | ||
LASTEXITCODE=$? | ||
|
||
if [ $LASTEXITCODE != 0 ] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
dotnet nuget locals all --clear | ||
LASTEXITCODE=$? | ||
|
||
if [ $LASTEXITCODE != 0 ] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
RepoToolsetDestination="$NuGetPackageRoot/roslyntools.repotoolset/$ToolsetVersion/" | ||
if [ ! -d "$RepoToolsetDestination" ] | ||
then | ||
cp -r $RepoToolsetSource $RepoToolsetDestination |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/cibuild.sh
Outdated
done | ||
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
. "$ScriptRoot/build.sh" --restore --build --test --ci $@ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build/build.sh
Outdated
@@ -0,0 +1,340 @@ | |||
#!/bin/bash |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Thanks for the reviews! I wasn't quite ready for that, I was more focused on validating the ci changes, but the feedback is appreciated. I'll clean up this code and ask for review tomorrow. Linux builds are working - https://ci.dot.net/job/Private/job/dotnet_arcade/job/master/job/GenPRTest/job/Ubuntu16.04_release/9/console They're not producing packages because we need to decide how to handle the nuspec expecting framework assemblies but they're not present on Linux... <files>
<file src="$ArtifactsBinDir$Microsoft.DotNet.Build.Tasks.Feed\netstandard1.5\*.dll" target="build\netstandard1.5" />
<file src="$ArtifactsBinDir$Microsoft.DotNet.Build.Tasks.Feed\net45\*.dll" target="build\net46" /> Most of the sh files were just grabbed from another RepoToolset repo and hacked a bit to work in Arcade. As I said, I haven't looked at them too much yet but I'll definitely take your feedback and try to make these better.
I don't believe that any standardization around bootstrapper scripts has moved forward yet so these are currently maintained separately. The standardization / bootstrapping is a separate discussion and I agree that it would have great benefit. |
I'm not aware of a style guide for writing bash that we have like we do for writing C#. I took away from the feedback that the goal was to be consistent so I found a style guide that looked reasonable and tried to conform to that (most of it echos @natemcmaster 's feedback) - https://github.com/bahamas10/bash-style-guide I've validated that Linux builds. Please take another look at these changes, they now vary quite a bit from the original source due to the formatting changes. @jaredpar @natemcmaster @tmat |
/cc @weshaggard |
Directory.Build.props
Outdated
that exists to skip the GenerateReferenceAssemblyPaths task (not target) and to prevent it from outputting a warning (MSB3644). | ||
Need to set these after the common targets import. | ||
--> | ||
<_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories> |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -93,9 +93,17 @@ function MakeGlobalSdkAvailableLocal { | |||
function InstallToolset { | |||
if (!(Test-Path $ToolsetBuildProj)) { | |||
CreateDirectory $TempDir | |||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI my favorite bash linter is https://www.shellcheck.net/
build/build.sh
Outdated
globaljsonfile="$reporoot/global.json" | ||
tempdir="$artifactsconfigurationdir/tmp" | ||
|
||
while [[ $# > 0 ]]; do |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
# Result: Sets 'readjsonvalue' to the value of the provided json key | ||
# Note: this method may return unexpected results if there are duplicate | ||
# keys in the json | ||
function ReadJson { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
fi | ||
|
||
# Install 1.0 shared framework | ||
local netcoreappversion='1.0.5' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@tmat, @natemcmaster , any other concerns with this change? |
I'm going to wait on #35 until you merge this. |
Enable .xlf translations for unstructured documents and VS templates.
Validating CI changes, not ready for review, but FYI @natemcmaster