From 45c8867a785107c8217b2d3d4db7d1a5186a9c23 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 18 Oct 2021 23:11:49 +0300 Subject: [PATCH 01/15] Bump SDK to 5.0.302 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index b2b2da7c4f..55a59d3ab5 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "3.1.401" + "version": "5.0.302" }, "msbuild-sdks": { "Microsoft.Build.Traversal": "1.0.43", From 4a2eb925f56497bfceffdb4c05de2102fbc5518d Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 18 Oct 2021 23:21:46 +0300 Subject: [PATCH 02/15] Download 3.1 runtime for *nix --- build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.sh b/build.sh index bd162fab9b..9c957612cf 100755 --- a/build.sh +++ b/build.sh @@ -65,6 +65,8 @@ else else "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path fi + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.408 --runtime dotnet + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.408 --runtime aspnetcore fi export PATH=$DOTNET_DIRECTORY:$PATH From 2f0eb86e7121c57e64243cf4a0251ffc35d8ba79 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 18 Oct 2021 23:25:51 +0300 Subject: [PATCH 03/15] Use 3.1.20 --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 9c957612cf..7703e90a78 100755 --- a/build.sh +++ b/build.sh @@ -65,8 +65,8 @@ else else "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path fi - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.408 --runtime dotnet - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.408 --runtime aspnetcore + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.20 --runtime dotnet + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.20 --runtime aspnetcore fi export PATH=$DOTNET_DIRECTORY:$PATH From e078aa253daf625df49a5f4c494c9fb33ab3e50a Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 18 Oct 2021 23:51:24 +0300 Subject: [PATCH 04/15] Download SDK separately (unix) --- .gitignore | 1 + azure-pipelines.yml | 32 ++++++++++++----------------- build.sh | 50 ++------------------------------------------- get-sdk.sh | 22 ++++++++++++++++++++ 4 files changed, 38 insertions(+), 67 deletions(-) create mode 100755 get-sdk.sh diff --git a/.gitignore b/.gitignore index abf7674560..1f91a11604 100644 --- a/.gitignore +++ b/.gitignore @@ -210,3 +210,4 @@ obj-Skia/ coc-settings.json .ccls-cache .ccls +sdk diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 11ef36d43f..bc60f84107 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,19 +4,18 @@ jobs: vmImage: 'ubuntu-20.04' steps: - task: CmdLine@2 - displayName: 'Install Nuke' + displayName: 'Download SDK' inputs: script: | - dotnet tool install --global Nuke.GlobalTool --version 0.24.0 + ./get-sdk.sh - task: CmdLine@2 - displayName: 'Run Nuke' + displayName: 'Run Build' inputs: script: | - export PATH="$PATH:$HOME/.dotnet/tools" + export PATH="`pwd`/sdk:$PATH" dotnet --info printenv - nuke --target CiAzureLinux --configuration=Release - + ./build.sh --target CiAzureLinux --configuration=Release - task: PublishTestResults@2 inputs: testResultsFormat: 'VSTest' @@ -29,11 +28,11 @@ jobs: pool: vmImage: 'macOS-10.15' steps: - - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.401' + - task: CmdLine@2 + displayName: 'Download SDK' inputs: - version: 3.1.401 - + script: | + ./get-sdk.sh - task: CmdLine@2 displayName: 'Install Mono 5.18' inputs: @@ -45,6 +44,7 @@ jobs: displayName: 'Generate avalonia-native' inputs: script: | + export PATH="`pwd`/sdk:$PATH" cd src/tools/MicroComGenerator; dotnet run -i ../../Avalonia.Native/avn.idl --cpp ../../../native/Avalonia.Native/inc/avalonia-native.h - task: Xcode@5 @@ -58,13 +58,7 @@ jobs: args: '-derivedDataPath ./' - task: CmdLine@2 - displayName: 'Install Nuke' - inputs: - script: | - dotnet tool install --global Nuke.GlobalTool --version 0.24.0 - - - task: CmdLine@2 - displayName: 'Run Nuke' + displayName: 'Run Build' inputs: script: | export COREHOST_TRACE=0 @@ -72,10 +66,10 @@ jobs: export DOTNET_CLI_TELEMETRY_OPTOUT=1 which dotnet dotnet --info - export PATH="$PATH:$HOME/.dotnet/tools" + export PATH="`pwd`/sdk:$PATH" dotnet --info printenv - nuke --target CiAzureOSX --configuration Release --skip-previewer + ./build.sh --target CiAzureOSX --configuration Release --skip-previewer - task: PublishTestResults@2 inputs: diff --git a/build.sh b/build.sh index 7703e90a78..9532b4fbe0 100755 --- a/build.sh +++ b/build.sh @@ -20,57 +20,11 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) ########################################################################### BUILD_PROJECT_FILE="$SCRIPT_DIR/nukebuild/_build.csproj" -TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" - -DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" -DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" -DOTNET_CHANNEL="Current" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export NUGET_XMLDOC_MODE="skip" -########################################################################### -# EXECUTION -########################################################################### - -function FirstJsonValue { - perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2} -} - -# If global.json exists, load expected version -if [ -f "$DOTNET_GLOBAL_FILE" ]; then - DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) - if [ "$DOTNET_VERSION" == "" ]; then - unset DOTNET_VERSION - fi -fi - -# If dotnet is installed locally, and expected version is not set or installation matches the expected version -if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") || "$SKIP_DOTNET_DOWNLOAD" == "1" ]]; then - export DOTNET_EXE="$(command -v dotnet)" -else - DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" - export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" - - # Download install script - DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" - mkdir -p "$TEMP_DIRECTORY" - curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" - chmod +x "$DOTNET_INSTALL_FILE" - - # Install by channel or version - if [ -z ${DOTNET_VERSION+x} ]; then - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path - else - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path - fi - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.20 --runtime dotnet - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version 3.1.20 --runtime aspnetcore -fi - -export PATH=$DOTNET_DIRECTORY:$PATH - -echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" +dotnet --info -"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} +dotnet run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} diff --git a/get-sdk.sh b/get-sdk.sh new file mode 100755 index 0000000000..4427948864 --- /dev/null +++ b/get-sdk.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +SDK_DIR=$SCRIPT_DIR/sdk + +DOTNET_INSTALL_FILE="$SDK_DIR/dotnet-install.sh" +DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" + +DOTNET_VERSION=5.0.302 + +mkdir -p "$SDK_DIR" + +if [ ! -f "$DOTNET_INSTALL_FILE" ]; then + curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" + chmod +x "$DOTNET_INSTALL_FILE" +fi + +"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 5.0.302 +"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 3.1.20 --runtime dotnet +"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 3.1.20 --runtime aspnetcore + + From f9b1d99c51d24670002374cbd9e9dff8297178f4 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 26 Oct 2021 20:57:23 +0100 Subject: [PATCH 05/15] use correct sdk on windows. --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bc60f84107..e2cac22ec4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -96,9 +96,9 @@ jobs: SolutionDir: '$(Build.SourcesDirectory)' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.401' + displayName: 'Use .NET Core SDK 5.0.408' inputs: - version: 3.1.401 + version: 5.0.408 - task: CmdLine@2 displayName: 'Install Nuke' From f1847f2c21ec1ecbca15f7690b94599efd7193cb Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 26 Oct 2021 21:00:26 +0100 Subject: [PATCH 06/15] fix sdk version on windows. --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e2cac22ec4..4cf9c7d4c4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -96,9 +96,9 @@ jobs: SolutionDir: '$(Build.SourcesDirectory)' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 5.0.408' + displayName: 'Use .NET Core SDK 5.0.402' inputs: - version: 5.0.408 + version: 5.0.402 - task: CmdLine@2 displayName: 'Install Nuke' From 9da216dced6c3b5a9d57cf64262a1dbf74e5b261 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 26 Oct 2021 21:03:52 +0100 Subject: [PATCH 07/15] global json 5.0.402 --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 55a59d3ab5..9f83c1ea1e 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "5.0.302" + "version": "5.0.402" }, "msbuild-sdks": { "Microsoft.Build.Traversal": "1.0.43", From 9d23feedb1a2b8e34dc59d95d9ec488fff802ee4 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 26 Oct 2021 21:12:10 +0100 Subject: [PATCH 08/15] install both 3.1 and 5.0 sdks. --- azure-pipelines.yml | 5 +++++ get-sdk.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4cf9c7d4c4..80a5a76dd7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -95,6 +95,11 @@ jobs: variables: SolutionDir: '$(Build.SourcesDirectory)' steps: + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK 3.1.401' + inputs: + version: 3.1.401 + - task: UseDotNet@2 displayName: 'Use .NET Core SDK 5.0.402' inputs: diff --git a/get-sdk.sh b/get-sdk.sh index 4427948864..05f072c704 100755 --- a/get-sdk.sh +++ b/get-sdk.sh @@ -6,7 +6,7 @@ SDK_DIR=$SCRIPT_DIR/sdk DOTNET_INSTALL_FILE="$SDK_DIR/dotnet-install.sh" DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" -DOTNET_VERSION=5.0.302 +DOTNET_VERSION=5.0.402 mkdir -p "$SDK_DIR" @@ -15,7 +15,7 @@ if [ ! -f "$DOTNET_INSTALL_FILE" ]; then chmod +x "$DOTNET_INSTALL_FILE" fi -"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 5.0.302 +"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 5.0.402 "$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 3.1.20 --runtime dotnet "$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 3.1.20 --runtime aspnetcore From ca4f95cc4f703398b49ad3873ddcdaffd2302e34 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 Oct 2021 11:40:17 +0100 Subject: [PATCH 09/15] use pipelines sdk install task for linux and osx. --- azure-pipelines.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 80a5a76dd7..f91c711b93 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,11 +3,15 @@ jobs: pool: vmImage: 'ubuntu-20.04' steps: - - task: CmdLine@2 - displayName: 'Download SDK' + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK 3.1.401' inputs: - script: | - ./get-sdk.sh + version: 3.1.401 + + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK 5.0.402' + inputs: + version: 5.0.402 - task: CmdLine@2 displayName: 'Run Build' inputs: @@ -28,11 +32,15 @@ jobs: pool: vmImage: 'macOS-10.15' steps: - - task: CmdLine@2 - displayName: 'Download SDK' + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK 3.1.401' inputs: - script: | - ./get-sdk.sh + version: 3.1.401 + + - task: UseDotNet@2 + displayName: 'Use .NET Core SDK 5.0.402' + inputs: + version: 5.0.402 - task: CmdLine@2 displayName: 'Install Mono 5.18' inputs: From 1bf51d674a6cdd3d9565e23f203de3d09c58fa88 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 Oct 2021 11:54:34 +0100 Subject: [PATCH 10/15] update 3.1 sdk. --- azure-pipelines.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f91c711b93..200616842d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,9 +4,9 @@ jobs: vmImage: 'ubuntu-20.04' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.401' + displayName: 'Use .NET Core SDK 3.1.414' inputs: - version: 3.1.401 + version: 3.1.414 - task: UseDotNet@2 displayName: 'Use .NET Core SDK 5.0.402' @@ -33,9 +33,9 @@ jobs: vmImage: 'macOS-10.15' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.401' + displayName: 'Use .NET Core SDK 3.1.414' inputs: - version: 3.1.401 + version: 3.1.414 - task: UseDotNet@2 displayName: 'Use .NET Core SDK 5.0.402' @@ -104,9 +104,9 @@ jobs: SolutionDir: '$(Build.SourcesDirectory)' steps: - task: UseDotNet@2 - displayName: 'Use .NET Core SDK 3.1.401' + displayName: 'Use .NET Core SDK 3.1.414' inputs: - version: 3.1.401 + version: 3.1.414 - task: UseDotNet@2 displayName: 'Use .NET Core SDK 5.0.402' From c76ff9d0d2731ce05891603c8b041d6c39df8a2e Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 Oct 2021 12:16:09 +0100 Subject: [PATCH 11/15] revert getsdk scripts. --- build.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- get-sdk.sh | 22 ---------------------- 2 files changed, 46 insertions(+), 24 deletions(-) delete mode 100755 get-sdk.sh diff --git a/build.sh b/build.sh index 9532b4fbe0..bd162fab9b 100755 --- a/build.sh +++ b/build.sh @@ -20,11 +20,55 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) ########################################################################### BUILD_PROJECT_FILE="$SCRIPT_DIR/nukebuild/_build.csproj" +TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" + +DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" +DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" +DOTNET_CHANNEL="Current" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export NUGET_XMLDOC_MODE="skip" -dotnet --info +########################################################################### +# EXECUTION +########################################################################### + +function FirstJsonValue { + perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2} +} + +# If global.json exists, load expected version +if [ -f "$DOTNET_GLOBAL_FILE" ]; then + DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) + if [ "$DOTNET_VERSION" == "" ]; then + unset DOTNET_VERSION + fi +fi + +# If dotnet is installed locally, and expected version is not set or installation matches the expected version +if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") || "$SKIP_DOTNET_DOWNLOAD" == "1" ]]; then + export DOTNET_EXE="$(command -v dotnet)" +else + DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" + export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + + # Download install script + DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" + mkdir -p "$TEMP_DIRECTORY" + curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" + chmod +x "$DOTNET_INSTALL_FILE" + + # Install by channel or version + if [ -z ${DOTNET_VERSION+x} ]; then + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path + else + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path + fi +fi + +export PATH=$DOTNET_DIRECTORY:$PATH + +echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" -dotnet run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} +"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} diff --git a/get-sdk.sh b/get-sdk.sh deleted file mode 100755 index 05f072c704..0000000000 --- a/get-sdk.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash - -SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -SDK_DIR=$SCRIPT_DIR/sdk - -DOTNET_INSTALL_FILE="$SDK_DIR/dotnet-install.sh" -DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" - -DOTNET_VERSION=5.0.402 - -mkdir -p "$SDK_DIR" - -if [ ! -f "$DOTNET_INSTALL_FILE" ]; then - curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" - chmod +x "$DOTNET_INSTALL_FILE" -fi - -"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 5.0.402 -"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 3.1.20 --runtime dotnet -"$DOTNET_INSTALL_FILE" --install-dir "$SDK_DIR" --version 3.1.20 --runtime aspnetcore - - From dda27e7255bcda6c70fa20d5592aa2ee72898325 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 Oct 2021 12:19:05 +0100 Subject: [PATCH 12/15] revert export sdk path. --- azure-pipelines.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 200616842d..bc8d065137 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -12,20 +12,22 @@ jobs: displayName: 'Use .NET Core SDK 5.0.402' inputs: version: 5.0.402 + - task: CmdLine@2 displayName: 'Run Build' inputs: script: | - export PATH="`pwd`/sdk:$PATH" dotnet --info printenv ./build.sh --target CiAzureLinux --configuration=Release + - task: PublishTestResults@2 inputs: testResultsFormat: 'VSTest' testResultsFiles: '$(Build.SourcesDirectory)/artifacts/test-results/*.trx' condition: not(canceled()) + - job: macOS variables: SolutionDir: '$(Build.SourcesDirectory)' @@ -41,6 +43,7 @@ jobs: displayName: 'Use .NET Core SDK 5.0.402' inputs: version: 5.0.402 + - task: CmdLine@2 displayName: 'Install Mono 5.18' inputs: @@ -74,8 +77,6 @@ jobs: export DOTNET_CLI_TELEMETRY_OPTOUT=1 which dotnet dotnet --info - export PATH="`pwd`/sdk:$PATH" - dotnet --info printenv ./build.sh --target CiAzureOSX --configuration Release --skip-previewer From 8146a77a2165da943888f3c5798cc75512ee2a2f Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 Oct 2021 12:20:11 +0100 Subject: [PATCH 13/15] remove not needed change. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1f91a11604..abf7674560 100644 --- a/.gitignore +++ b/.gitignore @@ -210,4 +210,3 @@ obj-Skia/ coc-settings.json .ccls-cache .ccls -sdk From fe846fd0f33af037941890a628fe8de5af1f4545 Mon Sep 17 00:00:00 2001 From: Nikita Tsukanov Date: Mon, 18 Oct 2021 23:51:24 +0300 Subject: [PATCH 14/15] Download SDK separately (unix) # Conflicts: # azure-pipelines.yml # build.sh --- .gitignore | 1 + build.sh | 48 ++---------------------------------------------- 2 files changed, 3 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index abf7674560..1f91a11604 100644 --- a/.gitignore +++ b/.gitignore @@ -210,3 +210,4 @@ obj-Skia/ coc-settings.json .ccls-cache .ccls +sdk diff --git a/build.sh b/build.sh index bd162fab9b..9532b4fbe0 100755 --- a/build.sh +++ b/build.sh @@ -20,55 +20,11 @@ SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) ########################################################################### BUILD_PROJECT_FILE="$SCRIPT_DIR/nukebuild/_build.csproj" -TEMP_DIRECTORY="$SCRIPT_DIR//.tmp" - -DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" -DOTNET_INSTALL_URL="https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.sh" -DOTNET_CHANNEL="Current" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 export NUGET_XMLDOC_MODE="skip" -########################################################################### -# EXECUTION -########################################################################### - -function FirstJsonValue { - perl -nle 'print $1 if m{"'$1'": "([^"\-]+)",?}' <<< ${@:2} -} - -# If global.json exists, load expected version -if [ -f "$DOTNET_GLOBAL_FILE" ]; then - DOTNET_VERSION=$(FirstJsonValue "version" $(cat "$DOTNET_GLOBAL_FILE")) - if [ "$DOTNET_VERSION" == "" ]; then - unset DOTNET_VERSION - fi -fi - -# If dotnet is installed locally, and expected version is not set or installation matches the expected version -if [[ -x "$(command -v dotnet)" && (-z ${DOTNET_VERSION+x} || $(dotnet --version) == "$DOTNET_VERSION") || "$SKIP_DOTNET_DOWNLOAD" == "1" ]]; then - export DOTNET_EXE="$(command -v dotnet)" -else - DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" - export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" - - # Download install script - DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" - mkdir -p "$TEMP_DIRECTORY" - curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" - chmod +x "$DOTNET_INSTALL_FILE" - - # Install by channel or version - if [ -z ${DOTNET_VERSION+x} ]; then - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path - else - "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path - fi -fi - -export PATH=$DOTNET_DIRECTORY:$PATH - -echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)" +dotnet --info -"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} +dotnet run --project "$BUILD_PROJECT_FILE" -- ${BUILD_ARGUMENTS[@]} From 9a4d579f55104916ae3ca6621e5d92166dc82ba9 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Wed, 27 Oct 2021 12:20:11 +0100 Subject: [PATCH 15/15] remove not needed change. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 1f91a11604..abf7674560 100644 --- a/.gitignore +++ b/.gitignore @@ -210,4 +210,3 @@ obj-Skia/ coc-settings.json .ccls-cache .ccls -sdk