From 17a681dcfce8b6ae6c385615b099b9e75b279916 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 10:18:51 -0800 Subject: [PATCH 1/8] Automate lib-icu install --- eng/install-native-dependencies.sh | 32 ++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 9e80c57dfcad..b7101d726a98 100644 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -10,15 +10,31 @@ if [ "$1" = "Linux" ]; then exit 1; fi elif [ "$1" = "OSX" ]; then - brew install icu4c openssl - if [ "$?" != "0" ]; then - exit 1; - fi - brew link --force icu4c - if [ "$?" != "0"]; then - exit 1; + if [ -x "$(command -v brew)" ]; then + brew install icu4c openssl + + if [ "$?" != "0" ]; then + exit 1; + fi + brew link --force icu4c + if [ "$?" != "0"]; then + exit 1; + fi + else + PROC_COUNT=`getconf _NPROCESSORS_ONLN` + mkdir /tmp/icu_build + pushd /tmp/icu_build + pwd + curl -O http://download.icu-project.org/files/icu4c/58.2/icu4c-58_2-src.tgz + tar xzf icu4c-58_2-src.tgz + cd icu/source + ls + ./configure + make -j ${PROC_COUNT} + make install + popd fi -else + else echo "Must pass \"Linux\" or \"OSX\" as first argument." exit 1 fi From 6931b765be05b9f39a18eaae0656e3c0c89038e3 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 14:25:56 -0800 Subject: [PATCH 2/8] Add sudo to make install --- eng/install-native-dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index b7101d726a98..898ecd2aa766 100644 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -31,7 +31,7 @@ elif [ "$1" = "OSX" ]; then ls ./configure make -j ${PROC_COUNT} - make install + sudo make install popd fi else From aef6bc530eab679dd6095978714f5af08f3d1f50 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 14:53:32 -0800 Subject: [PATCH 3/8] Remove popd --- eng/install-native-dependencies.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 898ecd2aa766..d8fd73151d20 100644 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -32,7 +32,6 @@ elif [ "$1" = "OSX" ]; then ./configure make -j ${PROC_COUNT} sudo make install - popd fi else echo "Must pass \"Linux\" or \"OSX\" as first argument." From 7ed8828f735957bebc4aaa47af8cf4e6465a60f2 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 20:50:34 -0800 Subject: [PATCH 4/8] Setup clang 3.9 --- eng/install-native-dependencies.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index d8fd73151d20..a60b9ced4378 100644 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -21,6 +21,14 @@ elif [ "$1" = "OSX" ]; then exit 1; fi else + # Setup clang + mkdir -p ~/bin + pushd ~/bin + curl -O http://releases.llvm.org/3.9.0/clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz + tar xzf clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz + echo PATH=~/bin/clang+llvm-3.9.0-x86_64-apple-darwin/bin >> ~/.bash_profile + source ~/.bash_profile + PROC_COUNT=`getconf _NPROCESSORS_ONLN` mkdir /tmp/icu_build pushd /tmp/icu_build @@ -32,6 +40,7 @@ elif [ "$1" = "OSX" ]; then ./configure make -j ${PROC_COUNT} sudo make install + fi else echo "Must pass \"Linux\" or \"OSX\" as first argument." From 1f2a890d7d3f72964ca210a23812b10ad3c4c1ce Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 21:09:11 -0800 Subject: [PATCH 5/8] Correc the path --- eng/install-native-dependencies.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index a60b9ced4378..4397f81869f6 100644 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -26,7 +26,7 @@ elif [ "$1" = "OSX" ]; then pushd ~/bin curl -O http://releases.llvm.org/3.9.0/clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz tar xzf clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz - echo PATH=~/bin/clang+llvm-3.9.0-x86_64-apple-darwin/bin >> ~/.bash_profile + echo "PATH=~/bin/clang+llvm-3.9.0-x86_64-apple-darwin/bin:$PATH" >> ~/.bash_profile source ~/.bash_profile PROC_COUNT=`getconf _NPROCESSORS_ONLN` @@ -40,7 +40,6 @@ elif [ "$1" = "OSX" ]; then ./configure make -j ${PROC_COUNT} sudo make install - fi else echo "Must pass \"Linux\" or \"OSX\" as first argument." From 09051fee21e1092f9a82a36e2c828b1aca7bd3b4 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 21:24:13 -0800 Subject: [PATCH 6/8] Build changes --- build.sh | 2 +- src/pal/tools/gen-buildsys-clang.sh | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index e9b5d062b0fc..dd5d4823c4dc 100755 --- a/build.sh +++ b/build.sh @@ -306,7 +306,7 @@ build_native() pushd "$intermediatesForBuild" # Regenerate the CMake solution echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs" - "$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs" + bash -x "$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs" popd fi diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh index 597ae5d76d55..44ed237c29d8 100755 --- a/src/pal/tools/gen-buildsys-clang.sh +++ b/src/pal/tools/gen-buildsys-clang.sh @@ -90,7 +90,13 @@ locate_llvm_exec() { then echo "$(command -v $llvm_prefix$1)" else - exit 1 + if [ $OS = "Darwin" ]; then + if [${llvm_prefix} = "llvm-"]; then + exit 1 + fi + llvm_prefix="llvm-" + $(locate_llvm_exec ar) + fi fi } From 5d018634b9ea6aa8c590f3847251edf3b6449642 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 21:48:42 -0800 Subject: [PATCH 7/8] Fix hosted queue --- build.sh | 2 +- eng/install-native-dependencies.sh | 8 -------- eng/xplat-job.yml | 4 ++-- src/pal/tools/gen-buildsys-clang.sh | 8 +------- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index dd5d4823c4dc..e9b5d062b0fc 100755 --- a/build.sh +++ b/build.sh @@ -306,7 +306,7 @@ build_native() pushd "$intermediatesForBuild" # Regenerate the CMake solution echo "Invoking \"$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh\" \"$__ProjectRoot\" $__ClangMajorVersion \"$__ClangMinorVersion\" $platformArch $__BuildType $__CodeCoverage $generator $extraCmakeArguments $__cmakeargs" - bash -x "$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs" + "$__ProjectRoot/src/pal/tools/gen-buildsys-clang.sh" "$__ProjectRoot" $__ClangMajorVersion "$__ClangMinorVersion" $platformArch $__BuildType $__CodeCoverage $generator "$extraCmakeArguments" "$__cmakeargs" popd fi diff --git a/eng/install-native-dependencies.sh b/eng/install-native-dependencies.sh index 4397f81869f6..d8fd73151d20 100644 --- a/eng/install-native-dependencies.sh +++ b/eng/install-native-dependencies.sh @@ -21,14 +21,6 @@ elif [ "$1" = "OSX" ]; then exit 1; fi else - # Setup clang - mkdir -p ~/bin - pushd ~/bin - curl -O http://releases.llvm.org/3.9.0/clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz - tar xzf clang+llvm-3.9.0-x86_64-apple-darwin.tar.xz - echo "PATH=~/bin/clang+llvm-3.9.0-x86_64-apple-darwin/bin:$PATH" >> ~/.bash_profile - source ~/.bash_profile - PROC_COUNT=`getconf _NPROCESSORS_ONLN` mkdir /tmp/icu_build pushd /tmp/icu_build diff --git a/eng/xplat-job.yml b/eng/xplat-job.yml index b2d04df5374f..6332e8c71ba1 100644 --- a/eng/xplat-job.yml +++ b/eng/xplat-job.yml @@ -22,9 +22,9 @@ jobs: queue: ${{ if eq(parameters.osGroup, 'Linux') }}: name: Hosted Ubuntu 1604 - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}: + ${{ if and(eq(parameters.osGroup, 'OSX'), ne(variables['System.TeamProject'], 'public')) }}: name: Hosted Mac Internal - ${{ if and(eq(parameters.osGroup, 'Windows_NT'), eq(variables['System.TeamProject'], 'public')) }}: + ${{ if and(eq(parameters.osGroup, 'OSX'), eq(variables['System.TeamProject'], 'public')) }}: name: Hosted MacOS ${{ if and(eq(parameters.osGroup, 'Windows_NT'), ne(variables['System.TeamProject'], 'public')) }}: name: dotnet-internal-temp diff --git a/src/pal/tools/gen-buildsys-clang.sh b/src/pal/tools/gen-buildsys-clang.sh index 44ed237c29d8..597ae5d76d55 100755 --- a/src/pal/tools/gen-buildsys-clang.sh +++ b/src/pal/tools/gen-buildsys-clang.sh @@ -90,13 +90,7 @@ locate_llvm_exec() { then echo "$(command -v $llvm_prefix$1)" else - if [ $OS = "Darwin" ]; then - if [${llvm_prefix} = "llvm-"]; then - exit 1 - fi - llvm_prefix="llvm-" - $(locate_llvm_exec ar) - fi + exit 1 fi } From 3af2a3d6ad4c3a998c84d2bda24d38cfbcfa3500 Mon Sep 17 00:00:00 2001 From: jashook Date: Mon, 26 Nov 2018 21:54:20 -0800 Subject: [PATCH 8/8] Correct linux queue --- eng/xplat-job.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eng/xplat-job.yml b/eng/xplat-job.yml index 6332e8c71ba1..c466d8a2ac93 100644 --- a/eng/xplat-job.yml +++ b/eng/xplat-job.yml @@ -20,8 +20,10 @@ jobs: dependsOn: ${{ parameters.dependsOn }} queue: - ${{ if eq(parameters.osGroup, 'Linux') }}: + ${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}: name: Hosted Ubuntu 1604 + ${{ if and(eq(parameters.osGroup, 'Linux'), ne(variables['System.TeamProject'], 'public')) }}: + name: dnceng-linux-internal-temp ${{ if and(eq(parameters.osGroup, 'OSX'), ne(variables['System.TeamProject'], 'public')) }}: name: Hosted Mac Internal ${{ if and(eq(parameters.osGroup, 'OSX'), eq(variables['System.TeamProject'], 'public')) }}: