Skip to content
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

Merged
merged 18 commits into from
Mar 2, 2018
Merged

Enable Linux #39

merged 18 commits into from
Mar 2, 2018

Conversation

chcosta
Copy link
Member

@chcosta chcosta commented Feb 28, 2018

Validating CI changes, not ready for review, but FYI @natemcmaster

@chcosta chcosta self-assigned this Feb 28, 2018
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.

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.

build/build.sh Outdated
@@ -0,0 +1,340 @@
#!/bin/bash

build=false

This comment was marked as spam.

Copy link
Contributor

@natemcmaster natemcmaster left a 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.

build/build.sh Outdated
esac
done

function CreateDirectory {

This comment was marked as spam.

build/build.sh Outdated
verbosity="minimal"
properties=""

while [[ $# > 0 ]]; do

This comment was marked as spam.

build/build.sh Outdated
}

function readJson {
UNAMESTR=`uname`

This comment was marked as spam.

build/build.sh Outdated
bash "$DotNetInstallScript" --channel "Preview" --version $NetCoreApp10Version --shared-runtime $DotNetInstallVerbosity
LASTEXITCODE=$?

if [ $LASTEXITCODE != 0 ]

This comment was marked as spam.

build/build.sh Outdated
dotnet nuget locals all --clear
LASTEXITCODE=$?

if [ $LASTEXITCODE != 0 ]

This comment was marked as spam.

build/build.sh Outdated
RepoToolsetDestination="$NuGetPackageRoot/roslyntools.repotoolset/$ToolsetVersion/"
if [ ! -d "$RepoToolsetDestination" ]
then
cp -r $RepoToolsetSource $RepoToolsetDestination

This comment was marked as spam.

build/cibuild.sh Outdated
done
ScriptRoot="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

. "$ScriptRoot/build.sh" --restore --build --test --ci $@

This comment was marked as spam.

build/build.sh Outdated
@@ -0,0 +1,340 @@
#!/bin/bash

This comment was marked as spam.

@chcosta
Copy link
Member Author

chcosta commented Mar 1, 2018

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.

Are the scripts a standard bootstrapper script from RepoToolset? Or do we have to maintain this separately?

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.

@chcosta
Copy link
Member Author

chcosta commented Mar 1, 2018

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

@chcosta
Copy link
Member Author

chcosta commented Mar 1, 2018

/cc @weshaggard

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.

@@ -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.

This comment was marked as spam.

@chcosta chcosta changed the title /* Do NOT merge*/ Enable Linux Enable Linux Mar 1, 2018
Copy link
Contributor

@natemcmaster natemcmaster left a 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.

# 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.

fi

# Install 1.0 shared framework
local netcoreappversion='1.0.5'

This comment was marked as spam.

This comment was marked as spam.

@chcosta
Copy link
Member Author

chcosta commented Mar 2, 2018

@tmat, @natemcmaster , any other concerns with this change?

@natemcmaster
Copy link
Contributor

:shipit: I'm going to wait on #35 until you merge this.

@chcosta chcosta merged commit c7fe627 into dotnet:master Mar 2, 2018
@chcosta chcosta deleted the linux branch March 2, 2018 17:33
ViktorHofer pushed a commit to ViktorHofer/arcade that referenced this pull request Oct 25, 2023
Enable .xlf translations for unstructured documents and VS templates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants