mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
360dca39d3 | ||
|
|
ae171d5ee6 | ||
|
|
2efd81d9ed |
No files matched your search
+10
-12
@@ -15,7 +15,7 @@
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
|
||||
/acceptance-tests @akoeplinger @kg
|
||||
/acceptance-tests/profiler-stress* @BrzVlad @akoeplinger
|
||||
/acceptance-tests/profiler-stress* @alexrp @akoeplinger
|
||||
|
||||
/data @directhex @akoeplinger
|
||||
/data/gdb @lewurm @vargaz
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
/docs @marek-safar @akoeplinger
|
||||
/docs/riscv.md @alexrp @lewurm
|
||||
/docs/sources/mono-api-profiler.html @BrzVlad
|
||||
/docs/sources/mono-api-profiler.html @alexrp
|
||||
|
||||
/external @akoeplinger @marek-safar
|
||||
/external/api-snapshot @marek-safar @akoeplinger
|
||||
@@ -34,16 +34,16 @@
|
||||
/external/corefx @akoeplinger @marek-safar @egorbo @steveisok
|
||||
/external/corert @akoeplinger @marek-safar @egorbo @steveisok
|
||||
/external/linker @marek-safar
|
||||
/external/llvm @SamMonoRT @vargaz @imhameed
|
||||
/external/llvm @SamMonoRT @vargaz
|
||||
/external/nuget-buildtasks @radical @akoeplinger
|
||||
/external/roslyn-binaries @kg @marek-safar @akoeplinger @lewing
|
||||
|
||||
/libgc @BrzVlad @vargaz @naricc
|
||||
|
||||
/llvm @vargaz @SamMonoRT @imhameed
|
||||
/llvm @vargaz @SamMonoRT
|
||||
|
||||
/man @marek-safar @miguel
|
||||
/man/*prof* @BrzVlad
|
||||
/man/*prof* @alexrp
|
||||
|
||||
/mcs @marek-safar @akoeplinger @egorbo
|
||||
|
||||
@@ -95,23 +95,20 @@
|
||||
|
||||
/mono/mini @vargaz @lewurm @lambdageek @SamMonoRT
|
||||
/mono/mini/*cfgdump* @lewurm @vargaz
|
||||
/mono/mini/*exceptions* @lewurm @vargaz @BrzVlad
|
||||
/mono/mini/*exceptions* @lewurm @vargaz
|
||||
/mono/mini/*ppc* @lewurm @vargaz
|
||||
/mono/mini/*riscv* @alexrp @lewurm
|
||||
/mono/mini/*type-check* @lewurm @lambdageek
|
||||
/mono/mini/*llvm* @vargaz @imhameed
|
||||
/mono/mini/interp/* @lewurm @BrzVlad
|
||||
/mono/mini/*profiler* @BrzVlad @lambdageek
|
||||
/mono/mini/*profiler* @alexrp @lambdageek
|
||||
/mono/mini/debugger-agent.c @vargaz @thaystg @DavidKarlas @lambdageek
|
||||
|
||||
/mono/native @baulig @egorbo @alexischr @marek-safar
|
||||
|
||||
/mono/profiler @BrzVlad @lambdageek
|
||||
/mono/profiler @alexrp @lambdageek
|
||||
|
||||
/mono/sgen @BrzVlad @lambdageek
|
||||
|
||||
/mono/tools/offsets-tool @lewurm @rolfbjarne
|
||||
|
||||
/mono/utils @vargaz @lewurm @lambdageek
|
||||
/mono/utils/atomic* @lewurm @vargaz
|
||||
/mono/utils/mono-hwcap* @lewurm @vargaz
|
||||
@@ -132,7 +129,7 @@
|
||||
/runtime @akoeplinger @marek-safar
|
||||
|
||||
/samples @lambdageek @lewurm
|
||||
/samples/profiler @BrzVlad @lambdageek
|
||||
/samples/profiler @alexrp @lambdageek
|
||||
/samples/size @alexrp @lambdageek
|
||||
|
||||
/scripts @akoeplinger @directhex
|
||||
@@ -152,5 +149,6 @@
|
||||
/tools @lambdageek @vargaz
|
||||
/tools/locale-builder @marek-safar @egorbo
|
||||
/tools/nuget-hash-extractor @marek-safar @radical @akoeplinger
|
||||
/tools/offsets-tool @lewurm @rolfbjarne
|
||||
/tools/pedump @lambdageek @lewurm
|
||||
/tools/sgen @brzvlad @vargaz @naricc
|
||||
@@ -140,6 +140,7 @@ sdks/builds/llvm-*/
|
||||
sdks/builds/android-*/
|
||||
mcs/build/compiler-server.log
|
||||
|
||||
|
||||
##############################################################################
|
||||
# Arcade output directories
|
||||
##############################################################################
|
||||
|
||||
+2
-3
@@ -21,14 +21,14 @@ endif
|
||||
|
||||
if ENABLE_NETCORE
|
||||
update_submodules =
|
||||
SUBDIRS = mk llvm mono runtime netcore netcore/corerun
|
||||
SUBDIRS = mk llvm mono runtime netcore
|
||||
else
|
||||
update_submodules = update_submodules
|
||||
SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
|
||||
endif
|
||||
|
||||
# Keep in sync with SUBDIRS
|
||||
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests netcore netcore/corerun
|
||||
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests netcore
|
||||
|
||||
all: $(update_submodules)
|
||||
|
||||
@@ -46,7 +46,6 @@ EXTRA_DIST= \
|
||||
winconfig.h \
|
||||
code_of_conduct.md \
|
||||
external \
|
||||
netcore/Makefile \
|
||||
mcs/class/referencesource
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_RUNTIME=false
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
"name": "roslyn",
|
||||
"url": "git://github.com/mono/roslyn.git",
|
||||
"rev": "6bfcd4e770609a38b8523e83ce1ec943162f30bb",
|
||||
"rev": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
|
||||
"remote-branch": "origin/mono-testing",
|
||||
"branch": "mono-testing",
|
||||
"directory": "roslyn"
|
||||
|
||||
@@ -4014,42 +4014,24 @@ Global
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|net_4_x.Build.0 = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|net_4_x.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|net_4_x.Build.0 = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monodroid.ActiveCfg = Debug|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monodroid.Build.0 = Debug|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monodroid.ActiveCfg = Release|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monodroid.Build.0 = Release|monodroid
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch.ActiveCfg = Debug|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch.Build.0 = Debug|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch.ActiveCfg = Release|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch.Build.0 = Release|monotouch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_tv.ActiveCfg = Debug|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_tv.Build.0 = Debug|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_tv.ActiveCfg = Release|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_tv.Build.0 = Release|monotouch_tv
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_watch.ActiveCfg = Debug|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_watch.Build.0 = Debug|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_watch.ActiveCfg = Release|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_watch.Build.0 = Release|monotouch_watch
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|orbis.ActiveCfg = Debug|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|orbis.Build.0 = Debug|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|orbis.ActiveCfg = Release|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|orbis.Build.0 = Release|orbis
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|unreal.ActiveCfg = Debug|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|unreal.Build.0 = Debug|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|unreal.ActiveCfg = Release|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|unreal.Build.0 = Release|unreal
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|wasm.ActiveCfg = Debug|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|wasm.Build.0 = Debug|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|wasm.ActiveCfg = Release|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|wasm.Build.0 = Release|wasm
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|winaot.ActiveCfg = Debug|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|winaot.Build.0 = Debug|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|winaot.ActiveCfg = Release|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|winaot.Build.0 = Release|winaot
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|xammac.ActiveCfg = Debug|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|xammac.Build.0 = Debug|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|xammac.ActiveCfg = Release|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|xammac.Build.0 = Release|xammac
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monodroid.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monodroid.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_tv.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_tv.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|monotouch_watch.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|monotouch_watch.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|orbis.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|orbis.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|unreal.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|unreal.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|wasm.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|wasm.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|winaot.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|winaot.ActiveCfg = Release|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Debug|xammac.ActiveCfg = Debug|net_4_x
|
||||
{AC3AC4DA-7C10-4AE9-A131-6DBBE61432E3}.Release|xammac.ActiveCfg = Release|net_4_x
|
||||
{7C660E7A-C89B-4ACA-9458-492B6D14B168}.Debug|net_4_x.ActiveCfg = Debug|net_4_x
|
||||
{7C660E7A-C89B-4ACA-9458-492B6D14B168}.Debug|net_4_x.Build.0 = Debug|net_4_x
|
||||
{7C660E7A-C89B-4ACA-9458-492B6D14B168}.Release|net_4_x.ActiveCfg = Release|net_4_x
|
||||
|
||||
+65
-94
@@ -4,23 +4,11 @@
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
AC_INIT(mono, [6.8.0],
|
||||
AC_INIT(mono, [6.7.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
if test "x$host_alias" = "x"; then
|
||||
build_uname_all=`(uname -a) 2>/dev/null`
|
||||
case "$build_uname_all" in
|
||||
CYGWIN*)
|
||||
AC_MSG_NOTICE([Run configure using ./configure --host=i686-w64-mingw32 or --host=x86_64-w64-mingw32])
|
||||
AC_MSG_NOTICE([Falling back using --host=x86_64-w64-mingw32 as default.])
|
||||
host_alias=x86_64-w64-mingw32
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
@@ -28,7 +16,7 @@ AC_CANONICAL_HOST
|
||||
# The extra brackets are to foil regex-based scans.
|
||||
m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 dist-xz tar-ustar no-dist-gzip foreign]
|
||||
AM_INIT_AUTOMAKE([1.9 dist-xz tar-ustar no-dist-gzip foreign subdir-objects]
|
||||
m4_esyscmd([case `automake --version | head -n 1` in # parallel-tests is default in automake 1.13+, we need to explicitly enable it
|
||||
*1.11*|*1.12*) echo parallel-tests;; # for 1.11 and 1.12 but not below as those versions don't recognize the flag
|
||||
esac])) # TODO: remove this hack once we require automake 1.11+
|
||||
@@ -74,7 +62,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
|
||||
# This line is parsed by tools besides autoconf, such as msvc/mono.winconfig.targets.
|
||||
# It should remain in the format they expect.
|
||||
#
|
||||
MONO_CORLIB_VERSION=ABB721D6-116A-4555-B4FD-9248146D2051
|
||||
MONO_CORLIB_VERSION=69f9feb5-e6ef-4d90-8722-17346c85efb6
|
||||
|
||||
#
|
||||
# Put a quoted #define in config.h.
|
||||
@@ -149,7 +137,6 @@ platform_tizen=no
|
||||
platform_ios=no
|
||||
host_darwin=no
|
||||
host_linux=no
|
||||
build_darwin=no
|
||||
|
||||
case "$host" in
|
||||
wasm32*)
|
||||
@@ -157,11 +144,6 @@ case "$host" in
|
||||
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -s WASM=1"
|
||||
libgc_threads=pthreads
|
||||
platform_wasm=yes
|
||||
# FIXME:
|
||||
RID="osx-x64"
|
||||
COREARCH="x64"
|
||||
CORETARGETS="-p:TargetsUnix=true -p:TargetsOSX=true"
|
||||
build_darwin=yes
|
||||
;;
|
||||
*-mingw*|*-*-cygwin*)
|
||||
AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
|
||||
@@ -1352,9 +1334,10 @@ with_wasm_default=no
|
||||
with_bitcode_default=no
|
||||
enable_cooperative_suspend_default=no
|
||||
enable_hybrid_suspend_default=no
|
||||
enable_copy_stack_data_default=yes
|
||||
|
||||
# For the sake of clearer error messages, these numbers should all be different from each other.
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000,nrgctx-trampolines=21000
|
||||
INVARIANT_AOT_OPTIONS=nimt-trampolines=2000,ntrampolines=10000,nrgctx-fetch-trampolines=256,ngsharedvt-trampolines=4400,nftnptr-arg-trampolines=4000
|
||||
|
||||
AOT_BUILD_ATTRS=$INVARIANT_AOT_OPTIONS
|
||||
|
||||
@@ -1378,7 +1361,6 @@ elif test x$with_runtime_preset = xnetcore; then
|
||||
mono_feature_disable_com='yes'
|
||||
mono_feature_disable_gac='yes'
|
||||
mono_feature_disable_perfcounters='yes'
|
||||
mono_feature_disable_attach='yes'
|
||||
disable_mono_native=yes
|
||||
support_boehm=no
|
||||
elif test x$with_runtime_preset = xnet_4_x; then
|
||||
@@ -2951,6 +2933,13 @@ if test x$host_win32 = xno; then
|
||||
AC_SEARCH_LIBS(shm_open, pthread rt posix4)
|
||||
AC_CHECK_FUNCS(shm_open)
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for gettext lib ***
|
||||
dnl ********************************
|
||||
# This is needed for some hackery for AIX;
|
||||
# Mono itself doesn't use it, but DllMap includes it
|
||||
AC_SEARCH_LIBS([gettext], [intl])
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for timezone stuff **
|
||||
dnl ********************************
|
||||
@@ -3404,38 +3393,13 @@ if test x$host_win32 = xno; then
|
||||
AC_CHECK_DECL(ICANON, [AC_DEFINE(HAVE_ICANON, 1, [ICANON])], [], [[#include <termios.h>]])
|
||||
AC_CHECK_DECL(TCSANOW, [AC_DEFINE(HAVE_TCSANOW, 1, [TCSANOW])], [], [[#include <termios.h>]])
|
||||
|
||||
AC_CHECK_DECL(lchflags, [AC_DEFINE(HAVE_LCHFLAGS, 1, [lchflags])], [],
|
||||
[[#include <sys/types.h>
|
||||
#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_flags,
|
||||
[AC_DEFINE(HAVE_STAT_FLAGS, 1, [struct stat.st_flags])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
|
||||
AC_CHECK_MEMBER(struct stat.st_birthtimespec,
|
||||
[AC_DEFINE(HAVE_STAT_BIRTHTIME, 1, [struct stat.st_birthtimespec])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimespec,
|
||||
[AC_DEFINE(HAVE_STAT_TIMESPEC, 1, [struct stat.st_atimespec])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_atim,
|
||||
[AC_DEFINE(HAVE_STAT_TIM, 1, [struct stat.st_atim])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimensec,
|
||||
[AC_DEFINE(HAVE_STAT_NSEC, 1, [struct stat.st_atimensec])],
|
||||
[],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/stat.h>])
|
||||
AC_CHECK_MEMBER(struct dirent.d_namlen, [AC_DEFINE(HAVE_DIRENT_NAME_LEN, 1, [struct dirent.d_namlen])], [], [#include <dirent.h>])
|
||||
AC_CHECK_MEMBER(struct statfs.f_fstypename, [AC_DEFINE(HAVE_STATFS_FSTYPENAME, 1, [struct statfs.f_fstypename])], [], [#include <sys/mount.h>])
|
||||
AC_CHECK_MEMBER(struct statvfs.f_fstypename, [AC_DEFINE(HAVE_STATVFS_FSTYPENAME, 1, [struct statvfs.f_fstypename])], [], [#include <sys/mount.h>])
|
||||
AC_CHECK_MEMBER(struct stat.st_birthtimespec, [AC_DEFINE(HAVE_STAT_BIRTHTIME, 1, [struct stat.st_birthtime])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimespec, [AC_DEFINE(HAVE_STAT_TIMESPEC, 1, [struct stat.st_atimespec])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_atim, [AC_DEFINE(HAVE_STAT_TIM, 1, [struct stat.st_atim])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct stat.st_atimensec, [AC_DEFINE(HAVE_STAT_NSEC, 1, [struct stat.st_atimensec])], [], [[#include <sys/types.h>], [#include <sys/stat.h>]])
|
||||
AC_CHECK_MEMBER(struct dirent.d_namlen, [AC_DEFINE(HAVE_DIRENT_NAME_LEN, 1, [struct dirent.d_namlen])], [], [[#include <dirent.h>]])
|
||||
AC_CHECK_MEMBER(struct statfs.f_fstypename, [AC_DEFINE(HAVE_STATFS_FSTYPENAME, 1, [struct statfs.f_fstypename])], [], [[#include <sys/mount.h>]])
|
||||
AC_CHECK_MEMBER(struct statvfs.f_fstypename, [AC_DEFINE(HAVE_STATVFS_FSTYPENAME, 1, [struct statvfs.f_fstypename])], [], [[#include <sys/mount.h>]])
|
||||
|
||||
AC_MSG_CHECKING(for struct statfs)
|
||||
AC_TRY_COMPILE([
|
||||
@@ -3800,7 +3764,6 @@ if test x$host_win32 = xno; then
|
||||
AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h])
|
||||
AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
|
||||
enable_gss=yes
|
||||
AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
@@ -3812,7 +3775,6 @@ if test x$host_win32 = xno; then
|
||||
],[
|
||||
AC_MSG_RESULT(yes)
|
||||
enable_gss=yes
|
||||
AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
@@ -4221,7 +4183,14 @@ if test "x$enable_llvm" = "xyes"; then
|
||||
AC_MSG_ERROR([LLVM executable $EXTERNAL_LLVM_CONFIG not found.])
|
||||
fi
|
||||
else
|
||||
internal_llvm=yes
|
||||
if test x$host_win32 = xyes; then
|
||||
AC_PATH_PROG(EXTERNAL_LLVM_CONFIG, llvm-config.exe, no)
|
||||
else
|
||||
AC_PATH_PROG(EXTERNAL_LLVM_CONFIG, llvm-config, no)
|
||||
fi
|
||||
if test "x$EXTERNAL_LLVM_CONFIG" = "xno"; then
|
||||
internal_llvm=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
LLVM_CODEGEN_LIBS="x86codegen"
|
||||
@@ -4644,7 +4613,6 @@ if test "x$host" != "x$target"; then
|
||||
aarch64*darwin*_ilp32)
|
||||
TARGET=ARM6432;
|
||||
AC_DEFINE(MONO_ARCH_ILP32, 1, [64 bit mode with 4 byte longs and pointers])
|
||||
sizeof_register=8
|
||||
AC_DEFINE(TARGET_WATCHOS, 1, [...])
|
||||
;;
|
||||
aarch64-*)
|
||||
@@ -5673,7 +5641,6 @@ fi
|
||||
|
||||
if test x$enable_cooperative_suspend != xno; then
|
||||
AC_DEFINE(ENABLE_COOP_SUSPEND,1,[Enable cooperative stop-the-world garbage collection.])
|
||||
enable_hybrid_suspend_default=no
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([ENABLE_COOP_SUSPEND], [test x$enable_cooperative_suspend != xno])
|
||||
@@ -5696,6 +5663,38 @@ AM_CONDITIONAL([ENABLE_HYBRID_SUSPEND], [test x$enable_hybrid_suspend != xno])
|
||||
|
||||
dnl End of thread suspend policy
|
||||
|
||||
dnl *******************************
|
||||
dnl *** Copy stack data support ***
|
||||
dnl *******************************
|
||||
|
||||
dnl Disable copy_stack_data on platforms supporting full context and
|
||||
dnl having access to full stack of running threads.
|
||||
if test x$enable_copy_stack_data_default != xno; then
|
||||
case $HOST in
|
||||
X86 | AMD64)
|
||||
if test x$target_osx = xyes; then
|
||||
dnl Some host/target confusion, there's no host_osx (and
|
||||
dnl host_darwin would be true on iOS not just macOS).
|
||||
enable_copy_stack_data_default=no
|
||||
elif test x$host_linux = xyes -o x$host_win32 = xyes; then
|
||||
enable_copy_stack_data_default=no
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE(copy_stack_data, [ --enable-copy-stack-data Enable copy_stack_data feature for hybrid/cooperative suspend scenarios, (defaults to yes)], [], [enable_copy_stack_data=default])
|
||||
|
||||
if test x$enable_copy_stack_data = xdefault; then
|
||||
enable_copy_stack_data=$enable_copy_stack_data_default
|
||||
fi
|
||||
|
||||
if test x$enable_copy_stack_data != xno ; then
|
||||
AC_DEFINE(ENABLE_COPY_STACK_DATA,1,[Enable copy_stack_data feature for hybrid/cooperative suspend scenarios])
|
||||
fi
|
||||
|
||||
dnl End of Copy stack data support
|
||||
|
||||
dnl ***************************
|
||||
dnl *** feature experiments ***
|
||||
dnl ***************************
|
||||
@@ -6010,15 +6009,6 @@ AC_DEFINE(MONO_INSIDE_RUNTIME,1, [Disable banned functions from being used by th
|
||||
mono_build_root=`pwd`
|
||||
AC_SUBST(mono_build_root)
|
||||
|
||||
AC_ARG_ENABLE(msvc_only,[ --enable-msvc-only Build only with Visual Studio (msvc) (defaults to no). Disable gcc build.], enable_msvc_only=$enableval, enable_msvc_only=no)
|
||||
if test x$host_win32 = xno; then
|
||||
if test x$enable_msvc_only = xyes; then
|
||||
echo "Error, --enable-msvc-only only supported for Windows builds."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_MSVC_ONLY, test x$enable_msvc_only = xyes)
|
||||
|
||||
AC_ARG_ENABLE(msvc,[ --enable-msvc Build with Visual Studio (msvc) (defaults to no)], enable_msvc=$enableval, enable_msvc=no)
|
||||
if test x$host_win32 = xno; then
|
||||
if test x$enable_msvc = xyes; then
|
||||
@@ -6026,9 +6016,6 @@ if test x$host_win32 = xno; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if test x$enable_msvc_only = xyes; then
|
||||
enable_msvc=yes
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_MSVC, test x$enable_msvc = xyes)
|
||||
|
||||
if test "x$enable_msvc" = "xyes"; then
|
||||
@@ -6059,8 +6046,8 @@ fi
|
||||
AC_SUBST(mono_runtime)
|
||||
AC_SUBST(mono_runtime_wrapper)
|
||||
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.5.0/VBCSCompiler.exe
|
||||
CSC_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.0/csc.exe
|
||||
VBCS_LOCATION=`cd $srcdir && pwd`/external/roslyn-binaries/Microsoft.Net.Compilers/3.3.0/VBCSCompiler.exe
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -6426,11 +6413,7 @@ elif test x$host_linux = xyes; then
|
||||
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
|
||||
MONO_NATIVE_CFLAGS=$CFLAGS
|
||||
MONO_NATIVE_LDFLAGS=$LDFLAGS
|
||||
if test x$enable_gss = xyes; then
|
||||
MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -lgssapi_krb5"
|
||||
else
|
||||
AC_MSG_WARN([GSS is not enabled, it requires libkrb5-dev package])
|
||||
fi
|
||||
|
||||
mono_native=yes
|
||||
mono_native_compat=no
|
||||
MONO_NATIVE_PLATFORM=linux
|
||||
@@ -6777,7 +6760,6 @@ tools/mono-hang-watchdog/Makefile
|
||||
runtime/Makefile
|
||||
msvc/Makefile
|
||||
po/Makefile
|
||||
netcore/corerun/Makefile
|
||||
])
|
||||
|
||||
if test x$host_win32 = xyes; then
|
||||
@@ -6819,8 +6801,8 @@ AC_MSG_RESULT($enable_compiler_server)
|
||||
if test x$enable_compiler_server = xyes; then
|
||||
if test x$force_enable_compiler_server = xyes; then
|
||||
AC_MSG_WARN([forcing compiler server to stay enabled])
|
||||
elif test x$host_darwin = xyes || test x$host_win32 = xyes; then
|
||||
AC_MSG_WARN([compiler server temporarily disabled on darwin and win32])
|
||||
elif test x$host_darwin = xyes; then
|
||||
AC_MSG_WARN([compiler server temporarily disabled on darwin])
|
||||
enable_compiler_server=no;
|
||||
elif test x$csc_compiler = xmcs; then
|
||||
AC_MSG_WARN([mcs does not support the compiler server])
|
||||
@@ -6966,10 +6948,6 @@ fi
|
||||
fi
|
||||
echo "COMPILER_SERVER_PIPENAME?=monomake" >> $srcdir/$mcsdir/build/config.make
|
||||
|
||||
if test x$enable_msvc_only = xyes; then
|
||||
echo "ENABLE_MSVC_ONLY=1" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
)
|
||||
@@ -6997,20 +6975,13 @@ if test x$buildsgen = xyes; then
|
||||
fi
|
||||
|
||||
if test "x$with_core" = "xonly"; then
|
||||
if test ! -d netcore; then
|
||||
# Out of tree builds
|
||||
mkdir -p netcore
|
||||
echo "all:" > netcore/Makefile
|
||||
fi
|
||||
echo "VERSION = $VERSION" > netcore/config.make
|
||||
echo "RID = $RID" >> netcore/config.make
|
||||
echo "COREARCH = $COREARCH" >> netcore/config.make
|
||||
echo "CORETARGETS = $CORETARGETS" >> netcore/config.make
|
||||
echo "MONO_CORLIB_VERSION = $MONO_CORLIB_VERSION" >> netcore/config.make
|
||||
|
||||
if test x$build_darwin = xyes; then
|
||||
echo "HOST_PLATFORM ?= macos" >> netcore/config.make
|
||||
elif test x$host_darwin = xyes; then
|
||||
if test x$host_darwin = xyes; then
|
||||
echo "HOST_PLATFORM ?= macos" >> netcore/config.make
|
||||
elif test x$host_win32 = xyes; then
|
||||
echo "HOST_PLATFORM ?= win32" >> netcore/config.make
|
||||
|
||||
@@ -109,12 +109,6 @@ typedef struct {
|
||||
|
||||
<h3>Write Barriers</h3>
|
||||
|
||||
<p>SGen is a concurrent and generational GC, features which require
|
||||
tracking changes to the state of the heap. This is achieved through
|
||||
write barriers. Whenever native code is changing the state of the
|
||||
heap by storing references into another managed object, it needs to
|
||||
do it using this write barrier API.
|
||||
|
||||
<h4><a name="api:mono_gc_wbarrier_arrayref_copy">mono_gc_wbarrier_arrayref_copy</a></h4>
|
||||
<h4><a name="api:mono_gc_wbarrier_generic_nostore">mono_gc_wbarrier_generic_nostore</a></h4>
|
||||
<h4><a name="api:mono_gc_wbarrier_generic_store">mono_gc_wbarrier_generic_store</a></h4>
|
||||
|
||||
+10
-10
@@ -1,27 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Dependencies>
|
||||
<ProductDependencies>
|
||||
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="5.0.0-alpha1.19502.7">
|
||||
<Dependency Name="Microsoft.Private.CoreFx.NETCoreApp" Version="5.0.0-alpha1.19409.2">
|
||||
<Uri>https://github.com/dotnet/corefx</Uri>
|
||||
<Sha>a50e056c5a62fb6dfe2e9475be47b93d33661700</Sha>
|
||||
<Sha>719b8fb635db44ba80ea6d5f2e7effaf5906f588</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-alpha1.19476.2">
|
||||
<Dependency Name="Microsoft.NETCore.App" Version="5.0.0-alpha1.19409.2">
|
||||
<Uri>https://github.com/dotnet/core-setup</Uri>
|
||||
<Sha>5a0e8cf49b21c1c6551296f9ee02225c49cc4940</Sha>
|
||||
<Sha>cd732014d34f3b72375115e78f84c4617bce6b48</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.Net.Compilers" Version="3.3.1-beta4-19476-06">
|
||||
<Dependency Name="Microsoft.Net.Compilers" Version="3.3.0-beta2-19381-14">
|
||||
<Uri>https://github.com/dotnet/roslyn</Uri>
|
||||
<Sha>39d545dc14bc4d5a546e5e2f58d1ebaca72fcd61</Sha>
|
||||
<Sha>ef3a7a3863ae53b610a4b0c3682a35cad0829583</Sha>
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19473.5">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="1.0.0-beta.19379.1">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>ef4b288de587f0b86e65b3950e9095f714808ade</Sha>
|
||||
<Sha>193793488c727c2d12a04b4abe5e6ea63ad20526</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.19473.5">
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="2.0.0-beta.19379.1">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>ef4b288de587f0b86e65b3950e9095f714808ade</Sha>
|
||||
<Sha>193793488c727c2d12a04b4abe5e6ea63ad20526</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VersionPrefix>5.0.0</VersionPrefix>
|
||||
<VersionPrefix>1.0.0</VersionPrefix>
|
||||
<PreReleaseVersionLabel>prerelease</PreReleaseVersionLabel>
|
||||
<!-- Package versions -->
|
||||
<!-- corefx -->
|
||||
<MicrosoftPrivateCoreFxNETCoreAppVersion>5.0.0-alpha1.19502.7</MicrosoftPrivateCoreFxNETCoreAppVersion>
|
||||
<MicrosoftPrivateCoreFxNETCoreAppVersion>5.0.0-alpha1.19409.2</MicrosoftPrivateCoreFxNETCoreAppVersion>
|
||||
<!-- core-setup -->
|
||||
<MicrosoftNETCoreAppVersion>5.0.0-alpha1.19476.2</MicrosoftNETCoreAppVersion>
|
||||
<MicrosoftNETCoreAppVersion>5.0.0-alpha1.19409.2</MicrosoftNETCoreAppVersion>
|
||||
<!-- roslyn -->
|
||||
<MicrosoftNetCompilersVersion>3.3.1-beta4-19476-06</MicrosoftNetCompilersVersion>
|
||||
<MicrosoftNetCompilersVersion>3.3.0-beta2-19374-02</MicrosoftNetCompilersVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -85,10 +85,6 @@ function Build {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
# Explicitly set the type as string[] because otherwise PowerShell would make this char[] if $properties is empty.
|
||||
[string[]] $msbuildArgs = $properties
|
||||
|
||||
# Resolve relative project paths into full paths
|
||||
$projects = ($projects.Split(';').ForEach({Resolve-Path $_}) -join ';')
|
||||
|
||||
$msbuildArgs += "/p:Projects=$projects"
|
||||
$properties = $msbuildArgs
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
param (
|
||||
$darcVersion = $null,
|
||||
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16",
|
||||
$verbosity = "m"
|
||||
$versionEndpoint = "https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
|
||||
)
|
||||
|
||||
$verbosity = "m"
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InstallDarcCli ($darcVersion) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
source="${BASH_SOURCE[0]}"
|
||||
darcVersion=''
|
||||
versionEndpoint="https://maestro-prod.westus2.cloudapp.azure.com/api/assets/darc-version?api-version=2019-01-16"
|
||||
verbosity=m
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
@@ -16,10 +15,6 @@ while [[ $# > 0 ]]; do
|
||||
versionEndpoint=$2
|
||||
shift
|
||||
;;
|
||||
--verbosity)
|
||||
verbosity=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
usage
|
||||
@@ -39,6 +34,7 @@ while [[ -h "$source" ]]; do
|
||||
[[ $source != /* ]] && source="$scriptroot/$source"
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
verbosity=m
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
param(
|
||||
[string] $token
|
||||
)
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_ACCESSTOKEN]$token"
|
||||
Write-Host "##vso[task.setvariable variable=VSS_NUGET_URI_PREFIXES]https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/"
|
||||
@@ -70,7 +70,8 @@ function ReadGlobalJsonNativeTools {
|
||||
# Only extract the contents of the object.
|
||||
local native_tools_list=$(echo $native_tools_section | awk -F"[{}]" '{print $2}')
|
||||
native_tools_list=${native_tools_list//[\" ]/}
|
||||
native_tools_list=$( echo "$native_tools_list" | sed 's/\s//g' | sed 's/,/\n/g' )
|
||||
native_tools_list=${native_tools_list//,/$'\n'}
|
||||
native_tools_list="$(echo -e "${native_tools_list}" | tr -d '[[:space:]]')"
|
||||
|
||||
local old_IFS=$IFS
|
||||
while read -r line; do
|
||||
@@ -107,7 +108,6 @@ else
|
||||
installer_command+=" --baseuri $base_uri"
|
||||
installer_command+=" --installpath $install_bin"
|
||||
installer_command+=" --version $tool_version"
|
||||
echo $installer_command
|
||||
|
||||
if [[ $force = true ]]; then
|
||||
installer_command+=" --force"
|
||||
|
||||
@@ -152,8 +152,6 @@ function Get-File {
|
||||
}
|
||||
else {
|
||||
Write-Verbose "Downloading $Uri"
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
while($Attempt -Lt $DownloadRetries)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. $scriptroot/common-library.sh
|
||||
|
||||
base_uri=
|
||||
install_path=
|
||||
version=
|
||||
clean=false
|
||||
force=false
|
||||
download_retries=5
|
||||
retry_wait_time_seconds=30
|
||||
|
||||
while (($# > 0)); do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
case $lowerI in
|
||||
--baseuri)
|
||||
base_uri=$2
|
||||
shift 2
|
||||
;;
|
||||
--installpath)
|
||||
install_path=$2
|
||||
shift 2
|
||||
;;
|
||||
--version)
|
||||
version=$2
|
||||
shift 2
|
||||
;;
|
||||
--clean)
|
||||
clean=true
|
||||
shift 1
|
||||
;;
|
||||
--force)
|
||||
force=true
|
||||
shift 1
|
||||
;;
|
||||
--downloadretries)
|
||||
download_retries=$2
|
||||
shift 2
|
||||
;;
|
||||
--retrywaittimeseconds)
|
||||
retry_wait_time_seconds=$2
|
||||
shift 2
|
||||
;;
|
||||
--help)
|
||||
echo "Common settings:"
|
||||
echo " --baseuri <value> Base file directory or Url wrom which to acquire tool archives"
|
||||
echo " --installpath <value> Base directory to install native tool to"
|
||||
echo " --clean Don't install the tool, just clean up the current install of the tool"
|
||||
echo " --force Force install of tools even if they previously exist"
|
||||
echo " --help Print help and exit"
|
||||
echo ""
|
||||
echo "Advanced settings:"
|
||||
echo " --downloadretries Total number of retry attempts"
|
||||
echo " --retrywaittimeseconds Wait time between retry attempts in seconds"
|
||||
echo ""
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
tool_name="cmake-test"
|
||||
tool_os=$(GetCurrentOS)
|
||||
tool_folder=$(echo $tool_os | awk '{print tolower($0)}')
|
||||
tool_arch="x86_64"
|
||||
tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch"
|
||||
tool_install_directory="$install_path/$tool_name/$version"
|
||||
tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name"
|
||||
shim_path="$install_path/$tool_name.sh"
|
||||
uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz"
|
||||
|
||||
# Clean up tool and installers
|
||||
if [[ $clean = true ]]; then
|
||||
echo "Cleaning $tool_install_directory"
|
||||
if [[ -d $tool_install_directory ]]; then
|
||||
rm -rf $tool_install_directory
|
||||
fi
|
||||
|
||||
echo "Cleaning $shim_path"
|
||||
if [[ -f $shim_path ]]; then
|
||||
rm -rf $shim_path
|
||||
fi
|
||||
|
||||
tool_temp_path=$(GetTempPathFileName $uri)
|
||||
echo "Cleaning $tool_temp_path"
|
||||
if [[ -f $tool_temp_path ]]; then
|
||||
rm -rf $tool_temp_path
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Install tool
|
||||
if [[ -f $tool_file_path ]] && [[ $force = false ]]; then
|
||||
echo "$tool_name ($version) already exists, skipping install"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Installation failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate Shim
|
||||
# Always rewrite shims so that we are referencing the expected version
|
||||
NewScriptShim $shim_path $tool_file_path true
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Shim generation failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -69,7 +69,7 @@ tool_name_moniker="$tool_name-$version-$tool_os-$tool_arch"
|
||||
tool_install_directory="$install_path/$tool_name/$version"
|
||||
tool_file_path="$tool_install_directory/$tool_name_moniker/bin/$tool_name"
|
||||
shim_path="$install_path/$tool_name.sh"
|
||||
uri="${base_uri}/$tool_folder/$tool_name/$tool_name_moniker.tar.gz"
|
||||
uri="${base_uri}/$tool_folder/cmake/$tool_name_moniker.tar.gz"
|
||||
|
||||
# Clean up tool and installers
|
||||
if [[ $clean = true ]]; then
|
||||
|
||||
@@ -5,14 +5,8 @@
|
||||
<CliArguments>--dotnet-versions %DOTNET_VERSION% --cli-source-info args --cli-branch %PERFLAB_BRANCH% --cli-commit-sha %PERFLAB_HASH% --cli-repository https://github.com/%PERFLAB_REPO% --cli-source-timestamp %PERFLAB_BUILDTIMESTAMP%</CliArguments>
|
||||
<Python>py -3</Python>
|
||||
<CoreRun>%HELIX_CORRELATION_PAYLOAD%\Core_Root\CoreRun.exe</CoreRun>
|
||||
<BaselineCoreRun>%HELIX_CORRELATION_PAYLOAD%\Baseline_Core_Root\CoreRun.exe</BaselineCoreRun>
|
||||
<HelixPreCommands>$(HelixPreCommands);call %HELIX_CORRELATION_PAYLOAD%\performance\tools\machine-setup.cmd</HelixPreCommands>
|
||||
<ArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts</ArtifactsDirectory>
|
||||
<BaselineArtifactsDirectory>%HELIX_CORRELATION_PAYLOAD%\artifacts\BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
|
||||
<ResultsComparer>%HELIX_CORRELATION_PAYLOAD%\performance\src\tools\ResultsComparer\ResultsComparer.csproj</ResultsComparer>
|
||||
<DotnetExe>%HELIX_CORRELATION_PAYLOAD%\performance\tools\dotnet\$(Architecture)\dotnet.exe</DotnetExe>
|
||||
<Percent>%25%25</Percent>
|
||||
<XMLResults>%HELIX_WORKITEM_ROOT%\testResults.xml</XMLResults>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(AGENT_OS)' != 'Windows_NT' and '$(RunFromPerfRepo)' == 'false'">
|
||||
@@ -30,24 +24,14 @@
|
||||
<CliArguments>--dotnet-versions $DOTNET_VERSION --cli-source-info args --cli-branch $PERFLAB_BRANCH --cli-commit-sha $PERFLAB_HASH --cli-repository https://github.com/$PERFLAB_REPO --cli-source-timestamp $PERFLAB_BUILDTIMESTAMP</CliArguments>
|
||||
<Python>python3</Python>
|
||||
<CoreRun>$(BaseDirectory)/Core_Root/corerun</CoreRun>
|
||||
<BaselineCoreRun>$(BaseDirectory)/Baseline_Core_Root/corerun</BaselineCoreRun>
|
||||
<HelixPreCommands>$(HelixPreCommands);chmod +x $(PerformanceDirectory)/tools/machine-setup.sh;. $(PerformanceDirectory)/tools/machine-setup.sh</HelixPreCommands>
|
||||
<ArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts</ArtifactsDirectory>
|
||||
<BaselineArtifactsDirectory>$(BaseDirectory)/artifacts/BenchmarkDotNet.Artifacts_Baseline</BaselineArtifactsDirectory>
|
||||
<ResultsComparer>$(PerformanceDirectory)/src/tools/ResultsComparer/ResultsComparer.csproj</ResultsComparer>
|
||||
<DotnetExe>$(PerformanceDirectory)/tools/dotnet/$(Architecture)/dotnet</DotnetExe>
|
||||
<Percent>%25</Percent>
|
||||
<XMLResults>$HELIX_WORKITEM_ROOT/testResults.xml</XMLResults>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(UseCoreRun)' == 'true'">
|
||||
<CoreRunArgument>--corerun $(CoreRun)</CoreRunArgument>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(UseBaselineCoreRun)' == 'true'">
|
||||
<BaselineCoreRunArgument>--corerun $(BaselineCoreRun)</BaselineCoreRunArgument>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(WorkItemCommand)' != ''">
|
||||
<WorkItemCommand>$(Python) $(WorkItemCommand) --incremental no --architecture $(Architecture) -f $(_Framework) $(PerfLabArguments)</WorkItemCommand>
|
||||
</PropertyGroup>
|
||||
@@ -73,29 +57,20 @@
|
||||
<Partition Include="$(BuildConfig).Partition4" Index="4" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Compare)' == 'true'">
|
||||
<FailOnTestFailure>false</FailOnTestFailure>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
Partition the Microbenchmarks project, but nothing else
|
||||
-->
|
||||
<ItemGroup Condition="$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
|
||||
<HelixWorkItem Include="@(Partition)">
|
||||
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
|
||||
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</PreCommands>
|
||||
<Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
|
||||
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults);$(FinalCommand)</PostCommands>
|
||||
<Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory) --partition-count $(PartitionCount) --partition-index %(HelixWorkItem.Index)"</Command>
|
||||
<Timeout>4:00</Timeout>
|
||||
</HelixWorkItem>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="!$(TargetCsproj.Contains('MicroBenchmarks.csproj'))">
|
||||
<HelixWorkItem Include="$(BuildConfig).WorkItem">
|
||||
<PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
|
||||
<PreCommands Condition="'$(Compare)' == 'true'">$(WorkItemCommand) --bdn-artifacts $(BaselineArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(BaselineCoreRunArgument)"</PreCommands>
|
||||
<Command>$(WorkItemCommand) --bdn-artifacts $(ArtifactsDirectory) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument)"</Command>
|
||||
<PostCommands Condition="'$(Compare)' == 'true'">$(DotnetExe) run -f $(_Framework) -p $(ResultsComparer) --base $(BaselineArtifactsDirectory) --diff $(ArtifactsDirectory) --threshold 2$(Percent) --xml $(XMLResults)</PostCommands>
|
||||
<Command>$(WorkItemCommand) --bdn-arguments="--anyCategories $(BDNCategories) $(ExtraBenchmarkDotNetArguments) $(CoreRunArgument) --artifacts $(ArtifactsDirectory)"</Command>
|
||||
<Timeout>4:00</Timeout>
|
||||
</HelixWorkItem>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
Param(
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY,
|
||||
[string] $CoreRootDirectory,
|
||||
[string] $BaselineCoreRootDirectory,
|
||||
[string] $Architecture="x64",
|
||||
[string] $Framework="netcoreapp5.0",
|
||||
[string] $Framework="netcoreapp3.0",
|
||||
[string] $CompilationMode="Tiered",
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME,
|
||||
[string] $Branch=$env:BUILD_SOURCEBRANCH,
|
||||
@@ -13,13 +12,11 @@ Param(
|
||||
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
|
||||
[string] $Kind="micro",
|
||||
[switch] $Internal,
|
||||
[switch] $Compare,
|
||||
[string] $Configurations="CompilationMode=$CompilationMode"
|
||||
)
|
||||
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance")
|
||||
$UseCoreRun = ($CoreRootDirectory -ne [string]::Empty)
|
||||
$UseBaselineCoreRun = ($BaselineCoreRootDirectory -ne [string]::Empty)
|
||||
|
||||
$PayloadDirectory = (Join-Path $SourceDirectory "Payload")
|
||||
$PerformanceDirectory = (Join-Path $PayloadDirectory "performance")
|
||||
@@ -32,17 +29,11 @@ $HelixSourcePrefix = "pr"
|
||||
$Queue = "Windows.10.Amd64.ClientRS4.DevEx.15.8.Open"
|
||||
|
||||
if ($Framework.StartsWith("netcoreapp")) {
|
||||
$Queue = "Windows.10.Amd64.ClientRS5.Open"
|
||||
}
|
||||
|
||||
if ($Compare) {
|
||||
$Queue = "Windows.10.Amd64.19H1.Tiger.Perf.Open"
|
||||
$PerfLabArguments = ""
|
||||
$ExtraBenchmarkDotNetArguments = ""
|
||||
$Queue = "Windows.10.Amd64.ClientRS4.Open"
|
||||
}
|
||||
|
||||
if ($Internal) {
|
||||
$Queue = "Windows.10.Amd64.19H1.Tiger.Perf"
|
||||
$Queue = "Windows.10.Amd64.ClientRS5.Perf"
|
||||
$PerfLabArguments = "--upload-to-perflab-container"
|
||||
$ExtraBenchmarkDotNetArguments = ""
|
||||
$Creator = ""
|
||||
@@ -65,10 +56,6 @@ if ($UseCoreRun) {
|
||||
$NewCoreRoot = (Join-Path $PayloadDirectory "Core_Root")
|
||||
Move-Item -Path $CoreRootDirectory -Destination $NewCoreRoot
|
||||
}
|
||||
if ($UseBaselineCoreRun) {
|
||||
$NewBaselineCoreRoot = (Join-Path $PayloadDirectory "Baseline_Core_Root")
|
||||
Move-Item -Path $BaselineCoreRootDirectory -Destination $NewBaselineCoreRoot
|
||||
}
|
||||
|
||||
$DocsDir = (Join-Path $PerformanceDirectory "docs")
|
||||
robocopy $DocsDir $WorkItemDirectory
|
||||
@@ -93,9 +80,7 @@ Write-PipelineSetVariable -Name 'TargetCsproj' -Value "$Csproj" -IsMultiJobVaria
|
||||
Write-PipelineSetVariable -Name 'Kind' -Value "$Kind" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'Architecture' -Value "$Architecture" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'UseCoreRun' -Value "$UseCoreRun" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'UseBaselineCoreRun' -Value "$UseBaselineCoreRun" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'RunFromPerfRepo' -Value "$RunFromPerformanceRepo" -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'Compare' -Value "$Compare" -IsMultiJobVariable $false
|
||||
|
||||
# Helix Arguments
|
||||
Write-PipelineSetVariable -Name 'Creator' -Value "$Creator" -IsMultiJobVariable $false
|
||||
|
||||
@@ -2,23 +2,20 @@
|
||||
|
||||
source_directory=$BUILD_SOURCESDIRECTORY
|
||||
core_root_directory=
|
||||
baseline_core_root_directory=
|
||||
architecture=x64
|
||||
framework=netcoreapp5.0
|
||||
framework=netcoreapp3.0
|
||||
compilation_mode=tiered
|
||||
repository=$BUILD_REPOSITORY_NAME
|
||||
branch=$BUILD_SOURCEBRANCH
|
||||
commit_sha=$BUILD_SOURCEVERSION
|
||||
build_number=$BUILD_BUILDNUMBER
|
||||
internal=false
|
||||
compare=false
|
||||
kind="micro"
|
||||
run_categories="coreclr corefx"
|
||||
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
|
||||
configurations=
|
||||
run_from_perf_repo=false
|
||||
use_core_run=true
|
||||
use_baseline_core_run=true
|
||||
|
||||
while (($# > 0)); do
|
||||
lowerI="$(echo $1 | awk '{print tolower($0)}')"
|
||||
@@ -31,10 +28,6 @@ while (($# > 0)); do
|
||||
core_root_directory=$2
|
||||
shift 2
|
||||
;;
|
||||
--baselinecorerootdirectory)
|
||||
baseline_core_root_directory=$2
|
||||
shift 2
|
||||
;;
|
||||
--architecture)
|
||||
architecture=$2
|
||||
shift 2
|
||||
@@ -79,10 +72,6 @@ while (($# > 0)); do
|
||||
internal=true
|
||||
shift 1
|
||||
;;
|
||||
--compare)
|
||||
compare=true
|
||||
shift 1
|
||||
;;
|
||||
--configurations)
|
||||
configurations=$2
|
||||
shift 2
|
||||
@@ -113,7 +102,7 @@ while (($# > 0)); do
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$repository" == "dotnet/performance" ] || [ "$repository" == "dotnet-performance" ]; then
|
||||
if [[ "$repository" == "dotnet/performance" ]]; then
|
||||
run_from_perf_repo=true
|
||||
fi
|
||||
|
||||
@@ -125,10 +114,6 @@ if [ -z "$core_root_directory" ]; then
|
||||
use_core_run=false
|
||||
fi
|
||||
|
||||
if [ -z "$baseline_core_root_directory" ]; then
|
||||
use_baseline_core_run=false
|
||||
fi
|
||||
|
||||
payload_directory=$source_directory/Payload
|
||||
performance_directory=$payload_directory/performance
|
||||
workitem_directory=$source_directory/workitem
|
||||
@@ -138,19 +123,6 @@ queue=Ubuntu.1804.Amd64.Open
|
||||
creator=$BUILD_DEFINITIONNAME
|
||||
helix_source_prefix="pr"
|
||||
|
||||
if [[ "$compare" == true ]]; then
|
||||
extra_benchmark_dotnet_arguments=
|
||||
perflab_arguments=
|
||||
|
||||
# No open queues for arm64
|
||||
if [[ "$architecture" = "arm64" ]]; then
|
||||
echo "Compare not available for arm64"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
queue=Ubuntu.1804.Amd64.Tiger.Perf.Open
|
||||
fi
|
||||
|
||||
if [[ "$internal" == true ]]; then
|
||||
perflab_arguments="--upload-to-perflab-container"
|
||||
helix_source_prefix="official"
|
||||
@@ -160,7 +132,7 @@ if [[ "$internal" == true ]]; then
|
||||
if [[ "$architecture" = "arm64" ]]; then
|
||||
queue=Ubuntu.1804.Arm64.Perf
|
||||
else
|
||||
queue=Ubuntu.1804.Amd64.Tiger.Perf
|
||||
queue=Ubuntu.1804.Amd64.Perf
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -184,33 +156,21 @@ if [[ "$use_core_run" = true ]]; then
|
||||
mv $core_root_directory $new_core_root
|
||||
fi
|
||||
|
||||
if [[ "$use_baseline_core_run" = true ]]; then
|
||||
new_baseline_core_root=$payload_directory/Baseline_Core_Root
|
||||
mv $baseline_core_root_directory $new_baseline_core_root
|
||||
fi
|
||||
|
||||
ci=true
|
||||
|
||||
_script_dir=$(pwd)/eng/common
|
||||
. "$_script_dir/pipeline-logging-functions.sh"
|
||||
|
||||
# Make sure all of our variables are available for future steps
|
||||
Write-PipelineSetVariable -name "UseCoreRun" -value "$use_core_run" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "UseBaselineCoreRun" -value "$use_baseline_core_run" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Architecture" -value "$architecture" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "PayloadDirectory" -value "$payload_directory" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "PerformanceDirectory" -value "$performance_directory" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "WorkItemDirectory" -value "$workitem_directory" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Queue" -value "$queue" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "SetupArguments" -value "$setup_arguments" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Python" -value "$python3" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "PerfLabArguments" -value "$perflab_arguments" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "ExtraBenchmarkDotNetArguments" -value "$extra_benchmark_dotnet_arguments" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "BDNCategories" -value "$run_categories" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "TargetCsproj" -value "$csproj" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "RunFromPerfRepo" -value "$run_from_perf_repo" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Creator" -value "$creator" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "HelixSourcePrefix" -value "$helix_source_prefix" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Kind" -value "$kind" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "_BuildConfig" -value "$architecture.$kind.$framework" -is_multi_job_variable false
|
||||
Write-PipelineSetVariable -name "Compare" -value "$compare" -is_multi_job_variable false
|
||||
echo "##vso[task.setvariable variable=UseCoreRun]$use_core_run"
|
||||
echo "##vso[task.setvariable variable=Architecture]$architecture"
|
||||
echo "##vso[task.setvariable variable=PayloadDirectory]$payload_directory"
|
||||
echo "##vso[task.setvariable variable=PerformanceDirectory]$performance_directory"
|
||||
echo "##vso[task.setvariable variable=WorkItemDirectory]$workitem_directory"
|
||||
echo "##vso[task.setvariable variable=Queue]$queue"
|
||||
echo "##vso[task.setvariable variable=SetupArguments]$setup_arguments"
|
||||
echo "##vso[task.setvariable variable=Python]python3"
|
||||
echo "##vso[task.setvariable variable=PerfLabArguments]$perflab_arguments"
|
||||
echo "##vso[task.setvariable variable=ExtraBenchmarkDotNetArguments]$extra_benchmark_dotnet_arguments"
|
||||
echo "##vso[task.setvariable variable=BDNCategories]$run_categories"
|
||||
echo "##vso[task.setvariable variable=TargetCsproj]$csproj"
|
||||
echo "##vso[task.setvariable variable=RunFromPerfRepo]$run_from_perf_repo"
|
||||
echo "##vso[task.setvariable variable=Creator]$creator"
|
||||
echo "##vso[task.setvariable variable=HelixSourcePrefix]$helix_source_prefix"
|
||||
echo "##vso[task.setvariable variable=Kind]$kind"
|
||||
echo "##vso[task.setvariable variable=_BuildConfig]$architecture.$kind.$framework"
|
||||
@@ -19,17 +19,7 @@ try {
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
|
||||
# For now, only use a dry run.
|
||||
# Ideally we would change darc to enable a quick request that
|
||||
# would check whether the file exists that you can download it,
|
||||
# and that it won't conflict with other files.
|
||||
# https://github.com/dotnet/arcade/issues/3674
|
||||
# Right now we can't remove continue-on-error because we ocassionally will have
|
||||
# dependencies that have no associated builds (e.g. an old dependency).
|
||||
# We need to add an option to baseline specific dependencies away, or add them manually
|
||||
# to the BAR.
|
||||
darc gather-drop --non-shipping `
|
||||
--dry-run `
|
||||
--continue-on-error `
|
||||
--id $BarBuildId `
|
||||
--output-dir $DropLocation `
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
param(
|
||||
[Parameter(Mandatory=$true)][string] $InputPath, # Full path to directory where Symbols.NuGet packages to be checked are stored
|
||||
[Parameter(Mandatory=$true)][string] $ExtractPath, # Full path to directory where the packages will be extracted during validation
|
||||
[Parameter(Mandatory=$false)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
|
||||
[Parameter(Mandatory=$false)][string] $GHCommit, # GitHub commit SHA used to build the packages
|
||||
[Parameter(Mandatory=$true)][string] $GHRepoName, # GitHub name of the repo including the Org. E.g., dotnet/arcade
|
||||
[Parameter(Mandatory=$true)][string] $GHCommit, # GitHub commit SHA used to build the packages
|
||||
[Parameter(Mandatory=$true)][string] $SourcelinkCliVersion # Version of SourceLink CLI to use
|
||||
)
|
||||
|
||||
@@ -13,12 +13,6 @@ param(
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
# Maximum number of jobs to run in parallel
|
||||
$MaxParallelJobs = 6
|
||||
|
||||
# Wait time between check for system load
|
||||
$SecondsBetweenLoadChecks = 10
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
@@ -28,8 +22,8 @@ $ValidatePackage = {
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-Host "Input file does not exist: $PackagePath"
|
||||
return 1
|
||||
Write-PipelineTaskError "Input file does not exist: $PackagePath"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
@@ -44,7 +38,7 @@ $ValidatePackage = {
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath) | Out-Null
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
try {
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
@@ -144,18 +138,16 @@ $ValidatePackage = {
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
return 0
|
||||
}
|
||||
else {
|
||||
Write-Host "$PackagePath has broken SourceLink links."
|
||||
return 1
|
||||
Write-PipelineTaskError "$PackagePath has broken SourceLink links."
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
|
||||
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
|
||||
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
@@ -163,33 +155,30 @@ function ValidateSourceLinkLinks {
|
||||
}
|
||||
}
|
||||
|
||||
if ($GHCommit -ne "" -and !($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
|
||||
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-PipelineTaskError "GHCommit should be a 40 chars hexadecimal string"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if ($GHRepoName -ne "" -and $GHCommit -ne "") {
|
||||
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
|
||||
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
|
||||
$RepoTreeURL = -Join("http://api.github.com/repos/", $GHRepoName, "/git/trees/", $GHCommit, "?recursive=1")
|
||||
$CodeExtensions = @(".cs", ".vb", ".fs", ".fsi", ".fsx", ".fsscript")
|
||||
|
||||
try {
|
||||
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
|
||||
$Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree
|
||||
try {
|
||||
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
|
||||
$Data = Invoke-WebRequest $RepoTreeURL -UseBasicParsing | ConvertFrom-Json | Select-Object -ExpandProperty tree
|
||||
|
||||
foreach ($file in $Data) {
|
||||
$Extension = [System.IO.Path]::GetExtension($file.path)
|
||||
foreach ($file in $Data) {
|
||||
$Extension = [System.IO.Path]::GetExtension($file.path)
|
||||
|
||||
if ($CodeExtensions.Contains($Extension)) {
|
||||
$RepoFiles[$file.path] = 1
|
||||
}
|
||||
if ($CodeExtensions.Contains($Extension)) {
|
||||
$RepoFiles[$file.path] = 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL . Execution will proceed without caching."
|
||||
}
|
||||
}
|
||||
elseif ($GHRepoName -ne "" -or $GHCommit -ne "") {
|
||||
Write-Host "For using the http caching mechanism both GHRepoName and GHCommit should be informed."
|
||||
catch {
|
||||
Write-PipelineTaskError "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
Write-Host $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if (Test-Path $ExtractPath) {
|
||||
@@ -197,33 +186,14 @@ function ValidateSourceLinkLinks {
|
||||
}
|
||||
|
||||
# Process each NuGet package in parallel
|
||||
$Jobs = @()
|
||||
Get-ChildItem "$InputPath\*.symbols.nupkg" |
|
||||
ForEach-Object {
|
||||
Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName | Out-Null
|
||||
$NumJobs = @(Get-Job -State 'Running').Count
|
||||
|
||||
while ($NumJobs -ge $MaxParallelJobs) {
|
||||
Write-Host "There are $NumJobs validation jobs running right now. Waiting $SecondsBetweenLoadChecks seconds to check again."
|
||||
sleep $SecondsBetweenLoadChecks
|
||||
$NumJobs = @(Get-Job -State 'Running').Count
|
||||
}
|
||||
|
||||
foreach ($Job in @(Get-Job -State 'Completed')) {
|
||||
Receive-Job -Id $Job.Id
|
||||
Remove-Job -Id $Job.Id
|
||||
}
|
||||
$Jobs += Start-Job -ScriptBlock $ValidatePackage -ArgumentList $_.FullName
|
||||
}
|
||||
|
||||
$ValidationFailures = 0
|
||||
foreach ($Job in @(Get-Job)) {
|
||||
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
|
||||
if ($jobResult -ne "0") {
|
||||
$ValidationFailures++
|
||||
}
|
||||
}
|
||||
if ($ValidationFailures -gt 0) {
|
||||
Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
|
||||
ExitWithExitCode 1
|
||||
foreach ($Job in $Jobs) {
|
||||
Wait-Job -Id $Job.Id | Receive-Job
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
|
||||
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
|
||||
$dotnetsymbolExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$dotnetsymbolExe = Resolve-Path "$dotnetsymbolExe\dotnet-symbol.exe"
|
||||
|
||||
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
& $dotnetsymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
@@ -159,25 +159,25 @@ function CheckSymbolsAvailable {
|
||||
}
|
||||
}
|
||||
|
||||
function InstallDotnetSymbol {
|
||||
$dotnetSymbolPackageName = "dotnet-symbol"
|
||||
function Installdotnetsymbol {
|
||||
$dotnetsymbolPackageName = "dotnet-symbol"
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
$toolList = & "$dotnet" tool list --global
|
||||
|
||||
if (($toolList -like "*$dotnetSymbolPackageName*") -and ($toolList -like "*$dotnetSymbolVersion*")) {
|
||||
Write-Host "dotnet-symbol version $dotnetSymbolVersion is already installed."
|
||||
if (($toolList -like "*$dotnetsymbolPackageName*") -and ($toolList -like "*$dotnetsymbolVersion*")) {
|
||||
Write-Host "dotnet-symbol version $dotnetsymbolVersion is already installed."
|
||||
}
|
||||
else {
|
||||
Write-Host "Installing dotnet-symbol version $dotnetSymbolVersion..."
|
||||
Write-Host "Installing dotnet-symbol version $dotnetsymbolVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
& "$dotnet" tool install $dotnetSymbolPackageName --version $dotnetSymbolVersion --verbosity "minimal" --global
|
||||
& "$dotnet" tool install $dotnetsymbolPackageName --version $dotnetsymbolVersion --verbosity "minimal" --global
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
InstallDotnetSymbol
|
||||
Installdotnetsymbol
|
||||
|
||||
CheckSymbolsAvailable
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ if ($GuardianPackageName) {
|
||||
$guardianCliLocation = $GuardianCliLocation
|
||||
}
|
||||
|
||||
$workingDirectory = (Split-Path $SourceDirectory -Parent)
|
||||
$ValidPath = Test-Path $guardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
@@ -54,13 +53,13 @@ if ($ValidPath -eq $False)
|
||||
exit 1
|
||||
}
|
||||
|
||||
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $workingDirectory ".gdn"
|
||||
& $(Join-Path $PSScriptRoot "init-sdl.ps1") -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $ArtifactsDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $ArtifactsDirectory ".gdn"
|
||||
|
||||
if ($TsaOnboard) {
|
||||
if ($TsaCodebaseName -and $TsaNotificationEmail -and $TsaCodebaseAdmin -and $TsaBugAreaPath) {
|
||||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
Write-Host "$guardianCliLocation tsa-onboard --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $ArtifactsDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-onboard --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $ArtifactsDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
@@ -72,10 +71,10 @@ if ($TsaOnboard) {
|
||||
}
|
||||
|
||||
if ($ArtifactToolsList -and $ArtifactToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $ArtifactsDirectory -GdnFolder $gdnFolder -ToolsList $ArtifactToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
if ($SourceToolsList -and $SourceToolsList.Count -gt 0) {
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $workingDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
& $(Join-Path $PSScriptRoot "run-sdl.ps1") -GuardianCliLocation $guardianCliLocation -WorkingDirectory $ArtifactsDirectory -TargetDirectory $SourceDirectory -GdnFolder $gdnFolder -ToolsList $SourceToolsList -AzureDevOpsAccessToken $AzureDevOpsAccessToken -UpdateBaseline $UpdateBaseline -GuardianLoggerLevel $GuardianLoggerLevel -CrScanAdditionalRunConfigParams $CrScanAdditionalRunConfigParams -PoliCheckAdditionalRunConfigParams $PoliCheckAdditionalRunConfigParams
|
||||
}
|
||||
|
||||
if ($UpdateBaseline) {
|
||||
@@ -87,8 +86,8 @@ if ($TsaPublish) {
|
||||
if (-not $TsaRepositoryName) {
|
||||
$TsaRepositoryName = "$($Repository)-$($BranchName)"
|
||||
}
|
||||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --onboard $True --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $workingDirectory --logger-level $GuardianLoggerLevel
|
||||
Write-Host "$guardianCliLocation tsa-publish --all-tools --repository-name `"$TsaRepositoryName`" --branch-name `"$TsaBranchName`" --build-number `"$BuildNumber`" --codebase-name `"$TsaCodebaseName`" --notification-alias `"$TsaNotificationEmail`" --codebase-admin `"$TsaCodebaseAdmin`" --instance-url `"$TsaInstanceUrl`" --project-name `"$TsaProjectName`" --area-path `"$TsaBugAreaPath`" --iteration-path `"$TsaIterationPath`" --working-directory $SourceDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $guardianCliLocation tsa-publish --all-tools --repository-name "$TsaRepositoryName" --branch-name "$TsaBranchName" --build-number "$BuildNumber" --codebase-name "$TsaCodebaseName" --notification-alias "$TsaNotificationEmail" --codebase-admin "$TsaCodebaseAdmin" --instance-url "$TsaInstanceUrl" --project-name "$TsaProjectName" --area-path "$TsaBugAreaPath" --iteration-path "$TsaIterationPath" --working-directory $ArtifactsDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
|
||||
@@ -5,13 +5,6 @@ param(
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
# `tools.ps1` checks $ci to perform some actions. Since the post-build
|
||||
# scripts don't necessarily execute in the same agent that run the
|
||||
# build.ps1/sh script this variable isn't automatically set.
|
||||
$ci = $true
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
$ExtractPackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a NuGet package
|
||||
|
||||
@@ -11,9 +11,6 @@ $ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
# Construct basic auth from AzDO access token; construct URI to the repository's gdn folder stored in that repository; construct location of zip file
|
||||
$encodedPat = [Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$AzureDevOpsAccessToken"))
|
||||
$escapedRepository = [Uri]::EscapeDataString("/$Repository/$BranchName/.gdn")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Guardian.Cli" version="0.7.2"/>
|
||||
<package id="Microsoft.Guardian.Cli" version="0.6.0"/>
|
||||
</packages>
|
||||
+21
-13
@@ -25,35 +25,43 @@ if ($ValidPath -eq $False)
|
||||
exit 1
|
||||
}
|
||||
|
||||
$configParam = @("--config")
|
||||
|
||||
foreach ($tool in $ToolsList) {
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
|
||||
$config = $False
|
||||
Write-Host $tool
|
||||
# We have to manually configure tools that run on source to look at the source directory only
|
||||
if ($tool -eq "credscan") {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory < $TargetDirectory `" `" OutputType < pre `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory < $TargetDirectory " "OutputType < pre" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" TargetDirectory : $TargetDirectory `" $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " TargetDirectory : $TargetDirectory " $(If ($CrScanAdditionalRunConfigParams) {$CrScanAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
$config = $True
|
||||
}
|
||||
if ($tool -eq "policheck") {
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target < $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target < $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
|
||||
Write-Host "$GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args `" Target : $TargetDirectory `" $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})"
|
||||
& $GuardianCliLocation configure --working-directory $WorkingDirectory --tool $tool --output-path $gdnConfigFile --logger-level $GuardianLoggerLevel --noninteractive --force --args " Target : $TargetDirectory " $(If ($PoliCheckAdditionalRunConfigParams) {$PoliCheckAdditionalRunConfigParams})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
$config = $True
|
||||
}
|
||||
|
||||
$configParam+=$gdnConfigFile
|
||||
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel --config $gdnConfigFile $config"
|
||||
if ($config) {
|
||||
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel --config $gdnConfigFile
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian run for $tool using $gdnConfigFile failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian run for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "$GuardianCliLocation run --working-directory $WorkingDirectory --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam"
|
||||
& $GuardianCliLocation run --working-directory $WorkingDirectory --tool $tool --baseline mainbaseline --update-baseline $UpdateBaseline --logger-level $GuardianLoggerLevel $configParam
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
@@ -1,10 +1,7 @@
|
||||
parameters:
|
||||
overrideParameters: '' # Optional: to override values for parameters.
|
||||
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
|
||||
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
|
||||
# 'continueOnError', the parameter value is not correctly picked up.
|
||||
# This can also be remedied by the caller (post-build.yml) if it does not use a nested parameter
|
||||
sdlContinueOnError: false # optional: determines whether to continue the build if the step errors;
|
||||
continueOnError: false # optional: determines whether to continue the build if the step errors;
|
||||
dependsOn: '' # Optional: dependencies of the job
|
||||
|
||||
jobs:
|
||||
@@ -13,8 +10,6 @@ jobs:
|
||||
displayName: Run SDL tool
|
||||
variables:
|
||||
- group: DotNet-VSTS-Bot
|
||||
pool:
|
||||
name: Hosted VS2017
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
@@ -29,12 +24,12 @@ jobs:
|
||||
-InputPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
||||
-ExtractPath $(Build.SourcesDirectory)\artifacts\BlobArtifacts
|
||||
displayName: Extract Blob Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
- powershell: eng/common/sdl/extract-artifact-packages.ps1
|
||||
-InputPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
|
||||
-ExtractPath $(Build.SourcesDirectory)\artifacts\PackageArtifacts
|
||||
displayName: Extract Package Artifacts
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
- task: NuGetCommand@2
|
||||
@@ -48,12 +43,12 @@ jobs:
|
||||
- ${{ if ne(parameters.overrideParameters, '') }}:
|
||||
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1 ${{ parameters.overrideParameters }}
|
||||
displayName: Execute SDL
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
- ${{ if eq(parameters.overrideParameters, '') }}:
|
||||
- powershell: eng/common/sdl/execute-all-sdl-tools.ps1
|
||||
-GuardianPackageName Microsoft.Guardian.Cli.0.7.2
|
||||
-GuardianPackageName Microsoft.Guardian.Cli.0.6.0
|
||||
-NugetPackageDirectory $(Build.SourcesDirectory)\.packages
|
||||
-AzureDevOpsAccessToken $(dn-bot-dotnet-build-rw-code-rw)
|
||||
${{ parameters.additionalParameters }}
|
||||
displayName: Execute SDL
|
||||
continueOnError: ${{ parameters.sdlContinueOnError }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
@@ -1,33 +1,64 @@
|
||||
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
|
||||
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
|
||||
|
||||
parameters:
|
||||
# Job schema parameters - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
|
||||
cancelTimeoutInMinutes: ''
|
||||
|
||||
condition: ''
|
||||
container: ''
|
||||
|
||||
continueOnError: false
|
||||
|
||||
container: ''
|
||||
|
||||
dependsOn: ''
|
||||
|
||||
displayName: ''
|
||||
pool: ''
|
||||
|
||||
steps: []
|
||||
|
||||
pool: ''
|
||||
|
||||
strategy: ''
|
||||
|
||||
timeoutInMinutes: ''
|
||||
|
||||
variables: []
|
||||
|
||||
workspace: ''
|
||||
|
||||
# Job base template specific parameters
|
||||
# See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
|
||||
artifacts: ''
|
||||
# Optional: Enable installing Microbuild plugin
|
||||
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
|
||||
# _TeamName - the name of your team
|
||||
# _SignType - 'test' or 'real'
|
||||
enableMicrobuild: false
|
||||
|
||||
# Optional: Include PublishBuildArtifacts task
|
||||
enablePublishBuildArtifacts: false
|
||||
|
||||
# Optional: Enable publishing to the build asset registry
|
||||
enablePublishBuildAssets: false
|
||||
|
||||
# Optional: Include PublishTestResults task
|
||||
enablePublishTestResults: false
|
||||
enablePublishUsingPipelines: false
|
||||
|
||||
# Optional: enable sending telemetry
|
||||
enableTelemetry: false
|
||||
|
||||
# Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
|
||||
helixRepo: ''
|
||||
|
||||
# Optional: define the helix type for telemetry (example: 'build/product/')
|
||||
helixType: ''
|
||||
|
||||
# Required: name of the job
|
||||
name: ''
|
||||
preSteps: []
|
||||
|
||||
# Optional: should run as a public build even in the internal project
|
||||
# if 'true', the build won't run any of the internal only steps, even if it is running in non-public projects.
|
||||
runAsPublic: false
|
||||
|
||||
# Internal resources (telemetry, microbuild) can only be accessed from non-public projects,
|
||||
# and some (Microbuild) should only be applied to non-PR cases for internal builds.
|
||||
|
||||
jobs:
|
||||
- job: ${{ parameters.name }}
|
||||
|
||||
@@ -59,7 +90,7 @@ jobs:
|
||||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
||||
|
||||
variables:
|
||||
- ${{ if ne(parameters.enableTelemetry, 'false') }}:
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
- name: DOTNET_CLI_TELEMETRY_PROFILE
|
||||
value: '$(Build.Repository.Uri)'
|
||||
- ${{ each variable in parameters.variables }}:
|
||||
@@ -91,12 +122,21 @@ jobs:
|
||||
workspace: ${{ parameters.workspace }}
|
||||
|
||||
steps:
|
||||
- ${{ if ne(parameters.preSteps, '') }}:
|
||||
- ${{ each preStep in parameters.preSteps }}:
|
||||
- ${{ preStep }}
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
# Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
|
||||
- task: sendStartTelemetry@0
|
||||
displayName: 'Send Helix Start Telemetry'
|
||||
inputs:
|
||||
helixRepo: ${{ parameters.helixRepo }}
|
||||
${{ if ne(parameters.helixType, '') }}:
|
||||
helixType: ${{ parameters.helixType }}
|
||||
buildConfig: $(_BuildConfig)
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: always()
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
- ${{ if eq(parameters.enableMicrobuild, 'true') }}:
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: MicroBuildSigningPlugin@2
|
||||
displayName: Install MicroBuild plugin
|
||||
inputs:
|
||||
@@ -108,16 +148,6 @@ jobs:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), in(variables['_SignType'], 'real', 'test'), eq(variables['Agent.Os'], 'Windows_NT'))
|
||||
|
||||
- task: NuGetAuthenticate@0
|
||||
|
||||
- ${{ if or(eq(parameters.artifacts.download, 'true'), ne(parameters.artifacts.download, '')) }}:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: ${{ coalesce(parameters.artifacts.download.name, 'Artifacts_$(Agent.OS)_$(_BuildConfig)') }}
|
||||
targetPath: ${{ coalesce(parameters.artifacts.download.path, 'artifacts') }}
|
||||
itemPattern: ${{ coalesce(parameters.artifacts.download.pattern, '**') }}
|
||||
|
||||
- ${{ each step in parameters.steps }}:
|
||||
- ${{ step }}
|
||||
|
||||
@@ -130,60 +160,20 @@ jobs:
|
||||
env:
|
||||
TeamName: $(_TeamName)
|
||||
|
||||
- ${{ if ne(parameters.artifacts.publish, '') }}:
|
||||
- ${{ if or(eq(parameters.artifacts.publish.artifacts, 'true'), ne(parameters.artifacts.publish.artifacts, '')) }}:
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather binaries for publish to artifacts
|
||||
inputs:
|
||||
SourceFolder: 'artifacts/bin'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/bin'
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather packages for publish to artifacts
|
||||
inputs:
|
||||
SourceFolder: 'artifacts/packages'
|
||||
Contents: '**'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/artifacts/packages'
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish pipeline artifacts
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/artifacts'
|
||||
PublishLocation: Container
|
||||
ArtifactName: ${{ coalesce(parameters.artifacts.publish.artifacts.name , 'Artifacts_$(Agent.Os)_$(_BuildConfig)') }}
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
- ${{ if or(eq(parameters.artifacts.publish.logs, 'true'), ne(parameters.artifacts.publish.logs, '')) }}:
|
||||
- publish: artifacts/log
|
||||
artifact: ${{ coalesce(parameters.artifacts.publish.logs.name, 'Logs_Build_$(Agent.Os)_$(_BuildConfig)') }}
|
||||
displayName: Publish logs
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
- ${{ if or(eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
|
||||
- ${{ if and(ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather Asset Manifests
|
||||
inputs:
|
||||
SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)/AssetManifests'
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
||||
- ${{ if eq(parameters.enableTelemetry, 'true') }}:
|
||||
# Telemetry tasks are built from https://github.com/dotnet/arcade-extensions
|
||||
- task: sendEndTelemetry@0
|
||||
displayName: 'Send Helix End Telemetry'
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: always()
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Push Asset Manifests
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)/AssetManifests'
|
||||
PublishLocation: Container
|
||||
ArtifactName: AssetManifests
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
||||
|
||||
- ${{ if ne(parameters.enablePublishBuildArtifacts, 'false') }}:
|
||||
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Logs
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)'
|
||||
PublishLocation: Container
|
||||
ArtifactName: ${{ coalesce(parameters.enablePublishBuildArtifacts.artifactName, '$(Agent.Os)_$(Agent.JobName)' ) }}
|
||||
ArtifactName: $(Agent.Os)_$(Agent.JobName)
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
|
||||
@@ -197,7 +187,7 @@ jobs:
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
|
||||
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(parameters.enablePublishUsingPipelines, 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), ne(variables['_PublishUsingPipelines'], 'true'), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: CopyFiles@2
|
||||
displayName: Gather Asset Manifests
|
||||
inputs:
|
||||
@@ -205,7 +195,6 @@ jobs:
|
||||
TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Push Asset Manifests
|
||||
inputs:
|
||||
|
||||
@@ -5,7 +5,6 @@ parameters:
|
||||
displayName: '' # optional -- display name for the job. Will use jobName if not passed
|
||||
pool: '' # required -- name of the Build pool
|
||||
container: '' # required -- name of the container
|
||||
osGroup: '' # required -- operating system for the job
|
||||
extraSetupParameters: '' # optional -- extra arguments to pass to the setup script
|
||||
frameworks: ['netcoreapp3.0'] # optional -- list of frameworks to run against
|
||||
continueOnError: 'false' # optional -- determines whether to continue the build if the step errors
|
||||
@@ -45,13 +44,12 @@ jobs:
|
||||
- HelixPreCommand: ''
|
||||
|
||||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if eq( parameters.osGroup, 'Windows_NT') }}:
|
||||
- ${{ if eq(variables['Agent.Os'], 'Windows_NT') }}:
|
||||
- HelixPreCommand: 'set "PERFLAB_UPLOAD_TOKEN=$(PerfCommandUploadToken)"'
|
||||
- IsInternal: -Internal
|
||||
- ${{ if ne(parameters.osGroup, 'Windows_NT') }}:
|
||||
- ${{ if ne(variables['Agent.Os'], 'Windows_NT') }}:
|
||||
- HelixPreCommand: 'export PERFLAB_UPLOAD_TOKEN="$(PerfCommandUploadTokenLinux)"'
|
||||
- IsInternal: --internal
|
||||
|
||||
- group: DotNet-HelixApi-Access
|
||||
- group: dotnet-benchview
|
||||
|
||||
|
||||
@@ -47,10 +47,6 @@ jobs:
|
||||
downloadPath: '$(Build.StagingDirectory)/Download'
|
||||
condition: ${{ parameters.condition }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- task: NuGetAuthenticate@0
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Build Assets
|
||||
inputs:
|
||||
@@ -63,7 +59,6 @@ jobs:
|
||||
/p:Configuration=$(_BuildConfig)
|
||||
condition: ${{ parameters.condition }}
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
|
||||
- task: powershell@2
|
||||
displayName: Create ReleaseConfigs Artifact
|
||||
inputs:
|
||||
@@ -72,14 +67,12 @@ jobs:
|
||||
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(BARBuildId)
|
||||
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value "$(DefaultChannels)"
|
||||
Add-Content -Path "$(Build.StagingDirectory)/ReleaseConfigs.txt" -Value $(IsStableBuild)
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish ReleaseConfigs Artifact
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.StagingDirectory)/ReleaseConfigs.txt'
|
||||
PublishLocation: Container
|
||||
ArtifactName: ReleaseConfigs
|
||||
|
||||
- ${{ if eq(parameters.enablePublishBuildArtifacts, 'true') }}:
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish Logs to VSTS
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
parameters:
|
||||
# See schema documentation in /Documentation/AzureDevOps/TemplateSchema.md
|
||||
# Optional: 'true' if failures in job.yml job should not fail the job
|
||||
continueOnError: false
|
||||
|
||||
# Optional: Enable installing Microbuild plugin
|
||||
# if 'true', these "variables" must be specified in the variables object or as part of the queue matrix
|
||||
# _TeamName - the name of your team
|
||||
# _SignType - 'test' or 'real'
|
||||
enableMicrobuild: false
|
||||
|
||||
# Optional: Include PublishBuildArtifacts task
|
||||
enablePublishBuildArtifacts: false
|
||||
|
||||
# Optional: Enable publishing to the build asset registry
|
||||
enablePublishBuildAssets: false
|
||||
|
||||
# Optional: Enable publishing using release pipelines
|
||||
enablePublishUsingPipelines: false
|
||||
|
||||
@@ -14,9 +23,19 @@ parameters:
|
||||
# Optional: Include toolset dependencies in the generated graph files
|
||||
includeToolset: false
|
||||
|
||||
# Optional: Include PublishTestResults task
|
||||
enablePublishTestResults: false
|
||||
|
||||
# Optional: enable sending telemetry
|
||||
# if enabled then the 'helixRepo' parameter should also be specified
|
||||
enableTelemetry: false
|
||||
|
||||
# Required: A collection of jobs to run - https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=vsts&tabs=schema#job
|
||||
jobs: []
|
||||
|
||||
# Optional: define the helix repo for telemetry (example: 'dotnet/arcade')
|
||||
helixRepo: ''
|
||||
|
||||
# Optional: Override automatically derived dependsOn value for "publish build assets" job
|
||||
publishBuildAssetsDependsOn: ''
|
||||
|
||||
@@ -43,30 +62,29 @@ jobs:
|
||||
|
||||
name: ${{ job.job }}
|
||||
|
||||
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- ${{ if or(eq(parameters.enablePublishBuildAssets, true), eq(parameters.artifacts.publish.manifests, 'true'), ne(parameters.artifacts.publish.manifests, '')) }}:
|
||||
- template: ../job/publish-build-assets.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
dependsOn:
|
||||
- ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.publishBuildAssetsDependsOn }}:
|
||||
- ${{ job.job }}
|
||||
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.jobs }}:
|
||||
- ${{ job.job }}
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
|
||||
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
|
||||
|
||||
- ${{ if eq(parameters.graphFileGeneration.enabled, true) }}:
|
||||
- template: ../job/generate-graph-files.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
|
||||
dependsOn:
|
||||
- Asset_Registry_Publish
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
- ${{ if and(eq(parameters.enablePublishBuildAssets, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- template: ../job/publish-build-assets.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
dependsOn:
|
||||
- ${{ if ne(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.publishBuildAssetsDependsOn }}:
|
||||
- ${{ job.job }}
|
||||
- ${{ if eq(parameters.publishBuildAssetsDependsOn, '') }}:
|
||||
- ${{ each job in parameters.jobs }}:
|
||||
- ${{ job.job }}
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
runAsPublic: ${{ parameters.runAsPublic }}
|
||||
publishUsingPipelines: ${{ parameters.enablePublishUsingPipelines }}
|
||||
enablePublishBuildArtifacts: ${{ parameters.enablePublishBuildArtifacts }}
|
||||
|
||||
- ${{ if and(eq(parameters.graphFileGeneration.enabled, true), eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
|
||||
- template: ../job/generate-graph-files.yml
|
||||
parameters:
|
||||
continueOnError: ${{ parameters.continueOnError }}
|
||||
includeToolset: ${{ parameters.graphFileGeneration.includeToolset }}
|
||||
dependsOn:
|
||||
- Asset_Registry_Publish
|
||||
pool:
|
||||
vmImage: vs2017-win2016
|
||||
@@ -0,0 +1,147 @@
|
||||
parameters:
|
||||
enableSymbolValidation: true
|
||||
|
||||
stages:
|
||||
- stage: IS_Publish
|
||||
dependsOn: validate
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: Internal Servicing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id)
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Artifacts
|
||||
inputs:
|
||||
downloadType: specific files
|
||||
matchingPattern: "*Artifacts*"
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:Configuration=Release
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Add Assets Location
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ChannelId=$(InternalServicing_30_Channel_Id)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
|
||||
/p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
|
||||
/p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)
|
||||
/p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
|
||||
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
||||
/p:Configuration=Release
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: Publish Packages to AzDO Feed
|
||||
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
|
||||
inputs:
|
||||
command: push
|
||||
vstsFeed: $(AzDoFeedName)
|
||||
packagesToPush: $(Build.ArtifactStagingDirectory)\PackageArtifacts\*.nupkg
|
||||
publishVstsFeed: $(AzDoFeedName)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Blobs to AzDO Feed
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-blobs-to-azdo.ps1
|
||||
arguments: -FeedName $(AzDoFeedName)
|
||||
-SourceFolderCollection $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
enabled: false
|
||||
|
||||
- template: ../trigger-subscription.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
|
||||
|
||||
- stage: IS_PublishValidation
|
||||
displayName: Publish Validation
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- ${{ if eq(parameters.enableSymbolValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Symbol Availability
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.InternalServicing_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Check Symbol Availability
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
||||
|
||||
- template: ../promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
|
||||
@@ -1,132 +0,0 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
|
||||
stages:
|
||||
- stage: NetCore_Dev31_Publish
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Core 3.1 Dev Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicDevRelease_31_Channel_Id))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicDevRelease_31_Channel_Id }}
|
||||
@@ -1,132 +0,0 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
|
||||
stages:
|
||||
- stage: NetCore_Dev5_Publish
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Core 5 Dev Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_5_Dev_Channel_Id))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-transport/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.NetCore_5_Dev_Channel_Id }}
|
||||
@@ -1,142 +0,0 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
|
||||
stages:
|
||||
- stage: NetCore_30_Internal_Servicing_Publishing
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Core 3.0 Internal Servicing Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.InternalServicing_30_Channel_Id))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=true
|
||||
/p:ChecksumsTargetStaticFeed=$(InternalChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(InternalChecksumsBlobFeedKey)
|
||||
/p:InstallersTargetStaticFeed=$(InternalInstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(InternalInstallersBlobFeedKey)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.InternalServicing_30_Channel_Id }}
|
||||
@@ -1,132 +0,0 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
|
||||
stages:
|
||||
- stage: NetCore_Release30_Publish
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Core 3.0 Release Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_30_Channel_Id))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
|
||||
@@ -1,132 +0,0 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
|
||||
stages:
|
||||
- stage: NetCore_Release31_Publish
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Core 3.1 Release Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicRelease_31_Channel_Id))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicRelease_31_Channel_Id }}
|
||||
@@ -1,132 +0,0 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
|
||||
stages:
|
||||
- stage: NetCore_Tools_Latest_Publish
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Tools - Latest Publishing
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:SymbolPublishingExclusionsFile='$(Build.SourcesDirectory)/eng/SymbolPublishingExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.NetCore_Tools_Latest_Channel_Id))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.NetCore_Tools_Latest_Channel_Id }}
|
||||
@@ -0,0 +1,148 @@
|
||||
parameters:
|
||||
enableSymbolValidation: true
|
||||
|
||||
stages:
|
||||
- stage: Publish
|
||||
dependsOn: validate
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: Developer Channel
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicDevRelease_30_Channel_Id)
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Artifacts
|
||||
inputs:
|
||||
downloadType: specific files
|
||||
matchingPattern: "*Artifacts*"
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:Configuration=Release
|
||||
|
||||
- job:
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicDevRelease_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Add Assets Location
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ChannelId=$(PublicDevRelease_30_Channel_Id)
|
||||
/p:ArtifactsCategory=$(_DotNetArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
||||
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: Publish Packages to AzDO Feed
|
||||
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
|
||||
inputs:
|
||||
command: push
|
||||
vstsFeed: $(AzDoFeedName)
|
||||
packagesToPush: $(Build.ArtifactStagingDirectory)\PackageArtifacts\*.nupkg
|
||||
publishVstsFeed: $(AzDoFeedName)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Blobs to AzDO Feed
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-blobs-to-azdo.ps1
|
||||
arguments: -FeedName $(AzDoFeedName)
|
||||
-SourceFolderCollection $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
enabled: false
|
||||
|
||||
|
||||
- stage: PublishValidation
|
||||
displayName: Publish Validation
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- ${{ if eq(parameters.enableSymbolValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Symbol Availability
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicDevRelease_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Check Symbol Availability
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
||||
|
||||
- template: ../darc-gather-drop.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicDevRelease_30_Channel_Id }}
|
||||
|
||||
- template: ../promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicDevRelease_30_Channel_Id }}
|
||||
@@ -0,0 +1,147 @@
|
||||
parameters:
|
||||
enableSymbolValidation: true
|
||||
|
||||
stages:
|
||||
- stage: PubRel_Publish
|
||||
dependsOn: validate
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: Public Release
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job:
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicRelease_30_Channel_Id)
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Artifacts
|
||||
inputs:
|
||||
downloadType: specific files
|
||||
matchingPattern: "*Artifacts*"
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishToSymbolServers -restore -msbuildEngine dotnet
|
||||
/p:DotNetSymbolServerTokenMsdl=$(microsoft-symbol-server-pat)
|
||||
/p:DotNetSymbolServerTokenSymWeb=$(symweb-symbol-server-pat)
|
||||
/p:PDBArtifactsDirectory='$(Build.ArtifactStagingDirectory)/PDBArtifacts/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:Configuration=Release
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
- group: DotNet-Blob-Feed
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicRelease_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ChannelId=$(PublicRelease_30_Channel_Id)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:AzureStorageAccountName=$(ProxyBackedFeedsAccountName)
|
||||
/p:AzureStorageAccountKey=$(dotnetfeed-storage-access-key-1)
|
||||
/p:AzureDevOpsFeedsBaseUrl=$(dotnetfeed-internal-private-feed-url)
|
||||
/p:StaticInternalFeed=$(dotnetfeed-internal-nonstable-feed-url)
|
||||
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
||||
/p:Configuration=Release
|
||||
|
||||
- task: NuGetCommand@2
|
||||
displayName: Publish Packages to AzDO Feed
|
||||
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
|
||||
inputs:
|
||||
command: push
|
||||
vstsFeed: $(AzDoFeedName)
|
||||
packagesToPush: $(Build.ArtifactStagingDirectory)\PackageArtifacts\*.nupkg
|
||||
publishVstsFeed: $(AzDoFeedName)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Blobs to AzDO Feed
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-blobs-to-azdo.ps1
|
||||
arguments: -FeedName $(AzDoFeedName)
|
||||
-SourceFolderCollection $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
enabled: false
|
||||
|
||||
- template: ../trigger-subscription.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
|
||||
|
||||
- stage: PubRel_PublishValidation
|
||||
displayName: Publish Validation
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- ${{ if eq(parameters.enableSymbolValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Symbol Availability
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicRelease_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Check Symbol Availability
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/symbols-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/ -ExtractPath $(Agent.BuildDirectory)/Temp/ -DotnetSymbolVersion $(SymbolToolVersion)
|
||||
|
||||
- template: ../promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicRelease_30_Channel_Id }}
|
||||
@@ -1,19 +1,13 @@
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
dependsOn:
|
||||
- Validate
|
||||
publishInstallersAndChecksums: false
|
||||
|
||||
stages:
|
||||
- stage: PVR_Publish
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
dependsOn: validate
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
displayName: .NET Tools - Validation Publishing
|
||||
displayName: Validation Channel
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- job: publish_assets
|
||||
- job:
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
variables:
|
||||
@@ -23,7 +17,7 @@ stages:
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', variables.PublicValidationRelease_30_Channel_Id))
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], variables.PublicValidationRelease_30_Channel_Id)
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -45,53 +39,61 @@ stages:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
- task: NuGetAuthenticate@0
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Assets
|
||||
displayName: Add Assets Location
|
||||
env:
|
||||
AZURE_DEVOPS_EXT_PAT: $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
arguments: -task PublishArtifactsInManifest -restore -msbuildEngine dotnet
|
||||
/p:ChannelId=$(PublicValidationRelease_30_Channel_Id)
|
||||
/p:ArtifactsCategory=$(_DotNetValidationArtifactsCategory)
|
||||
/p:IsStableBuild=$(IsStableBuild)
|
||||
/p:IsInternalBuild=$(IsInternalBuild)
|
||||
/p:RepositoryName=$(Build.Repository.Name)
|
||||
/p:CommitSha=$(Build.SourceVersion)
|
||||
/p:NugetPath=$(NuGetExeToolPath)
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-universal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)/BlobArtifacts/'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts/'
|
||||
/p:Configuration=Release
|
||||
/p:PublishInstallersAndChecksums=${{ parameters.publishInstallersAndChecksums }}
|
||||
/p:InstallersTargetStaticFeed=$(InstallersBlobFeedUrl)
|
||||
/p:InstallersAzureAccountKey=$(dotnetcli-storage-key)
|
||||
/p:ChecksumsTargetStaticFeed=$(ChecksumsBlobFeedUrl)
|
||||
/p:ChecksumsAzureAccountKey=$(dotnetclichecksums-storage-key)
|
||||
/p:PublishToAzureDevOpsNuGetFeeds=true
|
||||
/p:AzureDevOpsStaticShippingFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticShippingFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticTransportFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticTransportFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
/p:AzureDevOpsStaticSymbolsFeed='https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
||||
/p:AzureDevOpsStaticSymbolsFeedKey='$(dn-bot-dnceng-artifact-feeds-rw)'
|
||||
${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
/p:NugetPath=$(Agent.BuildDirectory)\Nuget\NuGet.exe
|
||||
/p:AzdoTargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
||||
/p:TargetFeedPAT='$(dn-bot-dnceng-unviersal-packages-rw)'
|
||||
/p:AzureStorageTargetFeedPAT='$(dotnetfeed-storage-access-key-1)'
|
||||
/p:BARBuildId=$(BARBuildId)
|
||||
/p:MaestroApiEndpoint='$(MaestroApiEndPoint)'
|
||||
/p:BuildAssetRegistryToken='$(MaestroApiAccessToken)'
|
||||
/p:ManifestsBasePath='$(Build.ArtifactStagingDirectory)/AssetManifests/'
|
||||
/p:BlobBasePath='$(Build.ArtifactStagingDirectory)\BlobArtifacts'
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)\PackageArtifacts'
|
||||
/p:Configuration=Release
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
|
||||
- task: NuGetCommand@2
|
||||
displayName: Publish Packages to AzDO Feed
|
||||
condition: contains(variables['TargetAzDOFeed'], 'pkgs.visualstudio.com')
|
||||
inputs:
|
||||
command: push
|
||||
vstsFeed: $(AzDoFeedName)
|
||||
packagesToPush: $(Build.ArtifactStagingDirectory)\PackageArtifacts\*.nupkg
|
||||
publishVstsFeed: $(AzDoFeedName)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Publish Blobs to AzDO Feed
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/publish-blobs-to-azdo.ps1
|
||||
arguments: -FeedName $(AzDoFeedName)
|
||||
-SourceFolderCollection $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-PersonalAccessToken $(dn-bot-dnceng-unviersal-packages-rw)
|
||||
enabled: false
|
||||
|
||||
|
||||
- stage: PVR_PublishValidation
|
||||
displayName: Publish Validation
|
||||
variables:
|
||||
- template: ../common-variables.yml
|
||||
jobs:
|
||||
- template: ../setup-maestro-vars.yml
|
||||
|
||||
- template: ../darc-gather-drop.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
|
||||
|
||||
- template: ../promote-build.yml
|
||||
parameters:
|
||||
ChannelId: ${{ variables.PublicValidationRelease_30_Channel_Id }}
|
||||
@@ -1,24 +1,14 @@
|
||||
variables:
|
||||
- group: Publish-Build-Assets
|
||||
- group: DotNet-DotNetCli-Storage
|
||||
- group: DotNet-MSRC-Storage
|
||||
|
||||
# .NET Core 3.1 Dev
|
||||
- name: PublicDevRelease_31_Channel_Id
|
||||
value: 128
|
||||
|
||||
# .NET Core 5 Dev
|
||||
- name: NetCore_5_Dev_Channel_Id
|
||||
value: 131
|
||||
# .NET Core 3 Dev
|
||||
- name: PublicDevRelease_30_Channel_Id
|
||||
value: 3
|
||||
|
||||
# .NET Tools - Validation
|
||||
- name: PublicValidationRelease_30_Channel_Id
|
||||
value: 9
|
||||
|
||||
# .NET Tools - Latest
|
||||
- name: NetCore_Tools_Latest_Channel_Id
|
||||
value: 2
|
||||
|
||||
# .NET Core 3.0 Internal Servicing
|
||||
- name: InternalServicing_30_Channel_Id
|
||||
value: 184
|
||||
@@ -27,14 +17,14 @@ variables:
|
||||
- name: PublicRelease_30_Channel_Id
|
||||
value: 19
|
||||
|
||||
# .NET Core 3.1 Release
|
||||
- name: PublicRelease_31_Channel_Id
|
||||
value: 129
|
||||
|
||||
# Whether the build is internal or not
|
||||
- name: IsInternalBuild
|
||||
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
||||
|
||||
# Storage account name for proxy-backed feeds
|
||||
- name: ProxyBackedFeedsAccountName
|
||||
value: dotnetfeed
|
||||
|
||||
# Default Maestro++ API Endpoint and API Version
|
||||
- name: MaestroApiEndPoint
|
||||
value: "https://maestro-prod.westus2.cloudapp.azure.com"
|
||||
@@ -47,24 +37,3 @@ variables:
|
||||
value: 3.0.0
|
||||
- name: SymbolToolVersion
|
||||
value: 1.0.1
|
||||
|
||||
# Feed Configurations
|
||||
# These should include the suffix "/index.json"
|
||||
|
||||
# Default locations for Installers and checksums
|
||||
# Public Locations
|
||||
- name: ChecksumsBlobFeedUrl
|
||||
value: https://dotnetclichecksums.blob.core.windows.net/dotnet/index.json
|
||||
- name: InstallersBlobFeedUrl
|
||||
value: https://dotnetcli.blob.core.windows.net/dotnet/index.json
|
||||
|
||||
# Private Locations
|
||||
- name: InternalChecksumsBlobFeedUrl
|
||||
value: https://dotnetclichecksumsmsrc.blob.core.windows.net/dotnet/index.json
|
||||
- name: InternalChecksumsBlobFeedKey
|
||||
value: $(dotnetclichecksumsmsrc-storage-key)
|
||||
|
||||
- name: InternalInstallersBlobFeedUrl
|
||||
value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json
|
||||
- name: InternalInstallersBlobFeedKey
|
||||
value: $(dotnetclimsrc-access-key)
|
||||
@@ -5,7 +5,7 @@ jobs:
|
||||
- job: gatherDrop
|
||||
displayName: Gather Drop
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], ${{ parameters.ChannelId }})
|
||||
variables:
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
|
||||
@@ -1,29 +1,18 @@
|
||||
parameters:
|
||||
enableSourceLinkValidation: false
|
||||
enableSourceLinkValidation: true
|
||||
enableSigningValidation: true
|
||||
enableSymbolValidation: false
|
||||
enableSymbolValidation: true
|
||||
enableNugetValidation: true
|
||||
publishInstallersAndChecksums: false
|
||||
SDLValidationParameters:
|
||||
enable: false
|
||||
continueOnError: false
|
||||
params: ''
|
||||
|
||||
# These parameters let the user customize the call to sdk-task.ps1 for publishing
|
||||
# symbols & general artifacts as well as for signing validation
|
||||
symbolPublishingAdditionalParameters: ''
|
||||
artifactsPublishingAdditionalParameters: ''
|
||||
signingValidationAdditionalParameters: ''
|
||||
|
||||
# Which stages should finish execution before post-build stages start
|
||||
validateDependsOn:
|
||||
- build
|
||||
publishDependsOn:
|
||||
- Validate
|
||||
dependsOn: [build]
|
||||
|
||||
stages:
|
||||
- stage: Validate
|
||||
dependsOn: ${{ parameters.validateDependsOn }}
|
||||
- stage: validate
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
displayName: Validate
|
||||
jobs:
|
||||
- ${{ if eq(parameters.enableNugetValidation, 'true') }}:
|
||||
@@ -48,9 +37,6 @@ stages:
|
||||
- ${{ if eq(parameters.enableSigningValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- group: AzureDevOps-Artifact-Feeds-Pats
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -60,28 +46,13 @@ stages:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
# This is necessary whenever we want to publish/restore to an AzDO private feed
|
||||
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
|
||||
# otherwise it'll complain about accessing a private feed.
|
||||
- task: NuGetAuthenticate@0
|
||||
condition: eq(variables['IsInternalBuild'], 'true')
|
||||
displayName: 'Authenticate to AzDO Feeds'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Enable cross-org publishing
|
||||
inputs:
|
||||
filePath: eng\common\enable-cross-org-publishing.ps1
|
||||
arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: eng\common\sdk-task.ps1
|
||||
arguments: -task SigningValidation -restore -msbuildEngine dotnet
|
||||
/p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
|
||||
/p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
|
||||
/p:Configuration=Release
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
/p:Configuration=Release
|
||||
|
||||
- ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
|
||||
- job:
|
||||
@@ -106,57 +77,18 @@ stages:
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
|
||||
- ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\netcore-dev-5.yml
|
||||
- template: \eng\common\templates\post-build\channels\public-dev-release.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\netcore-dev-31.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\netcore-tools-latest.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
enableSymbolValidation: ${{ parameters.enableSymbolValidation }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\public-validation-release.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\netcore-release-30.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
- template: \eng\common\templates\post-build\channels\public-release.yml
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\netcore-release-31.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\netcore-internal-30.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
- template: \eng\common\templates\post-build\channels\internal-servicing.yml
|
||||
@@ -5,7 +5,7 @@ jobs:
|
||||
- job:
|
||||
displayName: Promote Build
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], ${{ parameters.ChannelId }})
|
||||
variables:
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
parameters:
|
||||
ChannelId: 0
|
||||
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId ${{ parameters.ChannelId }}
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
+2
-23
@@ -39,10 +39,6 @@
|
||||
# installed on the machine instead of downloading one.
|
||||
[bool]$useInstalledDotNetCli = if (Test-Path variable:useInstalledDotNetCli) { $useInstalledDotNetCli } else { $true }
|
||||
|
||||
# Enable repos to use a particular version of the on-line dotnet-install scripts.
|
||||
# default URL: https://dot.net/v1/dotnet-install.ps1
|
||||
[string]$dotnetInstallScriptVersion = if (Test-Path variable:dotnetInstallScriptVersion) { $dotnetInstallScriptVersion } else { "v1" }
|
||||
|
||||
# True to use global NuGet cache instead of restoring packages to repository-local directory.
|
||||
[bool]$useGlobalNuGetCache = if (Test-Path variable:useGlobalNuGetCache) { $useGlobalNuGetCache } else { !$ci }
|
||||
|
||||
@@ -153,7 +149,6 @@ function InitializeDotNetCli([bool]$install) {
|
||||
|
||||
# Make Sure that our bootstrapped dotnet cli is available in future steps of the Azure Pipelines build
|
||||
Write-PipelinePrependPath -Path $dotnetRoot
|
||||
|
||||
Write-PipelineSetVariable -Name 'DOTNET_MULTILEVEL_LOOKUP' -Value '0'
|
||||
Write-PipelineSetVariable -Name 'DOTNET_SKIP_FIRST_TIME_EXPERIENCE' -Value '1'
|
||||
|
||||
@@ -164,8 +159,7 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||
$installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
|
||||
if (!(Test-Path $installScript)) {
|
||||
Create-Directory $dotnetRoot
|
||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||
Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
|
||||
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile $installScript
|
||||
}
|
||||
|
||||
return $installScript
|
||||
@@ -284,7 +278,6 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
||||
|
||||
Create-Directory $packageDir
|
||||
Write-Host "Downloading $packageName $packageVersion"
|
||||
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
|
||||
Invoke-WebRequest "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/$packageName/$packageVersion/" -OutFile $packagePath
|
||||
Unzip $packagePath $packageDir
|
||||
}
|
||||
@@ -366,6 +359,7 @@ function InitializeBuildTool() {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$buildTool = @{ Path = Join-Path $dotnetRoot "dotnet.exe"; Command = "msbuild"; Tool = "dotnet"; Framework = "netcoreapp2.1" }
|
||||
} elseif ($msbuildEngine -eq "vs") {
|
||||
try {
|
||||
@@ -490,18 +484,6 @@ function Stop-Processes() {
|
||||
function MSBuild() {
|
||||
if ($pipelinesLog) {
|
||||
$buildTool = InitializeBuildTool
|
||||
|
||||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if ($ci -and $buildTool.Tool -eq "dotnet") {
|
||||
dotnet nuget locals http-cache -c
|
||||
|
||||
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
|
||||
$env:NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS = 20
|
||||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
Write-PipelineSetVariable -Name 'NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS' -Value '20'
|
||||
}
|
||||
|
||||
$toolsetBuildProject = InitializeToolset
|
||||
$path = Split-Path -parent $toolsetBuildProject
|
||||
$path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
|
||||
@@ -536,9 +518,6 @@ function MSBuild-Core() {
|
||||
if ($warnAsError) {
|
||||
$cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
|
||||
}
|
||||
else {
|
||||
$cmdArgs += " /p:TreatWarningsAsErrors=false"
|
||||
}
|
||||
|
||||
foreach ($arg in $args) {
|
||||
if ($arg -ne $null -and $arg.Trim() -ne "") {
|
||||
|
||||
+5
-28
@@ -45,10 +45,6 @@ warn_as_error=${warn_as_error:-true}
|
||||
# installed on the machine instead of downloading one.
|
||||
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
||||
|
||||
# Enable repos to use a particular version of the on-line dotnet-install scripts.
|
||||
# default URL: https://dot.net/v1/dotnet-install.sh
|
||||
dotnetInstallScriptVersion=${dotnetInstallScriptVersion:-'v1'}
|
||||
|
||||
# True to use global NuGet cache instead of restoring packages to repository-local directory.
|
||||
if [[ "$ci" == true ]]; then
|
||||
use_global_nuget_cache=${use_global_nuget_cache:-false}
|
||||
@@ -199,7 +195,7 @@ function InstallDotNet {
|
||||
function GetDotNetInstallScript {
|
||||
local root=$1
|
||||
local install_script="$root/dotnet-install.sh"
|
||||
local install_script_url="https://dot.net/$dotnetInstallScriptVersion/dotnet-install.sh"
|
||||
local install_script_url="https://dot.net/v1/dotnet-install.sh"
|
||||
|
||||
if [[ ! -a "$install_script" ]]; then
|
||||
mkdir -p "$root"
|
||||
@@ -208,19 +204,12 @@ function GetDotNetInstallScript {
|
||||
|
||||
# Use curl if available, otherwise use wget
|
||||
if command -v curl > /dev/null; then
|
||||
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
else
|
||||
wget -q -O "$install_script" "$install_script_url" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script"
|
||||
else
|
||||
wget -q -O "$install_script" "$install_script_url"
|
||||
fi
|
||||
fi
|
||||
|
||||
# return value
|
||||
_GetDotNetInstallScript="$install_script"
|
||||
}
|
||||
@@ -328,18 +317,6 @@ function MSBuild {
|
||||
if [[ "$pipelines_log" == true ]]; then
|
||||
InitializeBuildTool
|
||||
InitializeToolset
|
||||
|
||||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if [[ "$ci" == true ]]; then
|
||||
dotnet nuget locals http-cache -c
|
||||
|
||||
export NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS=20
|
||||
export NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS=20
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS" -value "20"
|
||||
Write-PipelineSetVariable -name "NUGET_PLUGIN_REQUEST_TIMEOUT_IN_SECONDS" -value "20"
|
||||
fi
|
||||
|
||||
local toolset_dir="${_InitializeToolset%/*}"
|
||||
local logger_path="$toolset_dir/$_InitializeBuildToolFramework/Microsoft.DotNet.Arcade.Sdk.dll"
|
||||
args=( "${args[@]}" "-logger:$logger_path" )
|
||||
|
||||
File renamed without changes.
@@ -0,0 +1,51 @@
|
||||
<Project DefaultTargets="PublishPackages">
|
||||
|
||||
<!-- TODO: move properties imported from here into a common props file -->
|
||||
<!-- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> -->
|
||||
|
||||
<!-- Use an explicit SDK import so that arcade uses the build
|
||||
configuration computed in dir.common.props. -->
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)\..\.packages\microsoft.dotnet.build.tasks.feed\$(MicrosoftDotNetBuildTasksFeedVersion)\build\Microsoft.DotNet.Build.Tasks.Feed.targets" />
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Set the TargetFramework just to make the SDK happy -->
|
||||
<TargetFramework>net462</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="PublishPackages">
|
||||
|
||||
<ItemGroup>
|
||||
<PackagesToPublish Include="$(MSBuildThisFileDirectory)\..\artifacts\*.nupkg" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ItemsToPushToBlobFeed Include="@(PackagesToPublish)" />
|
||||
</ItemGroup>
|
||||
|
||||
<Error Condition=" '$(AzureFeedUrl)' == '' " Text="AzureFeedUrl must be set" />
|
||||
<Error Condition=" '$(AzureAccountKey)' == '' " Text="AzureAccountKey must be set" />
|
||||
<Error Condition=" '$(BUILD_REPOSITORY_URI)' == '' " Text="BUILD_REPOSITORY_URI must be set" />
|
||||
<Error Condition=" '$(BUILD_SOURCEBRANCH)' == '' " Text="BUILD_SOURCEBRANCH must be set" />
|
||||
<Error Condition=" '$(BUILD_BUILDNUMBER)' == '' " Text="BUILD_BUILDNUMBER must be set" />
|
||||
<Error Condition=" '$(BUILD_SOURCEVERSION)' == '' " Text="BUILD_SOURCEVERSION must be set" />
|
||||
|
||||
<PropertyGroup>
|
||||
<AssetManifestFilePath>$(ArtifactsLogDir)AssetManifest\$(AssetManifest)</AssetManifestFilePath>
|
||||
</PropertyGroup>
|
||||
|
||||
<Message Importance="Low" Text="BUILD_REPOSITORY_URI: $(BUILD_REPOSITORY_URI)" />
|
||||
|
||||
<PushToBlobFeed ExpectedFeedUrl="$(AzureFeedUrl)"
|
||||
AccountKey="$(AzureAccountKey)"
|
||||
ItemsToPush="@(ItemsToPushToBlobFeed)"
|
||||
ManifestBuildData="Location=$(AzureFeedUrl)"
|
||||
ManifestRepoUri="$(BUILD_REPOSITORY_URI)"
|
||||
ManifestBranch="$(BUILD_SOURCEBRANCH)"
|
||||
ManifestBuildId="$(BUILD_BUILDNUMBER)"
|
||||
ManifestCommit="$(BUILD_SOURCEVERSION)"
|
||||
AssetManifestPath="$(AssetManifestFilePath)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: d89d8d3d9c...720f61ffc7.
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: 4e3d4446a3...e5173a5531.
Vendored
+1
-1
Submodule external/bockbuild updated: 63dc5b7b76...1d8d36b67c.
Vendored
+1
-1
Submodule external/cecil updated: a6a7f5c0f4...cb6c1ca9aa.
Vendored
+1
-1
Submodule external/corefx updated: c30d255aec...33308c540f.
Vendored
+1
-1
Submodule external/ikvm updated: 9f805dcf8a...847e05fced.
Vendored
+1
-1
Submodule external/linker updated: e8d054bf32...1f87de35a9.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: ed62a0cc59...17479f9636.
+3
-3
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"tools": {
|
||||
"dotnet": "5.0.100-alpha1-013968"
|
||||
"dotnet": "5.0.100-alpha1-013628"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19473.5",
|
||||
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.19473.5"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "1.0.0-beta.19379.1",
|
||||
"Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19379.1"
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,6 @@ llvm_extra_libs=
|
||||
endif
|
||||
endif
|
||||
|
||||
if INTERNAL_LLVM_ASSERTS
|
||||
ENABLE_ASSERTS=On
|
||||
else
|
||||
ENABLE_ASSERTS=Off
|
||||
endif
|
||||
|
||||
if INTERNAL_LLVM
|
||||
|
||||
all-local: configure-llvm build-llvm install-llvm llvm_config.mk
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ $(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile): $(abs_top_srcdir)/external/ll
|
||||
-DLLVM_TOOLS_TO_BUILD="opt;llc;llvm-config;llvm-dis" \
|
||||
-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
|
||||
$(EXTRA_LLVM_ARGS) \
|
||||
-DLLVM_ENABLE_ASSERTIONS=$(ENABLE_ASSERTS) \
|
||||
-DLLVM_ENABLE_ASSERTIONS=$(if $(INTERNAL_LLVM_ASSERTS),On,Off) \
|
||||
-DLLVM_ENABLE_LIBXML2=Off \
|
||||
-DHAVE_FUTIMENS=0 \
|
||||
$(LLVM_CMAKE_ARGS) \
|
||||
|
||||
@@ -79,7 +79,7 @@ if not "%MONO_LLVM_INSTALL_DIR%" == "" (
|
||||
set VS_BUILD_ARGS=%VS_BUILD_ARGS% /p:_LLVMInstallDir="%MONO_LLVM_INSTALL_DIR%"
|
||||
)
|
||||
|
||||
set VS_BUILD_ARGS=%VS_BUILD_ARGS% /p:MONO_ENABLE_LLVM=true /p:Configuration=%VS_CONFIGURATION% /p:Platform=%VS_PLATFORM% %VS_ADDITIONAL_ARGUMENTS% /t:%VS_TARGET% /m
|
||||
set VS_BUILD_ARGS=%VS_BUILD_ARGS% /p:MONO_ENABLE_LLVM=true /p:Configuration=%VS_CONFIGURATION% /p:Platform=%VS_PLATFORM% %VS_ADDITIONAL_ARGUMENTS% /t:%VS_TARGET%
|
||||
call msbuild.exe %VS_BUILD_ARGS% "%MONO_MSVC_SOURCE_DIR%build-external-llvm.vcxproj" && (
|
||||
set BUILD_RESULT=0
|
||||
) || (
|
||||
|
||||
-17
@@ -246,14 +246,6 @@ program that comes with Mono, and calling it like this:
|
||||
|
||||
.fi
|
||||
.TP
|
||||
.I mcpu=[native o generic]
|
||||
cpu=native allows AOT mode to use all instructions current CPU supports, e.g. AVX2, SSE42, etc.
|
||||
Default value is 'generic'.
|
||||
.I mattr=[cpu feature]
|
||||
Allows AOT code generator to use specified CPU features where possible including `System.Runtime.Intrinsics.*'.
|
||||
E.g. `mattr=+avx2,mattr=-lzcnt' unlocks sse1-4.2, avx1-2 and disables lzcnt.
|
||||
It's useful for cross-compilation or when it's not possible to use `-mcpu=native' (which enables
|
||||
all cpu feature current cpu has).
|
||||
.I llvm-outfile=[filename]
|
||||
Gives the path for the temporary LLVM bitcode file created during AOT.
|
||||
.I dedup
|
||||
@@ -563,10 +555,6 @@ generation engine to JIT or AOT compile.
|
||||
.Sp
|
||||
For more information, consult: http://www.mono-project.com/docs/advanced/mono-llvm/
|
||||
.TP
|
||||
\fB--ffast-math\fR
|
||||
This flag allows Mono and LLVM to apply aggressive floating point optimizations.
|
||||
Can break IEEE754 compliance.
|
||||
.TP
|
||||
\fB--nollvm\fR
|
||||
When using a Mono that has been compiled with LLVM support, it forces
|
||||
Mono to fallback to its JIT engine and not use the LLVM backend.
|
||||
@@ -1854,11 +1842,6 @@ This option will suspend the program when an unhandled exception occurs.
|
||||
\fBthread-dump-dir=DIR\fR
|
||||
Use DIR for storage thread dumps created by SIGQUIT.
|
||||
.TP
|
||||
\fBweak-memory-model\fR
|
||||
Don't enforce the CLR memory model on platforms with weak memory models. This can introduce
|
||||
random crashes in some rare cases, for multithreaded environments. This can be used for a
|
||||
performance boost on applications that are single threaded.
|
||||
.TP
|
||||
\fBverbose-gdb\fR
|
||||
Make gdb output on native crashes more verbose.
|
||||
.ne
|
||||
|
||||
@@ -38,6 +38,5 @@ NO_CONSOLE = yes
|
||||
ifeq ($(HOST_PLATFORM),win32)
|
||||
PROFILE_MCS_FLAGS += -d:MOBILE_DESKTOP_HOST -d:WIN_PLATFORM
|
||||
endif
|
||||
ENABLE_GSS=1
|
||||
|
||||
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking PKITS InetAccess AndroidNotWorking
|
||||
@@ -23,7 +23,3 @@ ifeq ($(HOST_PLATFORM),macos)
|
||||
MONO_FEATURE_APPLETLS=1
|
||||
ENABLE_GSS=1
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_PLATFORM),linux)
|
||||
ENABLE_GSS=1
|
||||
endif
|
||||
@@ -44,5 +44,4 @@ NO_CONSOLE = yes
|
||||
NO_MULTIPLE_APPDOMAINS = yes
|
||||
NO_THREAD_ABORT = yes
|
||||
NO_THREAD_SUSPEND_RESUME = yes
|
||||
PROFILE_DISABLE_BTLS = yes
|
||||
WASM = yes
|
||||
@@ -44,7 +44,7 @@ CSC_LOCATION = $(if $(findstring 1,$(ENABLE_COMPILER_SERVER)),$(SERVER_CSC_LOCAT
|
||||
USE_MCS_FLAGS = $(COMPILER_SERVER_ARGS) /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
|
||||
USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
|
||||
CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
|
||||
CSC_RUNTIME_FLAGS = --aot-path=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) --gc-params=nursery-size=64m
|
||||
CSC_RUNTIME_FLAGS = --aot-path=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) --gc-params=nursery-size=64m --clr-memory-model
|
||||
CCOMPILE = $(CC) $(USE_CFLAGS)
|
||||
BOOT_COMPILE = $(Q_MCS) $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS)
|
||||
INSTALL = $(SHELL) $(topdir)/../mono/install-sh
|
||||
|
||||
@@ -6,7 +6,7 @@ set -u
|
||||
set -e
|
||||
|
||||
if [ -s "$VBCS_LOCATION" ]; then
|
||||
CMD="RoslynCommandLineLogFile=$2 $VBCS_RUNTIME --gc-params=nursery-size=64m \"$VBCS_LOCATION\" -pipename:$3 &"
|
||||
CMD="RoslynCommandLineLogFile=$2 $VBCS_RUNTIME --clr-memory-model --gc-params=nursery-size=64m \"$VBCS_LOCATION\" -pipename:$3 &"
|
||||
echo "Log location set to $2"
|
||||
touch "$2"
|
||||
echo "cd $1; bash -c \"$CMD\""
|
||||
|
||||
+44
-57
@@ -89,32 +89,26 @@ endif
|
||||
test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
|
||||
test_lib_output = $(test_lib_dir)/$(test_lib)
|
||||
|
||||
test_library = $(ASSEMBLY:$(ASSEMBLY_EXT)=)_test$(ASSEMBLY_EXT)
|
||||
test_response = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).response
|
||||
test_makefrag = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).makefrag
|
||||
test_sourcefile_base_excludes = $(test_lib).exclude.sources
|
||||
|
||||
test_pdb = $(test_lib:.dll=.pdb)
|
||||
test_flags = $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
|
||||
ifndef NO_BUILD
|
||||
test_flags += -r:$(the_assembly)
|
||||
test_assembly_dep = $(the_assembly)
|
||||
endif
|
||||
|
||||
tests_CLEAN_FILES += $(test_lib_output) $(test_response) $(test_makefrag)
|
||||
tests_CLEAN_FILES += $(test_lib_output) $(test_lib_output:$(ASSEMBLY_EXT)=.pdb)
|
||||
|
||||
xtest_sourcefile_base = $(PROFILE_PLATFORM)_$(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
xtest_sourcefile_base_excludes_full = $(PROFILE_PLATFORM)_$(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.exclude.sources)
|
||||
xtest_sourcefile_base_excludes = $(xtest_sourcefile_base_excludes_full:_%=%)
|
||||
|
||||
xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
|
||||
xtest_lib_output = $(test_lib_dir)/$(xunit_test_lib)
|
||||
|
||||
xtest_library = $(ASSEMBLY:$(ASSEMBLY_EXT)=)_xtest$(ASSEMBLY_EXT)
|
||||
xtest_response = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(xtest_library).response
|
||||
xtest_makefrag = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(xtest_library).makefrag
|
||||
xtest_flags = $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
|
||||
ifndef NO_BUILD
|
||||
xtest_flags += -r:$(the_assembly)
|
||||
xtest_assembly_dep = $(the_assembly)
|
||||
endif
|
||||
xtest_response = $(depsdir)/$(xunit_test_lib).response
|
||||
xtest_makefrag = $(depsdir)/$(xunit_test_lib).makefrag
|
||||
xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
|
||||
ifeq ($(wildcard $(xtest_sourcefile_base)),)
|
||||
xtest_sourcefile_base = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
@@ -134,7 +128,7 @@ $(test_nunit_dep): $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
@if test -f $@; then :; else rm -f $<; $(MAKE) $<; fi
|
||||
|
||||
$(topdir)/build/deps/nunit-$(PROFILE).stamp:
|
||||
$(MAKE) -C ${topdir}/tools/nunit-lite
|
||||
cd ${topdir}/tools/nunit-lite && $(MAKE)
|
||||
echo "stamp" >$@
|
||||
|
||||
tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
|
||||
@@ -146,10 +140,6 @@ test_assemblies :=
|
||||
ifdef HAVE_CS_TESTS
|
||||
test_assemblies += $(test_lib_output)
|
||||
|
||||
ifdef TEST_SPLIT_ASSEMBLIES
|
||||
test_assemblies += $(test_lib_output:.dll=.part1.dll) $(test_lib_output:.dll=.part2.dll)
|
||||
endif
|
||||
|
||||
check: run-test
|
||||
test-local: $(test_assemblies) $(test_lib_dir)/nunit-excludes.txt
|
||||
run-test-local: run-test-lib
|
||||
@@ -272,34 +262,44 @@ endif
|
||||
TEST_FILES =
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
|
||||
TEST_FILES += `sed -e '/^$$/d' -e 's,^../,,' -e '/^\#.*$$/d' -et -e 's,^,Test/,' $(test_sourcefile_base)`
|
||||
endif
|
||||
|
||||
ifdef HAVE_CS_TESTS
|
||||
|
||||
$(test_lib_dir):
|
||||
mkdir -p $@
|
||||
|
||||
test_library = $(ASSEMBLY:$(ASSEMBLY_EXT)=)_test$(ASSEMBLY_EXT)
|
||||
|
||||
test_sourcefile = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).sources
|
||||
$(test_sourcefile): $(test_sourcefile_base) $(wildcard *_test.dll.sources) $(wildcard *_test.dll.exclude.sources) $(depsdir)/.stamp
|
||||
$(GENSOURCES) --basedir:./Test --strict --platformsdir:$(topdir)/build "$@" "$(test_library)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
|
||||
test_response = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).response
|
||||
$(test_response): $(test_sourcefile) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
$(PLATFORM_CHANGE_SEPARATOR_CMD) <$(test_sourcefile) >$@
|
||||
|
||||
test_makefrag = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(test_library).makefrag
|
||||
$(test_makefrag): $(test_sourcefile) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(build_lib): ,' $< >$@
|
||||
@if test ! -f $(test_sourcefile).makefrag; then :; else \
|
||||
cat $(test_sourcefile).makefrag >> $@ ; \
|
||||
echo '$@: $(test_sourcefile).makefrag' >> $@; \
|
||||
echo '$(test_sourcefile).makefrag:' >> $@; fi
|
||||
|
||||
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) $(test_lib_output).nunitlite.config | $(test_lib_dir)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
|
||||
|
||||
ifdef TEST_SPLIT_ASSEMBLIES
|
||||
$(test_lib_output:.dll=.part1.dll): $(test_lib_output) $(test_response).part1
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response).part1
|
||||
tests_CLEAN_FILES += $(test_sourcefile) $(test_response) $(test_makefrag)
|
||||
|
||||
$(test_lib_output:.dll=.part2.dll): $(test_lib_output) $(test_response).part2
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response).part2
|
||||
|
||||
tests_CLEAN_FILES += $(test_response).part1 $(test_response).part2
|
||||
endif
|
||||
|
||||
$(test_response): $(test_sourcefile_base) $(wildcard *_test.dll.sources) $(wildcard *_test.dll.exclude.sources) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
$(GENSOURCES) --basedir:./Test --strict --platformsdir:$(topdir)/build "$@" "$(test_library)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
|
||||
$(test_makefrag): $(test_response)
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(test_lib_output) $(test_lib_output:.dll=.part1.dll) $(test_lib_output:.dll=.part2.dll): ,' $< >$@
|
||||
|
||||
-include $(test_makefrag)
|
||||
|
||||
build-test-lib: $(test_lib_output)
|
||||
@echo Building testing lib
|
||||
|
||||
endif
|
||||
|
||||
@@ -336,15 +336,8 @@ ifdef COVERAGE
|
||||
XTEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/coverage_xunit_$(ASSEMBLY).xml
|
||||
endif
|
||||
|
||||
xtest_assemblies += $(xtest_lib_output)
|
||||
|
||||
ifdef XTEST_SPLIT_ASSEMBLIES
|
||||
xtest_assemblies += $(xtest_lib_output:.dll=.part1.dll) $(xtest_lib_output:.dll=.part2.dll)
|
||||
endif
|
||||
|
||||
|
||||
check: run-xunit-test-local
|
||||
xunit-test-local: $(xtest_assemblies) $(test_lib_dir)/xunit-excludes.txt $(test_lib_dir)/Xunit.NetCore.Extensions.dll $(test_lib_dir)/xunit.execution.dotnet.dll
|
||||
xunit-test-local: $(xtest_lib_output) $(test_lib_dir)/xunit-excludes.txt $(test_lib_dir)/Xunit.NetCore.Extensions.dll $(test_lib_dir)/xunit.execution.dotnet.dll
|
||||
run-xunit-test-local: run-xunit-test-lib
|
||||
|
||||
$(test_lib_dir)/xunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
|
||||
@@ -367,29 +360,23 @@ run-xunit-test-lib: xunit-test-local
|
||||
$(XTEST_REMOTE_EXECUTOR): $(topdir)/../external/corefx/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs | $(test_lib_dir)
|
||||
$(TEST_COMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll $< -out:$@
|
||||
|
||||
$(xtest_lib_output): $(xtest_assembly_dep) $(xtest_response) $(xunit_libs_dep) $(xunit_src) $(XTEST_REMOTE_EXECUTOR) | $(test_lib_dir)
|
||||
$(xtest_lib_output): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src) $(XTEST_REMOTE_EXECUTOR) | $(test_lib_dir)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response) $(xunit_src)
|
||||
|
||||
ifdef XTEST_SPLIT_ASSEMBLIES
|
||||
$(xtest_lib_output:.dll=.part1.dll): $(xtest_lib_output) $(xtest_response).part1
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response).part1 $(xunit_src)
|
||||
|
||||
$(xtest_lib_output:.dll=.part2.dll): $(xtest_lib_output) $(xtest_response).part2
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response).part2 $(xunit_src)
|
||||
|
||||
xtests_CLEAN_FILES += $(xtest_response).part1 $(xtest_response).part2
|
||||
endif
|
||||
xtest_response_preprocessed = $(xtest_response)_preprocessed
|
||||
|
||||
# This handles .excludes/.sources pairs, as well as resolving the
|
||||
# includes that occur in .sources files. It also handles splitting test assemblies into multiple parts.
|
||||
$(xtest_response): $(xtest_sourcefile_base) $(wildcard *_xtest.dll.sources) $(wildcard *_xtest.dll.exclude.sources) $(topdir)/build/tests.make $(depsdir)/.stamp
|
||||
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(xtest_library)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
|
||||
# includes that occur in .sources files
|
||||
$(xtest_response): $(xtest_sourcefile_base) $(wildcard *xtest.dll.sources) $(wildcard $(xtest_sourcefile_base_excludes))
|
||||
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(xtest_sourcefile_base)" "$(xtest_sourcefile_base_excludes)"
|
||||
|
||||
$(xtest_makefrag): $(xtest_response) $(xtest_response_parts)
|
||||
$(xtest_makefrag): $(xtest_response)
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(xtest_lib_output) $(xtest_lib_output:.dll=.part1.dll) $(xtest_lib_output:.dll=.part2.dll): ,' $< >$@
|
||||
@sed 's,^,$(xtest_lib_output): ,' $< >$@
|
||||
|
||||
-include $(xtest_makefrag)
|
||||
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: patch-nunitlite-appconfig
|
||||
@@ -38,7 +38,7 @@ doc-update-recursive:
|
||||
@echo "do not recurse the Facades folder"
|
||||
|
||||
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Numerics.Vectors System.Runtime.Serialization System.Transactions System.Xml \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.Data.DataSetExtensions System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
|
||||
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess System.IO.Compression System.IdentityModel System.Web \
|
||||
Facades/System.Drawing.Primitives Facades/System.Drawing.Common System.Drawing System.Web.Services:
|
||||
|
||||
|
||||
@@ -29,72 +29,72 @@
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
|
||||
<OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
|
||||
<OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full_interp' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full_interp/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_INTERP;DISABLE_COM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_hybrid' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_hybrid/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;MOBILE_DYNAMIC</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
|
||||
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_REMOTING;DISABLE_SECURITY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_COM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
|
||||
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'testing_winaot_interp' ">
|
||||
<OutputPath>./../../../class/lib/testing_winaot_interp/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_INTERP;DISABLE_SECURITY;DISABLE_REMOTING;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;DISABLE_COM;WIN_PLATFORM;WINAOT;FULL_AOT_INTERP;DISABLE_SECURITY;DISABLE_REMOTING</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
|
||||
<OutputPath>./../../../class/lib/xammac/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'xammac_net_4_5' ">
|
||||
<OutputPath>./../../../class/lib/xammac_net_4_5/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;NO_SYSTEM_DRAWING_DEPENDENCY;NO_WINFORMS_DEPENDENCY;NO_SYSTEM_WEB_DEPENDENCY;XAMMAC_4_5;XAMARIN_MODERN</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
|
||||
<OutputPath>./../../../class/lib/orbis/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_COM</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
|
||||
<OutputPath>./../../../class/lib/unreal/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
|
||||
<OutputPath>./../../../class/lib/wasm/Facades</OutputPath>
|
||||
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY;FEATURE_TYPECONVERTER</DefineConstants>
|
||||
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_COM;FEATURE_NO_BSD_SOCKETS;DISABLE_REMOTING;DISABLE_SECURITY</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- @ALL_PROFILE_PROPERTIES@ -->
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
|
||||
@@ -13,7 +13,7 @@ KEYFILE = ../../Open.snk
|
||||
LIBRARY_SNK = $(KEYFILE)
|
||||
SIGN_FLAGS = /delaysign /nowarn:1616,1699
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS) -d:FEATURE_TYPECONVERTER
|
||||
LIB_MCS_FLAGS = $(SIGN_FLAGS) $(EXTRA_LIB_MCS_FLAGS)
|
||||
|
||||
ifneq (,$(filter build net_4_x, $(PROFILE)))
|
||||
$(error This profile shouldn't build System.Drawing.Common.dll, it already has System.Drawing.dll)
|
||||
|
||||
@@ -27,28 +27,14 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipient))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsRecipientEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.CmsSigner))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.ContentInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.EnvelopedCms))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyAgreeRecipientInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.KeyTransRecipientInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Builder))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12CertBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ConfidentialityMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12Info))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12KeyBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContents))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SafeContentsBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12SecretBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs12ShroudedKeyBag))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs8PrivateKeyInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9AttributeObject))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9ContentType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentDescription))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9DocumentName))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9LocalKeyId))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9MessageDigest))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Pkcs9SigningTime))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.PublicKeyInfo))]
|
||||
@@ -56,15 +42,10 @@
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.RecipientInfoType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampRequest))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampToken))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.Rfc3161TimestampTokenInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignedCms))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfo))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoCollection))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SignerInfoEnumerator))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifier))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKey))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierOrKeyType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Pkcs.SubjectIdentifierType))]
|
||||
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.Xml.X509IssuerSerial))]
|
||||
|
||||
|
||||
@@ -175,7 +175,6 @@
|
||||
<ProjectReference Include="../../System.Transactions/System.Transactions.csproj" />
|
||||
<ProjectReference Include="../../System.Runtime.Serialization/System.Runtime.Serialization.csproj" />
|
||||
<ProjectReference Include="../../System.Data/System.Data.csproj" />
|
||||
<ProjectReference Include="../../System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj" />
|
||||
<ProjectReference Include="../../corlib/corlib.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|
||||
|
||||
@@ -22,13 +22,13 @@ ifeq ($(PROFILE),build)
|
||||
LIB_MCS_FLAGS += -d:SYSTEM_WEB_IMPLEMENTATION
|
||||
else ifeq ($(PROFILE),wasm)
|
||||
LIB_MCS_FLAGS += -d:SYSTEM_WEB_IMPLEMENTATION -unsafe
|
||||
LIB_REFS += System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
LIB_REFS += System.Transactions System.Runtime.Serialization System.Data
|
||||
else ifeq ($(PROFILE),xammac_net_4_5)
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data
|
||||
else ifeq (2.1, $(FRAMEWORK_VERSION))
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
LIB_REFS += System.Web.Services System.Transactions System.Runtime.Serialization System.Data
|
||||
else
|
||||
LIB_REFS += System.Web System.Transactions System.Runtime.Serialization System.Data System.Data.DataSetExtensions
|
||||
LIB_REFS += System.Web System.Transactions System.Runtime.Serialization System.Data
|
||||
endif
|
||||
|
||||
ifneq (,$(filter build net_4_x, $(PROFILE)))
|
||||
|
||||
@@ -764,16 +764,6 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlTypeException))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.SqlXml))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.SqlTypes.StorageState))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowComparer))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowComparer<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataRowExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.DataTableExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollection))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollection<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.EnumerableRowCollectionExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.OrderedEnumerableRowCollection<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.TypedTableBase<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Data.TypedTableBaseExtensions))]
|
||||
#endif
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.BooleanSwitch))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.ConditionalAttribute))]
|
||||
@@ -831,15 +821,6 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.TraceSwitch))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.SuppressMessageAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.AllowNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DisallowNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.MaybeNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.MaybeNullWhenAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullWhenAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.DoesNotReturnIfAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.Contract))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractAbbreviatorAttribute))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Diagnostics.Contracts.ContractArgumentValidatorAttribute))]
|
||||
@@ -2462,9 +2443,6 @@
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySpanAction<,>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequence<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ReadOnlySequenceSegment<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ArrayBufferWriter<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SequenceReader<>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SequenceReaderExtensions))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.SpanAction<,>))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.StandardFormat))]
|
||||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.Binary.BinaryPrimitives))]
|
||||
|
||||
@@ -77,7 +77,6 @@ mobile_common_dirs_parallel := \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
System.Data \
|
||||
System.Data.DataSetExtensions \
|
||||
Mono.Data.Sqlite \
|
||||
System.Data.Services.Client \
|
||||
System.IO.Compression \
|
||||
@@ -180,7 +179,6 @@ wasm_dirs_parallel := \
|
||||
System.ServiceModel.Internals \
|
||||
System.Runtime.Serialization \
|
||||
System.Data \
|
||||
System.Data.DataSetExtensions \
|
||||
System.Xml.Linq \
|
||||
System.Numerics \
|
||||
System.Numerics.Vectors \
|
||||
@@ -215,7 +213,6 @@ xammac_4_5_dirs_parallel := \
|
||||
System.Transactions \
|
||||
System.EnterpriseServices \
|
||||
System.Data \
|
||||
System.Data.DataSetExtensions \
|
||||
System.Runtime.Serialization \
|
||||
System.Xml.Linq \
|
||||
Mono.Data.Sqlite \
|
||||
|
||||
@@ -307,15 +307,8 @@ namespace Mono.Debugger.Soft
|
||||
public bool Subclasses {
|
||||
get; set;
|
||||
}
|
||||
public bool NotFilteredFeature {
|
||||
get; set;
|
||||
}
|
||||
public bool EverythingElse {
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AssemblyModifier : Modifier {
|
||||
public long[] Assemblies {
|
||||
get; set;
|
||||
@@ -436,7 +429,7 @@ namespace Mono.Debugger.Soft
|
||||
* with newer runtimes, and vice versa.
|
||||
*/
|
||||
internal const int MAJOR_VERSION = 2;
|
||||
internal const int MINOR_VERSION = 54;
|
||||
internal const int MINOR_VERSION = 53;
|
||||
|
||||
enum WPSuspendPolicy {
|
||||
NONE = 0,
|
||||
@@ -1318,8 +1311,6 @@ namespace Mono.Debugger.Soft
|
||||
protected abstract int TransportSend (byte[] buf, int buf_offset, int len);
|
||||
protected abstract void TransportSetTimeouts (int send_timeout, int receive_timeout);
|
||||
protected abstract void TransportClose ();
|
||||
// Shutdown breaks all communication, resuming blocking waits
|
||||
protected abstract void TransportShutdown ();
|
||||
|
||||
internal VersionInfo Version;
|
||||
|
||||
@@ -1436,7 +1427,6 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
internal void Close () {
|
||||
closed = true;
|
||||
TransportShutdown ();
|
||||
}
|
||||
|
||||
internal bool IsClosed {
|
||||
@@ -2642,10 +2632,6 @@ namespace Mono.Debugger.Soft
|
||||
} else if (!em.Subclasses) {
|
||||
throw new NotSupportedException ("This request is not supported by the protocol version implemented by the debuggee.");
|
||||
}
|
||||
if (Version.MajorVersion > 2 || Version.MinorVersion >= 54) {
|
||||
w.WriteBool (em.NotFilteredFeature);
|
||||
w.WriteBool (em.EverythingElse);
|
||||
}
|
||||
} else if (mod is AssemblyModifier) {
|
||||
w.WriteByte ((byte)ModifierKind.ASSEMBLY_ONLY);
|
||||
var amod = (mod as AssemblyModifier);
|
||||
@@ -2868,11 +2854,6 @@ namespace Mono.Debugger.Soft
|
||||
{
|
||||
socket.Close ();
|
||||
}
|
||||
|
||||
protected override void TransportShutdown ()
|
||||
{
|
||||
socket.Shutdown (SocketShutdown.Both);
|
||||
}
|
||||
}
|
||||
|
||||
/* This is the interface exposed by the debugger towards the debugger agent */
|
||||
|
||||
@@ -6,9 +6,9 @@ namespace Mono.Debugger.Soft
|
||||
public sealed class ExceptionEventRequest : EventRequest {
|
||||
|
||||
TypeMirror exc_type;
|
||||
bool caught, uncaught, subclasses, not_filtered_feature, everything_else;
|
||||
bool caught, uncaught, subclasses;
|
||||
|
||||
internal ExceptionEventRequest (VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught, bool not_filtered_feature = false, bool everything_else = false) : base (vm, EventType.Exception) {
|
||||
internal ExceptionEventRequest (VirtualMachine vm, TypeMirror exc_type, bool caught, bool uncaught) : base (vm, EventType.Exception) {
|
||||
if (exc_type != null) {
|
||||
CheckMirror (vm, exc_type);
|
||||
TypeMirror exception_type = vm.RootDomain.Corlib.GetType ("System.Exception", false, false);
|
||||
@@ -19,8 +19,6 @@ namespace Mono.Debugger.Soft
|
||||
this.caught = caught;
|
||||
this.uncaught = uncaught;
|
||||
this.subclasses = true;
|
||||
this.not_filtered_feature = not_filtered_feature;
|
||||
this.everything_else = everything_else;
|
||||
}
|
||||
|
||||
public TypeMirror ExceptionType {
|
||||
@@ -43,7 +41,7 @@ namespace Mono.Debugger.Soft
|
||||
|
||||
public override void Enable () {
|
||||
var mods = new List <Modifier> ();
|
||||
mods.Add (new ExceptionModifier () { Type = exc_type != null ? exc_type.Id : 0, Caught = caught, Uncaught = uncaught, Subclasses = subclasses, NotFilteredFeature = not_filtered_feature, EverythingElse = everything_else });
|
||||
mods.Add (new ExceptionModifier () { Type = exc_type != null ? exc_type.Id : 0, Caught = caught, Uncaught = uncaught, Subclasses = subclasses });
|
||||
SendReq (mods);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,11 +150,8 @@ namespace Mono.Debugger.Soft
|
||||
}
|
||||
|
||||
public void Detach () {
|
||||
// Notify the application that we are detaching
|
||||
conn.VM_Dispose ();
|
||||
// Close the connection. No further messages can be sent
|
||||
// over the connection after this point.
|
||||
conn.Close ();
|
||||
conn.VM_Dispose ();
|
||||
notify_vm_event (EventType.VMDisconnect, SuspendPolicy.None, 0, 0, null, 0);
|
||||
}
|
||||
|
||||
@@ -280,13 +277,6 @@ namespace Mono.Debugger.Soft
|
||||
return new ExceptionEventRequest (this, exc_type, caught, uncaught);
|
||||
}
|
||||
|
||||
public ExceptionEventRequest CreateExceptionRequest (TypeMirror exc_type, bool caught, bool uncaught, bool everything_else) {
|
||||
if (Version.AtLeast (2, 54))
|
||||
return new ExceptionEventRequest (this, exc_type, caught, uncaught, true, everything_else);
|
||||
else
|
||||
return new ExceptionEventRequest (this, exc_type, caught, uncaught);
|
||||
}
|
||||
|
||||
public AssemblyLoadEventRequest CreateAssemblyLoadRequest () {
|
||||
return new AssemblyLoadEventRequest (this);
|
||||
}
|
||||
|
||||
@@ -350,17 +350,6 @@ class TestIfaces : ITest
|
||||
}
|
||||
}
|
||||
|
||||
public class RuntimeInvokeWithThrowClass
|
||||
{
|
||||
public RuntimeInvokeWithThrowClass()
|
||||
{
|
||||
}
|
||||
public void RuntimeInvokeThrowMethod()
|
||||
{
|
||||
throw new Exception("thays");
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class DebuggerTaskScheduler : TaskScheduler, IDisposable
|
||||
{
|
||||
private readonly BlockingCollection<Task> _tasks = new BlockingCollection<Task>();
|
||||
@@ -518,10 +507,6 @@ public class Tests : TestsBase, ITest2
|
||||
unhandled_exception_wrapper ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-perform-wait-callback") {
|
||||
unhandled_exception_perform_wait_callback ();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length >0 && args [0] == "unhandled-exception-endinvoke") {
|
||||
unhandled_exception_endinvoke ();
|
||||
return 0;
|
||||
@@ -554,10 +539,6 @@ public class Tests : TestsBase, ITest2
|
||||
run_step_out_void_async();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length > 0 && args [0] == "runtime_invoke_hybrid_exceptions") {
|
||||
runtime_invoke_hybrid_exceptions();
|
||||
return 0;
|
||||
}
|
||||
assembly_load ();
|
||||
breakpoints ();
|
||||
single_stepping ();
|
||||
@@ -603,8 +584,6 @@ public class Tests : TestsBase, ITest2
|
||||
inspect_enumerator_in_generic_struct();
|
||||
if_property_stepping();
|
||||
fixed_size_array();
|
||||
test_new_exception_filter();
|
||||
test_async_debug_generics();
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -616,11 +595,6 @@ public class Tests : TestsBase, ITest2
|
||||
}
|
||||
}
|
||||
|
||||
public class MyException : Exception {
|
||||
public MyException(string message) : base(message) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void if_property_stepping() {
|
||||
var test = new TestClass();
|
||||
if (test.OneLineProperty == "someInvalidValue6049e709-7271-41a1-bc0a-f1f1b80d4125")
|
||||
@@ -853,68 +827,6 @@ public class Tests : TestsBase, ITest2
|
||||
n.Buffer2 = new char4('a', 'b', 'c', 'd');
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void test_new_exception_filter () {
|
||||
test_new_exception_filter1();
|
||||
test_new_exception_filter2();
|
||||
test_new_exception_filter3();
|
||||
test_new_exception_filter4();
|
||||
}
|
||||
|
||||
|
||||
public static void test_new_exception_filter1 () {
|
||||
try {
|
||||
throw new Exception("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void test_new_exception_filter2 () {
|
||||
try {
|
||||
throw new MyException("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void test_new_exception_filter3 () {
|
||||
try {
|
||||
throw new ArgumentException();
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
try {
|
||||
throw new Exception("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
public static void test_new_exception_filter4 () {
|
||||
try {
|
||||
throw new ArgumentException();
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
try {
|
||||
throw new Exception("excp");
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void test_async_debug_generics () {
|
||||
ExecuteAsync_Broken<object>().Wait ();
|
||||
}
|
||||
|
||||
async static Task<T> ExecuteAsync_Broken<T>()
|
||||
{
|
||||
await Task.Delay(2);
|
||||
return default;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void inspect_enumerator_in_generic_struct() {
|
||||
TestEnumeratorInsideGenericStruct<String, String> generic_struct = new TestEnumeratorInsideGenericStruct<String, String>(new KeyValuePair<string, string>("0", "f1"));
|
||||
@@ -1680,24 +1592,6 @@ public class Tests : TestsBase, ITest2
|
||||
public static void unhandled_exception_endinvoke_2 () {
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_perform_wait_callback () {
|
||||
try
|
||||
{
|
||||
var results = ResolveAsync().GetAwaiter().GetResult();
|
||||
}
|
||||
catch (SocketException sockEx)
|
||||
{
|
||||
//Console.WriteLine("correctly handled");
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<List<string>> ResolveAsync()
|
||||
{
|
||||
var addresses = await System.Net.Dns.GetHostAddressesAsync("foo.bar.baz");
|
||||
return new List<string>(addresses.Select(addr => addr.ToString()));
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void unhandled_exception_endinvoke () {
|
||||
Action action = new Action (() =>
|
||||
@@ -2218,16 +2112,6 @@ public class Tests : TestsBase, ITest2
|
||||
public static ref BlittableStruct get_ref_struct() {
|
||||
return ref ref_return_struct;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void runtime_invoke_hybrid_exceptions () {
|
||||
Type rtType = Type.GetType("RuntimeInvokeWithThrowClass");
|
||||
ConstructorInfo rtConstructor = rtType.GetConstructor(Type.EmptyTypes);
|
||||
object rtObject = rtConstructor.Invoke(new object[] { });
|
||||
MethodInfo rtMethod = rtType.GetMethod("RuntimeInvokeThrowMethod");
|
||||
rtMethod.Invoke(rtObject, new object[] { });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class SentinelClass : MarshalByRefObject {
|
||||
|
||||
@@ -1767,7 +1767,7 @@ public class DebuggerTests
|
||||
t = frame.Method.GetParameters ()[7].ParameterType;
|
||||
Assert.AreEqual ("Tests", t.Name);
|
||||
var nested = (from nt in t.GetNestedTypes () where nt.IsNestedPublic select nt).ToArray ();
|
||||
Assert.AreEqual (2, nested.Length);
|
||||
Assert.AreEqual (1, nested.Length);
|
||||
Assert.AreEqual ("NestedClass", nested [0].Name);
|
||||
Assert.IsTrue (t.BaseType.IsAssignableFrom (t));
|
||||
Assert.IsTrue (!t.IsAssignableFrom (t.BaseType));
|
||||
@@ -4233,6 +4233,8 @@ public class DebuggerTests
|
||||
var e = run_until ("unhandled_exception_endinvoke");
|
||||
vm.Resume ();
|
||||
|
||||
var e1 = GetNextEvent (); //this should be the exception
|
||||
vm.Resume ();
|
||||
var e2 = GetNextEvent ();
|
||||
Assert.IsFalse (e2 is ExceptionEvent);
|
||||
|
||||
@@ -4279,23 +4281,6 @@ public class DebuggerTests
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void UnhandledException4 () {
|
||||
vm.Exit (0);
|
||||
|
||||
Start (dtest_app_path, "unhandled-exception-perform-wait-callback");
|
||||
|
||||
var req = vm.CreateExceptionRequest (null, false, true);
|
||||
req.Enable ();
|
||||
|
||||
var e = run_until ("unhandled_exception_perform_wait_callback");
|
||||
vm.Resume ();
|
||||
|
||||
var e2 = GetNextEvent ();
|
||||
Assert.IsTrue (e2 is VMDeathEvent);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GCWhileSuspended () {
|
||||
// Check that objects are kept alive during suspensions
|
||||
@@ -5100,68 +5085,6 @@ public class DebuggerTests
|
||||
Assert.AreEqual("d", min.Value);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestExceptionFilterWin () {
|
||||
Event e = run_until ("test_new_exception_filter1");
|
||||
var req2 = vm.CreateExceptionRequest (vm.RootDomain.Corlib.GetType ("System.Exception"), true, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
Event ev = GetNextEvent ();
|
||||
var l = ev.Thread.GetFrames ()[0].Location;
|
||||
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
req2.Disable ();
|
||||
run_until ("test_new_exception_filter2");
|
||||
req2 = vm.CreateExceptionRequest (null, true, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
ev = GetNextEvent ();
|
||||
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
req2.Disable ();
|
||||
run_until ("test_new_exception_filter3");
|
||||
var req3 = vm.CreateExceptionRequest (vm.RootDomain.Corlib.GetType ("System.ArgumentException"), false, true, false);
|
||||
req3.Enable ();
|
||||
req2 = vm.CreateExceptionRequest (null, true, true, true);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
ev = GetNextEvent ();
|
||||
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
req2.Disable ();
|
||||
req3.Disable ();
|
||||
run_until ("test_new_exception_filter4");
|
||||
req2 = vm.CreateExceptionRequest (null, true, true, true);
|
||||
req2.Enable ();
|
||||
req2 = vm.CreateExceptionRequest (vm.RootDomain.Corlib.GetType ("System.ArgumentException"), false, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
ev = GetNextEvent ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestRuntimeInvokeHybridSuspendExceptions () {
|
||||
TearDown ();
|
||||
Start (dtest_app_path, "runtime_invoke_hybrid_exceptions", forceExit: true);
|
||||
var req2 = vm.CreateExceptionRequest (null, false, true, false);
|
||||
req2.Enable ();
|
||||
vm.Resume ();
|
||||
var ev = GetNextEvent ();
|
||||
Assert.IsInstanceOfType (typeof (ExceptionEvent), ev);
|
||||
vm.Exit (0);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestAsyncDebugGenerics () {
|
||||
Event e = run_until ("test_async_debug_generics");
|
||||
e = step_in_await ("test_async_debug_generics", e);
|
||||
e = step_in_await ("MoveNext", e);
|
||||
e = step_in_await ("MoveNext", e);
|
||||
e = step_in_await ("MoveNext", e);
|
||||
e = step_in_await ("MoveNext", e);
|
||||
}
|
||||
|
||||
#endif
|
||||
} // class DebuggerTests
|
||||
} // namespace
|
||||
@@ -139,7 +139,6 @@ namespace Mono.Attach
|
||||
else {
|
||||
writer.Write ((sbyte)PrimitiveType.PRIM_TYPE_STRING);
|
||||
writer.Write (s);
|
||||
writer.Write ((byte)0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+20
-3
@@ -43,16 +43,33 @@ namespace Mono.Messaging.RabbitMQ {
|
||||
public class RabbitMQMessagingProvider : IMessagingProvider {
|
||||
|
||||
private int txCounter = 0;
|
||||
private readonly Guid localId;
|
||||
private readonly uint localIp;
|
||||
private readonly MessagingContextPool contextPool;
|
||||
|
||||
public RabbitMQMessagingProvider ()
|
||||
{
|
||||
localId = Guid.NewGuid ();
|
||||
localIp = GetLocalIP ();
|
||||
contextPool = new MessagingContextPool (new MessageFactory (this),
|
||||
CreateConnection);
|
||||
}
|
||||
|
||||
private static uint GetLocalIP ()
|
||||
{
|
||||
String strHostName = Dns.GetHostName ();
|
||||
IPHostEntry ipEntry = Dns.GetHostByName (strHostName);
|
||||
foreach (IPAddress ip in ipEntry.AddressList) {
|
||||
if (AddressFamily.InterNetwork == ip.AddressFamily) {
|
||||
byte[] addr = ip.GetAddressBytes ();
|
||||
uint localIP = 0;
|
||||
for (int i = 0; i < 4 && i < addr.Length; i++) {
|
||||
localIP += (uint) (addr[i] << 8 * (3 - i));
|
||||
}
|
||||
return localIP;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public IMessage CreateMessage ()
|
||||
{
|
||||
return new MessageBase ();
|
||||
@@ -61,7 +78,7 @@ namespace Mono.Messaging.RabbitMQ {
|
||||
public IMessageQueueTransaction CreateMessageQueueTransaction ()
|
||||
{
|
||||
Interlocked.Increment (ref txCounter);
|
||||
string txId = localId.ToString () + "_" + txCounter.ToString ();
|
||||
string txId = localIp.ToString () + txCounter.ToString ();
|
||||
|
||||
return new RabbitMQMessageQueueTransaction (txId, contextPool);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ Mono.Unix/UnixPathTest.cs
|
||||
Mono.Unix/UnixSignalTest.cs
|
||||
Mono.Unix/UnixUserTest.cs
|
||||
Mono.Unix.Android/TestHelper.cs
|
||||
Mono.Unix.Native/OFDLockTest.cs
|
||||
Mono.Unix.Native/RealTimeSignumTests.cs
|
||||
Mono.Unix.Native/SocketTest.cs
|
||||
Mono.Unix.Native/StdlibTest.cs
|
||||
@@ -212,25 +212,22 @@ namespace Mono.Unix.Native {
|
||||
[CLSCompliant (false)]
|
||||
public enum FcntlCommand : int {
|
||||
// Form /usr/include/bits/fcntl.h
|
||||
F_DUPFD = 0, // Duplicate file descriptor.
|
||||
F_GETFD = 1, // Get file descriptor flags.
|
||||
F_SETFD = 2, // Set file descriptor flags.
|
||||
F_GETFL = 3, // Get file status flags.
|
||||
F_SETFL = 4, // Set file status flags.
|
||||
F_GETLK = 12, // Get record locking info. [64]
|
||||
F_SETLK = 13, // Set record locking info (non-blocking). [64]
|
||||
F_SETLKW = 14, // Set record locking info (blocking). [64]
|
||||
F_OFD_GETLK = 36, // Get open file description locking info.
|
||||
F_OFD_SETLK = 37, // Set open file description locking info (non-blocking).
|
||||
F_OFD_SETLKW = 38, // Set open file description locking info (blocking).
|
||||
F_SETOWN = 8, // Set owner of socket (receiver of SIGIO).
|
||||
F_GETOWN = 9, // Get owner of socket (receiver of SIGIO).
|
||||
F_SETSIG = 10, // Set number of signal to be sent.
|
||||
F_GETSIG = 11, // Get number of signal to be sent.
|
||||
F_NOCACHE = 48, // OSX: turn data caching off/on for this fd.
|
||||
F_SETLEASE = 1024, // Set a lease.
|
||||
F_GETLEASE = 1025, // Enquire what lease is active.
|
||||
F_NOTIFY = 1026, // Required notifications on a directory
|
||||
F_DUPFD = 0, // Duplicate file descriptor.
|
||||
F_GETFD = 1, // Get file descriptor flags.
|
||||
F_SETFD = 2, // Set file descriptor flags.
|
||||
F_GETFL = 3, // Get file status flags.
|
||||
F_SETFL = 4, // Set file status flags.
|
||||
F_GETLK = 12, // Get record locking info. [64]
|
||||
F_SETLK = 13, // Set record locking info (non-blocking). [64]
|
||||
F_SETLKW = 14, // Set record locking info (blocking). [64]
|
||||
F_SETOWN = 8, // Set owner of socket (receiver of SIGIO).
|
||||
F_GETOWN = 9, // Get owner of socket (receiver of SIGIO).
|
||||
F_SETSIG = 10, // Set number of signal to be sent.
|
||||
F_GETSIG = 11, // Get number of signal to be sent.
|
||||
F_NOCACHE = 48, // OSX: turn data caching off/on for this fd.
|
||||
F_SETLEASE = 1024, // Set a lease.
|
||||
F_GETLEASE = 1025, // Enquire what lease is active.
|
||||
F_NOTIFY = 1026, // Required notifications on a directory
|
||||
}
|
||||
|
||||
[Map]
|
||||
|
||||
@@ -1,133 +0,0 @@
|
||||
//
|
||||
// Tests for FcntlCommand.F_OFD_{GETLK,SETLK,SETLKW}
|
||||
//
|
||||
// Authors:
|
||||
// Steffen Kiess ([email protected])
|
||||
//
|
||||
// Copyright (C) 2019 Steffen Kiess
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
using Mono.Unix;
|
||||
using Mono.Unix.Native;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.Mono.Unix.Native
|
||||
{
|
||||
[TestFixture, Category ("NotDotNet"), Category ("NotOnWindows"), Category ("NotOnMac")]
|
||||
public class OFDLockTest {
|
||||
|
||||
string TempFolder;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp ()
|
||||
{
|
||||
TempFolder = Path.Combine (Path.GetTempPath (), this.GetType ().FullName);
|
||||
|
||||
if (Directory.Exists (TempFolder))
|
||||
Directory.Delete (TempFolder, true);
|
||||
|
||||
Directory.CreateDirectory (TempFolder);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
if (Directory.Exists (TempFolder))
|
||||
Directory.Delete (TempFolder, true);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestOFDLock ()
|
||||
{
|
||||
int fd1 = Syscall.open (TempFolder + "/testfile", OpenFlags.O_RDWR | OpenFlags.O_CREAT | OpenFlags.O_EXCL, FilePermissions.DEFFILEMODE);
|
||||
if (fd1 < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
int fd2 = Syscall.open (TempFolder + "/testfile", OpenFlags.O_RDWR);
|
||||
if (fd2 < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
int fd3 = Syscall.open (TempFolder + "/testfile", OpenFlags.O_RDWR);
|
||||
if (fd3 < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
|
||||
// Get read lock for first 100 bytes on fd1
|
||||
var flock1 = new Flock {
|
||||
l_type = LockType.F_RDLCK,
|
||||
l_whence = SeekFlags.SEEK_SET,
|
||||
l_start = 0,
|
||||
l_len = 100,
|
||||
};
|
||||
if (Syscall.fcntl (fd1, FcntlCommand.F_OFD_SETLKW, ref flock1) < 0) {
|
||||
// Old kernels and non-linux systems should return EINVAL
|
||||
if (Stdlib.GetLastError () == Errno.EINVAL)
|
||||
Assert.Ignore ("F_OFD_SETLKW does not seem to be supported.");
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
}
|
||||
|
||||
// Get read lock for first 100 bytes on fd2
|
||||
var flock2 = new Flock {
|
||||
l_type = LockType.F_RDLCK,
|
||||
l_whence = SeekFlags.SEEK_SET,
|
||||
l_start = 0,
|
||||
l_len = 100,
|
||||
};
|
||||
if (Syscall.fcntl (fd2, FcntlCommand.F_OFD_SETLK, ref flock2) < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
|
||||
// Get write lock for remaining bytes on fd1
|
||||
var flock3 = new Flock {
|
||||
l_type = LockType.F_WRLCK,
|
||||
l_whence = SeekFlags.SEEK_SET,
|
||||
l_start = 100,
|
||||
l_len = 0,
|
||||
};
|
||||
if (Syscall.fcntl (fd1, FcntlCommand.F_OFD_SETLK, ref flock3) < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
|
||||
// Close fd3, should not release lock
|
||||
if (Syscall.close (fd3) < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
|
||||
// Get lock status for byte 150 from fd2
|
||||
var flock4 = new Flock {
|
||||
l_type = LockType.F_RDLCK,
|
||||
l_whence = SeekFlags.SEEK_SET,
|
||||
l_start = 150,
|
||||
l_len = 1,
|
||||
};
|
||||
if (Syscall.fcntl (fd2, FcntlCommand.F_OFD_GETLK, ref flock4) < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
// There should be a conflicting write lock
|
||||
Assert.AreEqual (LockType.F_WRLCK, flock4.l_type);
|
||||
|
||||
// Get write byte 0 on fd1, should fail with EAGAIN
|
||||
var flock5 = new Flock {
|
||||
l_type = LockType.F_WRLCK,
|
||||
l_whence = SeekFlags.SEEK_SET,
|
||||
l_start = 0,
|
||||
l_len = 1,
|
||||
};
|
||||
var res = Syscall.fcntl (fd1, FcntlCommand.F_OFD_SETLK, ref flock5);
|
||||
Assert.AreEqual (-1, res);
|
||||
Assert.AreEqual (Errno.EAGAIN, Stdlib.GetLastError ());
|
||||
|
||||
if (Syscall.close (fd1) < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
if (Syscall.close (fd2) < 0)
|
||||
UnixMarshal.ThrowExceptionForLastError ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vim: noexpandtab
|
||||
// Local Variables:
|
||||
// tab-width: 4
|
||||
// c-basic-offset: 4
|
||||
// indent-tabs-mode: t
|
||||
// End:
|
||||
@@ -172,7 +172,6 @@ namespace Mono.Profiler.Log {
|
||||
Debugger = 13,
|
||||
Handle = 14,
|
||||
Ephemeron = 15,
|
||||
Toggleref = 16,
|
||||
}
|
||||
|
||||
// mono/profiler/log.h : MonoProfilerMonitorEvent
|
||||
|
||||
@@ -96,6 +96,14 @@ namespace Mono.Security.Interface
|
||||
ValidationResult ValidateCertificate (string targetHost, bool serverMode, X509CertificateCollection certificates);
|
||||
}
|
||||
|
||||
internal interface ICertificateValidator2 : ICertificateValidator
|
||||
{
|
||||
/*
|
||||
* Internal use only.
|
||||
*/
|
||||
ValidationResult ValidateCertificate (string targetHost, bool serverMode, X509Certificate leaf, X509Chain chain);
|
||||
}
|
||||
|
||||
public static class CertificateValidationHelper
|
||||
{
|
||||
const string SecurityLibrary = "/System/Library/Frameworks/Security.framework/Security";
|
||||
|
||||
@@ -42,11 +42,59 @@ namespace Mono.Security.Interface
|
||||
get;
|
||||
}
|
||||
|
||||
void AuthenticateAsClient (string targetHost);
|
||||
|
||||
void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation);
|
||||
|
||||
void AuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
|
||||
|
||||
IAsyncResult BeginAuthenticateAsClient (string targetHost, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
IAsyncResult BeginAuthenticateAsClient (string targetHost, X509CertificateCollection clientCertificates, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
void EndAuthenticateAsClient (IAsyncResult asyncResult);
|
||||
|
||||
void AuthenticateAsServer (X509Certificate serverCertificate);
|
||||
|
||||
void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation);
|
||||
|
||||
void AuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
|
||||
|
||||
IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
IAsyncResult BeginAuthenticateAsServer (X509Certificate serverCertificate, bool clientCertificateRequired, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
void EndAuthenticateAsServer (IAsyncResult asyncResult);
|
||||
|
||||
Task AuthenticateAsClientAsync (string targetHost);
|
||||
|
||||
Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, bool checkCertificateRevocation);
|
||||
|
||||
Task AuthenticateAsClientAsync (string targetHost, X509CertificateCollection clientCertificates, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
|
||||
|
||||
Task AuthenticateAsServerAsync (X509Certificate serverCertificate);
|
||||
|
||||
Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, bool checkCertificateRevocation);
|
||||
|
||||
Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
|
||||
|
||||
Task<int> ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken);
|
||||
int Read (byte[] buffer, int offset, int count);
|
||||
|
||||
void Write (byte[] buffer);
|
||||
|
||||
void Write (byte[] buffer, int offset, int count);
|
||||
|
||||
IAsyncResult BeginRead (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
int EndRead (IAsyncResult asyncResult);
|
||||
|
||||
IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback asyncCallback, object asyncState);
|
||||
|
||||
void EndWrite (IAsyncResult asyncResult);
|
||||
|
||||
Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken);
|
||||
|
||||
@@ -167,5 +215,12 @@ namespace Mono.Security.Interface
|
||||
|
||||
Task RenegotiateAsync (CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
interface IMonoSslStream2 : IMonoSslStream
|
||||
{
|
||||
Task AuthenticateAsClientAsync (IMonoSslClientAuthenticationOptions sslClientAuthenticationOptions, CancellationToken cancellationToken);
|
||||
|
||||
Task AuthenticateAsServerAsync (IMonoSslServerAuthenticationOptions sslServerAuthenticationOptions, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,6 +121,10 @@ namespace Mono.Security.Interface
|
||||
Stream innerStream, bool leaveInnerStreamOpen,
|
||||
MonoTlsSettings settings = null);
|
||||
|
||||
internal abstract IMonoSslStream CreateSslStreamInternal (
|
||||
SslStream sslStream, Stream innerStream, bool leaveInnerStreamOpen,
|
||||
MonoTlsSettings settings);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Native Certificate Implementation
|
||||
@@ -129,6 +133,34 @@ namespace Mono.Security.Interface
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
internal virtual X509Certificate2Impl GetNativeCertificate (
|
||||
byte[] data, string password, X509KeyStorageFlags flags)
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
internal virtual X509Certificate2Impl GetNativeCertificate (
|
||||
X509Certificate certificate)
|
||||
{
|
||||
throw new InvalidOperationException ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Certificate Validation
|
||||
/*
|
||||
* If @serverMode is true, then we're a server and want to validate a certificate
|
||||
* that we received from a client.
|
||||
*
|
||||
* On OS X and Mobile, the @chain will be initialized with the @certificates, but not actually built.
|
||||
*
|
||||
* Returns `true` if certificate validation has been performed and `false` to invoke the
|
||||
* default system validator.
|
||||
*/
|
||||
internal abstract bool ValidateCertificate (
|
||||
ICertificateValidator2 validator, string targetHost, bool serverMode,
|
||||
X509CertificateCollection certificates, bool wantsChain, ref X509Chain chain,
|
||||
ref MonoSslPolicyErrors errors, ref int status11);
|
||||
#endregion
|
||||
|
||||
#region Misc
|
||||
|
||||
@@ -183,10 +183,9 @@ namespace Mono.Security.Interface
|
||||
* - 1: everything up until May 2018
|
||||
* - 2: the new ServicePointScheduler changes have landed
|
||||
* - 3: full support for Client Certificates
|
||||
* - 4: Legacy TLS Removal
|
||||
*
|
||||
*/
|
||||
internal const int InternalVersion = 4;
|
||||
internal const int InternalVersion = 3;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
// Transport Security Layer (TLS)
|
||||
// Copyright (c) 2003-2004 Carlos Guzman Alvarez
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
using Mono.Security.Protocol.Tls;
|
||||
|
||||
namespace Mono.Security.Protocol.Tls.Handshake.Client
|
||||
{
|
||||
internal class TlsClientCertificate : HandshakeMessage
|
||||
{
|
||||
private bool clientCertSelected;
|
||||
private X509Certificate clientCert;
|
||||
|
||||
#region Constructors
|
||||
|
||||
public TlsClientCertificate(Context context)
|
||||
: base(context, HandshakeType.Certificate)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public X509Certificate ClientCertificate {
|
||||
get {
|
||||
if (!clientCertSelected)
|
||||
{
|
||||
GetClientCertificate ();
|
||||
clientCertSelected = true;
|
||||
}
|
||||
return clientCert;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
private void GetClientCertificate ()
|
||||
{
|
||||
// TODO: Client certificate selection is unfinished
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
// note: the server may ask for mutual authentication
|
||||
// but may not require it (i.e. it can be optional).
|
||||
if (context.ClientSettings.Certificates != null &&
|
||||
context.ClientSettings.Certificates.Count > 0)
|
||||
{
|
||||
clientCert = context.SslStream.RaiseClientCertificateSelection(
|
||||
this.Context.ClientSettings.Certificates,
|
||||
new X509Certificate(this.Context.ServerSettings.Certificates[0].RawData),
|
||||
this.Context.ClientSettings.TargetHost,
|
||||
null);
|
||||
// Note: the application code can raise it's
|
||||
// own exception to stop the connection too.
|
||||
}
|
||||
|
||||
// Update the selected client certificate
|
||||
context.ClientSettings.ClientCertificate = clientCert;
|
||||
}
|
||||
|
||||
private void SendCertificates ()
|
||||
{
|
||||
TlsStream chain = new TlsStream ();
|
||||
|
||||
X509Certificate currentCert = this.ClientCertificate;
|
||||
while (currentCert != null) {
|
||||
byte[] rawCert = currentCert.GetRawCertData ();
|
||||
chain.WriteInt24 (rawCert.Length);
|
||||
chain.Write(rawCert);
|
||||
currentCert = FindParentCertificate (currentCert);
|
||||
}
|
||||
this.WriteInt24 ((int)chain.Length);
|
||||
this.Write (chain.ToArray ());
|
||||
}
|
||||
|
||||
protected override void ProcessAsSsl3()
|
||||
{
|
||||
if (this.ClientCertificate != null) {
|
||||
SendCertificates ();
|
||||
} else {
|
||||
// an Alert warning for NoCertificate (41)
|
||||
// should be sent from here - but that would
|
||||
// break the current message handling
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ProcessAsTls1()
|
||||
{
|
||||
if (this.ClientCertificate != null) {
|
||||
SendCertificates ();
|
||||
} else {
|
||||
// return message with empty certificate (see 7.4.6 in RFC2246)
|
||||
this.WriteInt24 (0);
|
||||
}
|
||||
}
|
||||
|
||||
private X509Certificate FindParentCertificate (X509Certificate cert)
|
||||
{
|
||||
#pragma warning disable 618
|
||||
// This certificate is the root certificate
|
||||
if (cert.GetName () == cert.GetIssuerName ())
|
||||
return null;
|
||||
|
||||
foreach (X509Certificate certificate in this.Context.ClientSettings.Certificates) {
|
||||
if (certificate.GetName () == cert.GetIssuerName ())
|
||||
return certificate;
|
||||
}
|
||||
return null;
|
||||
#pragma warning restore 618
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
// Transport Security Layer (TLS)
|
||||
// Copyright (c) 2003-2004 Carlos Guzman Alvarez
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
using System.Security.Cryptography;
|
||||
using Mono.Security.Cryptography;
|
||||
|
||||
namespace Mono.Security.Protocol.Tls.Handshake.Client
|
||||
{
|
||||
internal class TlsClientCertificateVerify : HandshakeMessage
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public TlsClientCertificateVerify(Context context)
|
||||
: base(context, HandshakeType.CertificateVerify)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void ProcessAsSsl3()
|
||||
{
|
||||
AsymmetricAlgorithm privKey = null;
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
privKey = context.SslStream.RaisePrivateKeySelection(
|
||||
context.ClientSettings.ClientCertificate,
|
||||
context.ClientSettings.TargetHost);
|
||||
|
||||
if (privKey == null)
|
||||
{
|
||||
throw new TlsException(AlertDescription.UserCancelled, "Client certificate Private Key unavailable.");
|
||||
}
|
||||
else
|
||||
{
|
||||
SslHandshakeHash hash = new SslHandshakeHash(context.MasterSecret);
|
||||
hash.TransformFinalBlock(
|
||||
context.HandshakeMessages.ToArray(),
|
||||
0,
|
||||
(int)context.HandshakeMessages.Length);
|
||||
|
||||
// CreateSignature uses ((RSA)privKey).DecryptValue which is not implemented
|
||||
// in RSACryptoServiceProvider. Other implementations likely implement DecryptValue
|
||||
// so we will try the CreateSignature method.
|
||||
byte[] signature = null;
|
||||
if (!(privKey is RSACryptoServiceProvider))
|
||||
{
|
||||
try
|
||||
{
|
||||
signature = hash.CreateSignature((RSA)privKey);
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{ }
|
||||
}
|
||||
// If DecryptValue is not implemented, then try to export the private
|
||||
// key and let the RSAManaged class do the DecryptValue
|
||||
if (signature == null)
|
||||
{
|
||||
// RSAManaged of the selected ClientCertificate
|
||||
// (at this moment the first one)
|
||||
RSA rsa = this.getClientCertRSA((RSA)privKey);
|
||||
|
||||
// Write message
|
||||
signature = hash.CreateSignature(rsa);
|
||||
}
|
||||
this.Write((short)signature.Length);
|
||||
this.Write(signature, 0, signature.Length);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ProcessAsTls1()
|
||||
{
|
||||
AsymmetricAlgorithm privKey = null;
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
privKey = context.SslStream.RaisePrivateKeySelection(
|
||||
context.ClientSettings.ClientCertificate,
|
||||
context.ClientSettings.TargetHost);
|
||||
|
||||
if (privKey == null)
|
||||
{
|
||||
throw new TlsException(AlertDescription.UserCancelled, "Client certificate Private Key unavailable.");
|
||||
}
|
||||
else
|
||||
{
|
||||
// Compute handshake messages hash
|
||||
MD5SHA1 hash = new MD5SHA1();
|
||||
hash.ComputeHash(
|
||||
context.HandshakeMessages.ToArray(),
|
||||
0,
|
||||
(int)context.HandshakeMessages.Length);
|
||||
|
||||
// CreateSignature uses ((RSA)privKey).DecryptValue which is not implemented
|
||||
// in RSACryptoServiceProvider. Other implementations likely implement DecryptValue
|
||||
// so we will try the CreateSignature method.
|
||||
byte[] signature = null;
|
||||
if (!(privKey is RSACryptoServiceProvider))
|
||||
{
|
||||
try
|
||||
{
|
||||
signature = hash.CreateSignature((RSA)privKey);
|
||||
}
|
||||
catch (NotImplementedException)
|
||||
{ }
|
||||
}
|
||||
// If DecryptValue is not implemented, then try to export the private
|
||||
// key and let the RSAManaged class do the DecryptValue
|
||||
if (signature == null)
|
||||
{
|
||||
// RSAManaged of the selected ClientCertificate
|
||||
// (at this moment the first one)
|
||||
RSA rsa = this.getClientCertRSA((RSA)privKey);
|
||||
|
||||
// Write message
|
||||
signature = hash.CreateSignature(rsa);
|
||||
}
|
||||
this.Write((short)signature.Length);
|
||||
this.Write(signature, 0, signature.Length);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private methods
|
||||
|
||||
private RSA getClientCertRSA(RSA privKey)
|
||||
{
|
||||
RSAParameters rsaParams = new RSAParameters();
|
||||
RSAParameters privateParams = privKey.ExportParameters(true);
|
||||
|
||||
// for RSA m_publickey contains 2 ASN.1 integers
|
||||
// the modulus and the public exponent
|
||||
ASN1 pubkey = new ASN1 (this.Context.ClientSettings.Certificates[0].GetPublicKey());
|
||||
ASN1 modulus = pubkey [0];
|
||||
if ((modulus == null) || (modulus.Tag != 0x02))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
ASN1 exponent = pubkey [1];
|
||||
if (exponent.Tag != 0x02)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
rsaParams.Modulus = this.getUnsignedBigInteger(modulus.Value);
|
||||
rsaParams.Exponent = exponent.Value;
|
||||
|
||||
// Set private key parameters
|
||||
rsaParams.D = privateParams.D;
|
||||
rsaParams.DP = privateParams.DP;
|
||||
rsaParams.DQ = privateParams.DQ;
|
||||
rsaParams.InverseQ = privateParams.InverseQ;
|
||||
rsaParams.P = privateParams.P;
|
||||
rsaParams.Q = privateParams.Q;
|
||||
|
||||
// BUG: MS BCL 1.0 can't import a key which
|
||||
// isn't the same size as the one present in
|
||||
// the container.
|
||||
int keySize = (rsaParams.Modulus.Length << 3);
|
||||
RSAManaged rsa = new RSAManaged(keySize);
|
||||
rsa.ImportParameters (rsaParams);
|
||||
|
||||
return (RSA)rsa;
|
||||
}
|
||||
|
||||
private byte[] getUnsignedBigInteger(byte[] integer)
|
||||
{
|
||||
if (integer [0] == 0x00)
|
||||
{
|
||||
// this first byte is added so we're sure it's an unsigned integer
|
||||
// however we can't feed it into RSAParameters or DSAParameters
|
||||
int length = integer.Length - 1;
|
||||
byte[] uinteger = new byte [length];
|
||||
Buffer.BlockCopy (integer, 1, uinteger, 0, length);
|
||||
return uinteger;
|
||||
}
|
||||
else
|
||||
{
|
||||
return integer;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
// Transport Security Layer (TLS)
|
||||
// Copyright (c) 2003-2004 Carlos Guzman Alvarez
|
||||
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
using Mono.Security.Cryptography;
|
||||
|
||||
namespace Mono.Security.Protocol.Tls.Handshake.Client
|
||||
{
|
||||
internal class TlsClientFinished : HandshakeMessage
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public TlsClientFinished(Context context)
|
||||
: base(context, HandshakeType.Finished)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
this.Reset();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
static private byte[] Ssl3Marker = new byte [4] { 0x43, 0x4c, 0x4e, 0x54 };
|
||||
|
||||
protected override void ProcessAsSsl3()
|
||||
{
|
||||
// Compute handshake messages hashes
|
||||
HashAlgorithm hash = new SslHandshakeHash(this.Context.MasterSecret);
|
||||
|
||||
byte[] data = this.Context.HandshakeMessages.ToArray ();
|
||||
hash.TransformBlock (data, 0, data.Length, data, 0);
|
||||
hash.TransformBlock (Ssl3Marker, 0, Ssl3Marker.Length, Ssl3Marker, 0);
|
||||
// hack to avoid memory allocation
|
||||
hash.TransformFinalBlock (CipherSuite.EmptyArray, 0, 0);
|
||||
|
||||
this.Write (hash.Hash);
|
||||
}
|
||||
|
||||
protected override void ProcessAsTls1()
|
||||
{
|
||||
// Compute handshake messages hash
|
||||
HashAlgorithm hash = new MD5SHA1();
|
||||
|
||||
// note: we could call HashAlgorithm.ComputeHash(Stream) but that would allocate (on Mono)
|
||||
// a 4096 bytes buffer to process the hash - which is bigger than HandshakeMessages
|
||||
byte[] data = this.Context.HandshakeMessages.ToArray ();
|
||||
byte[] digest = hash.ComputeHash (data, 0, data.Length);
|
||||
|
||||
// Write message
|
||||
Write(this.Context.Write.Cipher.PRF(this.Context.MasterSecret, "client finished", digest, 12));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
// Transport Security Layer (TLS)
|
||||
// Copyright (c) 2003-2004 Carlos Guzman Alvarez
|
||||
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace Mono.Security.Protocol.Tls.Handshake.Client
|
||||
{
|
||||
internal class TlsClientHello : HandshakeMessage
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private byte[] random;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public TlsClientHello(Context context)
|
||||
: base(context, HandshakeType.ClientHello)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
base.Update();
|
||||
|
||||
context.ClientRandom = random;
|
||||
context.ClientHelloProtocol = this.Context.Protocol;
|
||||
|
||||
random = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void ProcessAsSsl3()
|
||||
{
|
||||
// Client Version
|
||||
this.Write(this.Context.Protocol);
|
||||
|
||||
// Random bytes - Unix time + Radom bytes [28]
|
||||
TlsStream clientRandom = new TlsStream();
|
||||
clientRandom.Write(this.Context.GetUnixTime());
|
||||
clientRandom.Write(this.Context.GetSecureRandomBytes(28));
|
||||
this.random = clientRandom.ToArray();
|
||||
clientRandom.Reset();
|
||||
|
||||
this.Write(this.random);
|
||||
|
||||
// Session id
|
||||
// Check if we have a cache session we could reuse
|
||||
this.Context.SessionId = ClientSessionCache.FromHost (this.Context.ClientSettings.TargetHost);
|
||||
if (this.Context.SessionId != null)
|
||||
{
|
||||
this.Write((byte)this.Context.SessionId.Length);
|
||||
if (this.Context.SessionId.Length > 0)
|
||||
{
|
||||
this.Write(this.Context.SessionId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Write((byte)0);
|
||||
}
|
||||
|
||||
// Write length of Cipher suites
|
||||
this.Write((short)(this.Context.SupportedCiphers.Count*2));
|
||||
|
||||
// Write Supported Cipher suites
|
||||
for (int i = 0; i < this.Context.SupportedCiphers.Count; i++)
|
||||
{
|
||||
this.Write((short)this.Context.SupportedCiphers[i].Code);
|
||||
}
|
||||
|
||||
// Compression methods length
|
||||
this.Write((byte)1);
|
||||
|
||||
// Compression methods ( 0 = none )
|
||||
this.Write((byte)this.Context.CompressionMethod);
|
||||
}
|
||||
|
||||
protected override void ProcessAsTls1()
|
||||
{
|
||||
ProcessAsSsl3 ();
|
||||
|
||||
// If applicable add the "server_name" extension to the hello message
|
||||
// http://www.ietf.org/rfc/rfc3546.txt
|
||||
string host = Context.ClientSettings.TargetHost;
|
||||
// Our TargetHost might be an address (not a host *name*) - see bug #8553
|
||||
// RFC3546 -> Literal IPv4 and IPv6 addresses are not permitted in "HostName".
|
||||
IPAddress addr;
|
||||
if (IPAddress.TryParse (host, out addr))
|
||||
return;
|
||||
|
||||
TlsStream extensions = new TlsStream ();
|
||||
byte[] server_name = System.Text.Encoding.UTF8.GetBytes (host);
|
||||
extensions.Write ((short) 0x0000); // ExtensionType: server_name (0)
|
||||
extensions.Write ((short) (server_name.Length + 5)); // ServerNameList (length)
|
||||
extensions.Write ((short) (server_name.Length + 3)); // ServerName (length)
|
||||
extensions.Write ((byte) 0x00); // NameType: host_name (0)
|
||||
extensions.Write ((short) server_name.Length); // HostName (length)
|
||||
extensions.Write (server_name); // HostName (UTF8)
|
||||
this.Write ((short) extensions.Length);
|
||||
this.Write (extensions.ToArray ());
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+98
@@ -0,0 +1,98 @@
|
||||
// Transport Security Layer (TLS)
|
||||
// Copyright (c) 2003-2004 Carlos Guzman Alvarez
|
||||
// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
using Mono.Security.Cryptography;
|
||||
|
||||
namespace Mono.Security.Protocol.Tls.Handshake.Client
|
||||
{
|
||||
internal class TlsClientKeyExchange : HandshakeMessage
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
public TlsClientKeyExchange (Context context) :
|
||||
base(context, HandshakeType.ClientKeyExchange)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void ProcessAsSsl3()
|
||||
{
|
||||
// a large chunk of code is common to both SSL3 and TLS1
|
||||
// SSL3 doesn't send the length of the buffer
|
||||
ProcessCommon (false);
|
||||
}
|
||||
|
||||
protected override void ProcessAsTls1()
|
||||
{
|
||||
// a large chunk of code is common to both SSL3 and TLS1
|
||||
// TLS1 does send the length of the buffer
|
||||
ProcessCommon (true);
|
||||
}
|
||||
|
||||
public void ProcessCommon (bool sendLength)
|
||||
{
|
||||
// Compute pre master secret
|
||||
byte[] preMasterSecret = this.Context.Negotiating.Cipher.CreatePremasterSecret ();
|
||||
|
||||
// Create a new RSA key
|
||||
RSA rsa = null;
|
||||
if (this.Context.ServerSettings.ServerKeyExchange)
|
||||
{
|
||||
// this is the case for "exportable" ciphers
|
||||
rsa = new RSAManaged ();
|
||||
rsa.ImportParameters (this.Context.ServerSettings.RsaParameters);
|
||||
}
|
||||
else
|
||||
{
|
||||
rsa = this.Context.ServerSettings.CertificateRSA;
|
||||
}
|
||||
|
||||
// Encrypt premaster_sercret
|
||||
RSAPKCS1KeyExchangeFormatter formatter = new RSAPKCS1KeyExchangeFormatter (rsa);
|
||||
|
||||
// Write the preMasterSecret encrypted
|
||||
byte[] buffer = formatter.CreateKeyExchange (preMasterSecret);
|
||||
if (sendLength)
|
||||
this.Write ((short) buffer.Length);
|
||||
this.Write (buffer);
|
||||
|
||||
// Create master secret
|
||||
this.Context.Negotiating.Cipher.ComputeMasterSecret (preMasterSecret);
|
||||
|
||||
// Create keys
|
||||
this.Context.Negotiating.Cipher.ComputeKeys ();
|
||||
|
||||
// Clear resources
|
||||
rsa.Clear ();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+450
@@ -0,0 +1,450 @@
|
||||
// Transport Security Layer (TLS)
|
||||
// Copyright (c) 2003-2004 Carlos Guzman Alvarez
|
||||
// Copyright (C) 2004, 2006-2010 Novell, Inc (http://www.novell.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Collections;
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Security.Cryptography;
|
||||
using X509Cert = System.Security.Cryptography.X509Certificates;
|
||||
|
||||
using Mono.Security.X509;
|
||||
using Mono.Security.X509.Extensions;
|
||||
|
||||
using Mono.Security.Interface;
|
||||
|
||||
namespace Mono.Security.Protocol.Tls.Handshake.Client
|
||||
{
|
||||
internal class TlsServerCertificate : HandshakeMessage
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private X509CertificateCollection certificates;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public TlsServerCertificate(Context context, byte[] buffer)
|
||||
: base(context, HandshakeType.Certificate, buffer)
|
||||
{
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
public override void Update()
|
||||
{
|
||||
base.Update();
|
||||
this.Context.ServerSettings.Certificates = this.certificates;
|
||||
this.Context.ServerSettings.UpdateCertificateRSA();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected override void ProcessAsSsl3()
|
||||
{
|
||||
this.ProcessAsTls1();
|
||||
}
|
||||
|
||||
protected override void ProcessAsTls1()
|
||||
{
|
||||
this.certificates = new X509CertificateCollection();
|
||||
|
||||
int readed = 0;
|
||||
int length = this.ReadInt24();
|
||||
|
||||
while (readed < length)
|
||||
{
|
||||
// Read certificate length
|
||||
int certLength = ReadInt24();
|
||||
|
||||
// Increment readed
|
||||
readed += 3;
|
||||
|
||||
if (certLength > 0)
|
||||
{
|
||||
// Read certificate data
|
||||
byte[] buffer = this.ReadBytes(certLength);
|
||||
|
||||
// Create a new X509 Certificate
|
||||
X509Certificate certificate = new X509Certificate(buffer);
|
||||
certificates.Add(certificate);
|
||||
|
||||
readed += certLength;
|
||||
|
||||
DebugHelper.WriteLine(
|
||||
String.Format("Server Certificate {0}", certificates.Count),
|
||||
buffer);
|
||||
}
|
||||
}
|
||||
|
||||
this.validateCertificates(certificates);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Methods
|
||||
|
||||
// Note: this method only works for RSA certificates
|
||||
// DH certificates requires some changes - does anyone use one ?
|
||||
private bool checkCertificateUsage (X509Certificate cert)
|
||||
{
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
// certificate extensions are required for this
|
||||
// we "must" accept older certificates without proofs
|
||||
if (cert.Version < 3)
|
||||
return true;
|
||||
|
||||
KeyUsages ku = KeyUsages.none;
|
||||
switch (context.Negotiating.Cipher.ExchangeAlgorithmType)
|
||||
{
|
||||
case ExchangeAlgorithmType.RsaSign:
|
||||
ku = KeyUsages.digitalSignature;
|
||||
break;
|
||||
case ExchangeAlgorithmType.RsaKeyX:
|
||||
ku = KeyUsages.keyEncipherment;
|
||||
break;
|
||||
case ExchangeAlgorithmType.DiffieHellman:
|
||||
ku = KeyUsages.keyAgreement;
|
||||
break;
|
||||
case ExchangeAlgorithmType.Fortezza:
|
||||
return false; // unsupported certificate type
|
||||
}
|
||||
|
||||
KeyUsageExtension kux = null;
|
||||
ExtendedKeyUsageExtension eku = null;
|
||||
|
||||
X509Extension xtn = cert.Extensions ["2.5.29.15"];
|
||||
if (xtn != null)
|
||||
kux = new KeyUsageExtension (xtn);
|
||||
|
||||
xtn = cert.Extensions ["2.5.29.37"];
|
||||
if (xtn != null)
|
||||
eku = new ExtendedKeyUsageExtension (xtn);
|
||||
|
||||
if ((kux != null) && (eku != null))
|
||||
{
|
||||
// RFC3280 states that when both KeyUsageExtension and
|
||||
// ExtendedKeyUsageExtension are present then BOTH should
|
||||
// be valid
|
||||
if (!kux.Support (ku))
|
||||
return false;
|
||||
return (eku.KeyPurpose.Contains ("1.3.6.1.5.5.7.3.1") ||
|
||||
eku.KeyPurpose.Contains ("2.16.840.1.113730.4.1"));
|
||||
}
|
||||
else if (kux != null)
|
||||
{
|
||||
return kux.Support (ku);
|
||||
}
|
||||
else if (eku != null)
|
||||
{
|
||||
// Server Authentication (1.3.6.1.5.5.7.3.1) or
|
||||
// Netscape Server Gated Crypto (2.16.840.1.113730.4)
|
||||
return (eku.KeyPurpose.Contains ("1.3.6.1.5.5.7.3.1") ||
|
||||
eku.KeyPurpose.Contains ("2.16.840.1.113730.4.1"));
|
||||
}
|
||||
|
||||
// last chance - try with older (deprecated) Netscape extensions
|
||||
xtn = cert.Extensions ["2.16.840.1.113730.1.1"];
|
||||
if (xtn != null)
|
||||
{
|
||||
NetscapeCertTypeExtension ct = new NetscapeCertTypeExtension (xtn);
|
||||
return ct.Support (NetscapeCertTypeExtension.CertTypes.SslServer);
|
||||
}
|
||||
|
||||
// if the CN=host (checked later) then we assume this is meant for SSL/TLS
|
||||
// e.g. the new smtp.gmail.com certificate
|
||||
return true;
|
||||
}
|
||||
|
||||
private void validateCertificates(X509CertificateCollection certificates)
|
||||
{
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
AlertDescription description = AlertDescription.BadCertificate;
|
||||
|
||||
#if INSIDE_SYSTEM
|
||||
// This helps the linker to remove a lot of validation code that will never be used since
|
||||
// System.dll will, for OSX and iOS, uses the operating system X.509 certificate validations
|
||||
RemoteValidation (context, description);
|
||||
#else
|
||||
if (context.SslStream.HaveRemoteValidation2Callback)
|
||||
RemoteValidation (context, description);
|
||||
else
|
||||
LocalValidation (context, description);
|
||||
#endif
|
||||
}
|
||||
|
||||
void RemoteValidation (ClientContext context, AlertDescription description)
|
||||
{
|
||||
ValidationResult res = context.SslStream.RaiseServerCertificateValidation2 (certificates);
|
||||
if (res.Trusted)
|
||||
return;
|
||||
|
||||
long error = res.ErrorCode;
|
||||
switch (error) {
|
||||
case 0x800B0101:
|
||||
description = AlertDescription.CertificateExpired;
|
||||
break;
|
||||
case 0x800B010A:
|
||||
description = AlertDescription.UnknownCA;
|
||||
break;
|
||||
case 0x800B0109:
|
||||
description = AlertDescription.UnknownCA;
|
||||
break;
|
||||
default:
|
||||
description = AlertDescription.CertificateUnknown;
|
||||
break;
|
||||
}
|
||||
string err = String.Format ("Invalid certificate received from server. Error code: 0x{0:x}", error);
|
||||
throw new TlsException (description, err);
|
||||
}
|
||||
|
||||
void LocalValidation (ClientContext context, AlertDescription description)
|
||||
{
|
||||
// the leaf is the web server certificate
|
||||
X509Certificate leaf = certificates [0];
|
||||
X509Cert.X509Certificate cert = new X509Cert.X509Certificate (leaf.RawData);
|
||||
|
||||
ArrayList errors = new ArrayList();
|
||||
|
||||
// SSL specific check - not all certificates can be
|
||||
// used to server-side SSL some rules applies after
|
||||
// all ;-)
|
||||
if (!checkCertificateUsage (leaf))
|
||||
{
|
||||
// WinError.h CERT_E_PURPOSE 0x800B0106
|
||||
errors.Add ((int)-2146762490);
|
||||
}
|
||||
|
||||
// SSL specific check - does the certificate match
|
||||
// the host ?
|
||||
if (!checkServerIdentity (leaf))
|
||||
{
|
||||
// WinError.h CERT_E_CN_NO_MATCH 0x800B010F
|
||||
errors.Add ((int)-2146762481);
|
||||
}
|
||||
|
||||
// Note: building and verifying a chain can take much time
|
||||
// so we do it last (letting simple things fails first)
|
||||
|
||||
// Note: In TLS the certificates MUST be in order (and
|
||||
// optionally include the root certificate) so we're not
|
||||
// building the chain using LoadCertificate (it's faster)
|
||||
|
||||
// Note: IIS doesn't seem to send the whole certificate chain
|
||||
// but only the server certificate :-( it's assuming that you
|
||||
// already have this chain installed on your computer. duh!
|
||||
// http://groups.google.ca/groups?q=IIS+server+certificate+chain&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=85058s%24avd%241%40nnrp1.deja.com&rnum=3
|
||||
|
||||
// we must remove the leaf certificate from the chain
|
||||
X509CertificateCollection chain = new X509CertificateCollection (certificates);
|
||||
chain.Remove (leaf);
|
||||
X509Chain verify = new X509Chain (chain);
|
||||
|
||||
bool result = false;
|
||||
|
||||
try
|
||||
{
|
||||
result = verify.Build (leaf);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
|
||||
if (!result)
|
||||
{
|
||||
switch (verify.Status)
|
||||
{
|
||||
case X509ChainStatusFlags.InvalidBasicConstraints:
|
||||
// WinError.h TRUST_E_BASIC_CONSTRAINTS 0x80096019
|
||||
errors.Add ((int)-2146869223);
|
||||
break;
|
||||
|
||||
case X509ChainStatusFlags.NotSignatureValid:
|
||||
// WinError.h TRUST_E_BAD_DIGEST 0x80096010
|
||||
errors.Add ((int)-2146869232);
|
||||
break;
|
||||
|
||||
case X509ChainStatusFlags.NotTimeNested:
|
||||
// WinError.h CERT_E_VALIDITYPERIODNESTING 0x800B0102
|
||||
errors.Add ((int)-2146762494);
|
||||
break;
|
||||
|
||||
case X509ChainStatusFlags.NotTimeValid:
|
||||
// WinError.h CERT_E_EXPIRED 0x800B0101
|
||||
description = AlertDescription.CertificateExpired;
|
||||
errors.Add ((int)-2146762495);
|
||||
break;
|
||||
|
||||
case X509ChainStatusFlags.PartialChain:
|
||||
// WinError.h CERT_E_CHAINING 0x800B010A
|
||||
description = AlertDescription.UnknownCA;
|
||||
errors.Add ((int)-2146762486);
|
||||
break;
|
||||
|
||||
case X509ChainStatusFlags.UntrustedRoot:
|
||||
// WinError.h CERT_E_UNTRUSTEDROOT 0x800B0109
|
||||
description = AlertDescription.UnknownCA;
|
||||
errors.Add ((int)-2146762487);
|
||||
break;
|
||||
|
||||
default:
|
||||
// unknown error
|
||||
description = AlertDescription.CertificateUnknown;
|
||||
errors.Add ((int)verify.Status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int[] certificateErrors = (int[])errors.ToArray(typeof(int));
|
||||
|
||||
if (!context.SslStream.RaiseServerCertificateValidation(
|
||||
cert,
|
||||
certificateErrors))
|
||||
{
|
||||
throw new TlsException(
|
||||
description,
|
||||
"Invalid certificate received from server.");
|
||||
}
|
||||
}
|
||||
|
||||
// RFC2818 - HTTP Over TLS, Section 3.1
|
||||
// http://www.ietf.org/rfc/rfc2818.txt
|
||||
//
|
||||
// 1. if present MUST use subjectAltName dNSName as identity
|
||||
// 1.1. if multiples entries a match of any one is acceptable
|
||||
// 1.2. wildcard * is acceptable
|
||||
// 2. URI may be an IP address -> subjectAltName.iPAddress
|
||||
// 2.1. exact match is required
|
||||
// 3. Use of the most specific Common Name (CN=) in the Subject
|
||||
// 3.1 Existing practice but DEPRECATED
|
||||
private bool checkServerIdentity (X509Certificate cert)
|
||||
{
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
string targetHost = context.ClientSettings.TargetHost;
|
||||
|
||||
X509Extension ext = cert.Extensions ["2.5.29.17"];
|
||||
// 1. subjectAltName
|
||||
if (ext != null)
|
||||
{
|
||||
SubjectAltNameExtension subjectAltName = new SubjectAltNameExtension (ext);
|
||||
// 1.1 - multiple dNSName
|
||||
foreach (string dns in subjectAltName.DNSNames)
|
||||
{
|
||||
// 1.2 TODO - wildcard support
|
||||
if (Match (targetHost, dns))
|
||||
return true;
|
||||
}
|
||||
// 2. ipAddress
|
||||
foreach (string ip in subjectAltName.IPAddresses)
|
||||
{
|
||||
// 2.1. Exact match required
|
||||
if (ip == targetHost)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// 3. Common Name (CN=)
|
||||
return checkDomainName (cert.SubjectName);
|
||||
}
|
||||
|
||||
private bool checkDomainName(string subjectName)
|
||||
{
|
||||
ClientContext context = (ClientContext)this.Context;
|
||||
|
||||
string domainName = String.Empty;
|
||||
Regex search = new Regex(@"CN\s*=\s*([^,]*)");
|
||||
|
||||
MatchCollection elements = search.Matches(subjectName);
|
||||
|
||||
if (elements.Count == 1)
|
||||
{
|
||||
if (elements[0].Success)
|
||||
{
|
||||
domainName = elements[0].Groups[1].Value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
return Match (context.ClientSettings.TargetHost, domainName);
|
||||
}
|
||||
|
||||
// ensure the pattern is valid wrt to RFC2595 and RFC2818
|
||||
// http://www.ietf.org/rfc/rfc2595.txt
|
||||
// http://www.ietf.org/rfc/rfc2818.txt
|
||||
static bool Match (string hostname, string pattern)
|
||||
{
|
||||
// check if this is a pattern
|
||||
int index = pattern.IndexOf ('*');
|
||||
if (index == -1) {
|
||||
// not a pattern, do a direct case-insensitive comparison
|
||||
return (String.Compare (hostname, pattern, true, CultureInfo.InvariantCulture) == 0);
|
||||
}
|
||||
|
||||
// check pattern validity
|
||||
// A "*" wildcard character MAY be used as the left-most name component in the certificate.
|
||||
|
||||
// unless this is the last char (valid)
|
||||
if (index != pattern.Length - 1) {
|
||||
// then the next char must be a dot .'.
|
||||
if (pattern [index + 1] != '.')
|
||||
return false;
|
||||
}
|
||||
|
||||
// only one (A) wildcard is supported
|
||||
int i2 = pattern.IndexOf ('*', index + 1);
|
||||
if (i2 != -1)
|
||||
return false;
|
||||
|
||||
// match the end of the pattern
|
||||
string end = pattern.Substring (index + 1);
|
||||
int length = hostname.Length - end.Length;
|
||||
// no point to check a pattern that is longer than the hostname
|
||||
if (length <= 0)
|
||||
return false;
|
||||
|
||||
if (String.Compare (hostname, length, end, 0, end.Length, true, CultureInfo.InvariantCulture) != 0)
|
||||
return false;
|
||||
|
||||
// special case, we start with the wildcard
|
||||
if (index == 0) {
|
||||
// ensure we hostname non-matched part (start) doesn't contain a dot
|
||||
int i3 = hostname.IndexOf ('.');
|
||||
return ((i3 == -1) || (i3 >= (hostname.Length - end.Length)));
|
||||
}
|
||||
|
||||
// match the start of the pattern
|
||||
string start = pattern.Substring (0, index);
|
||||
return (String.Compare (hostname, 0, start, 0, start.Length, true, CultureInfo.InvariantCulture) == 0);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Loaded 100 of 1248 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user