mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 01:41:18 -10:00
Compare commits
500
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71a7ae4bf0 | ||
|
|
8824ac84fd | ||
|
|
c49104e842 | ||
|
|
071b7259d5 | ||
|
|
742c414bde | ||
|
|
4cd05a7be4 | ||
|
|
b0c434280d | ||
|
|
72fe53a2ee | ||
|
|
900e77c868 | ||
|
|
8082e87c4e | ||
|
|
1635c21e59 | ||
|
|
96e64ad4e6 | ||
|
|
0c200c5125 | ||
|
|
d9e090e867 | ||
|
|
081498393a | ||
|
|
a40e1ae681 | ||
|
|
88c44e26f6 | ||
|
|
b2ad5f34e1 | ||
|
|
7936510ec3 | ||
|
|
6fe343db8c | ||
|
|
4cb6ca5599 | ||
|
|
8ce81f5113 | ||
|
|
dd151fea35 | ||
|
|
32826eb418 | ||
|
|
a2d1aec5d2 | ||
|
|
31c12db374 | ||
|
|
0e49716ff8 | ||
|
|
b8369e630c | ||
|
|
64eacfa900 | ||
|
|
2c8371c221 | ||
|
|
ab2321c1dc | ||
|
|
e9830fac8d | ||
|
|
8027746aea | ||
|
|
71ad5a0771 | ||
|
|
2f74ab393f | ||
|
|
b5fb8dbe6a | ||
|
|
44fe895ab0 | ||
|
|
2017e493a9 | ||
|
|
a592b4b871 | ||
|
|
303122e94a | ||
|
|
088692ff3a | ||
|
|
8d00b7cd8b | ||
|
|
cdb7944e7b | ||
|
|
edb18739cb | ||
|
|
f85a820677 | ||
|
|
1a81bef2bd | ||
|
|
08f4ef6d0c | ||
|
|
8c0f6db26f | ||
|
|
f3d2cc2176 | ||
|
|
7deefe779f | ||
|
|
62a57c687c | ||
|
|
d44a5d3a0b | ||
|
|
01b2e15c06 | ||
|
|
0f47ea5d80 | ||
|
|
9ea350ed3c | ||
|
|
20a641e4a0 | ||
|
|
050340ef1a | ||
|
|
4bed68d073 | ||
|
|
3a93ebd6fe | ||
|
|
9ea6b6a58a | ||
|
|
2a92593837 | ||
|
|
a475b84a3e | ||
|
|
4ef40a91ed | ||
|
|
a6707bfeb9 | ||
|
|
745c8ff20b | ||
|
|
1a2c433b7c | ||
|
|
1317cf06da | ||
|
|
04c01efd49 | ||
|
|
109a61227c | ||
|
|
4e90bb7e69 | ||
|
|
e0fcb6093b | ||
|
|
e3624d356b | ||
|
|
cf5204021b | ||
|
|
b4cfcd5c5e | ||
|
|
5e3e34220c | ||
|
|
81f184c2ad | ||
|
|
60b28b3b56 | ||
|
|
c75a1364c5 | ||
|
|
c6e9369de2 | ||
|
|
edfe20ffc7 | ||
|
|
0fe46d8d35 | ||
|
|
a6ebd5cb38 | ||
|
|
883162e861 | ||
|
|
7d2924adcb | ||
|
|
e2b632e4a7 | ||
|
|
1bfd317362 | ||
|
|
2fdafcf3a4 | ||
|
|
c191dba87d | ||
|
|
726a9134c8 | ||
|
|
b87c271b6f | ||
|
|
e4d69eb248 | ||
|
|
4b4b297450 | ||
|
|
a19aaa31da | ||
|
|
4b620fa84d | ||
|
|
e1ec438c44 | ||
|
|
a5fe7852de | ||
|
|
f41680e395 | ||
|
|
ef05316107 | ||
|
|
1fd0748362 | ||
|
|
66ff74a1f3 | ||
|
|
6358345667 | ||
|
|
ba3b6a169b | ||
|
|
23b8f10cb8 | ||
|
|
58b3ac9ad0 | ||
|
|
21e2ebcb06 | ||
|
|
c8516b2848 | ||
|
|
ed88c509dd | ||
|
|
a6a89a5ef4 | ||
|
|
d23da5628e | ||
|
|
c9a97e5258 | ||
|
|
f8c34dc56b | ||
|
|
4704c85c9d | ||
|
|
9fc4cae875 | ||
|
|
9e377af674 | ||
|
|
653db97098 | ||
|
|
85b34350c6 | ||
|
|
0215d2e331 | ||
|
|
14570f14ac | ||
|
|
ae9335ac21 | ||
|
|
8d69965919 | ||
|
|
05da2da407 | ||
|
|
cc6e927d10 | ||
|
|
6b475d5d00 | ||
|
|
4d9832a399 | ||
|
|
0f1ac3e5bb | ||
|
|
4586c4f091 | ||
|
|
082662cc8a | ||
|
|
4321ba1e3b | ||
|
|
a6f2903d58 | ||
|
|
b278d88a5f | ||
|
|
3d168887a6 | ||
|
|
ff0605fe18 | ||
|
|
d826bebd54 | ||
|
|
f39d652642 | ||
|
|
c4aa327737 | ||
|
|
0a96741f93 | ||
|
|
92bddddd7b | ||
|
|
73eeda130f | ||
|
|
1f0e147cdd | ||
|
|
ed6a63bb25 | ||
|
|
b4c506c304 | ||
|
|
c1498b8d4c | ||
|
|
2ba25542e3 | ||
|
|
e2d8f5ee91 | ||
|
|
e4552f54fb | ||
|
|
61894d4a07 | ||
|
|
bafdd7865f | ||
|
|
bdde94b8e2 | ||
|
|
e7e81a47c9 | ||
|
|
f4567e83dd | ||
|
|
6eea4a18f0 | ||
|
|
fef06df537 | ||
|
|
7fb011aa5a | ||
|
|
0740206254 | ||
|
|
3b19228a66 | ||
|
|
05f2651a12 | ||
|
|
d9db79b4b2 | ||
|
|
5237696f65 | ||
|
|
08bb5660f6 | ||
|
|
55393c2c9b | ||
|
|
c32414966c | ||
|
|
480bef7217 | ||
|
|
dc866c2aad | ||
|
|
f5e1bd3cdf | ||
|
|
71a1a84c19 | ||
|
|
53ade46065 | ||
|
|
6abab691ec | ||
|
|
a5cc4cd9ec | ||
|
|
8bd438f318 | ||
|
|
4ee4d368c6 | ||
|
|
42956f554b | ||
|
|
7a8242ed36 | ||
|
|
d7e84ac6d1 | ||
|
|
87cfaf15ae | ||
|
|
407898621e | ||
|
|
49c5101200 | ||
|
|
423192ed85 | ||
|
|
e92fe19fa6 | ||
|
|
4b718ca1f2 | ||
|
|
a13f5ccbb6 | ||
|
|
09a7317e5a | ||
|
|
ff494e6065 | ||
|
|
b8f747e452 | ||
|
|
e9abb44242 | ||
|
|
c41ee8050e | ||
|
|
9b87a23ee6 | ||
|
|
150d5e209d | ||
|
|
24c2e505a3 | ||
|
|
e586084ae8 | ||
|
|
3d9e4fa7f4 | ||
|
|
11a89a53ab | ||
|
|
0b6dd983dd | ||
|
|
df3b5a26b4 | ||
|
|
ca7352ad24 | ||
|
|
b35c560df3 | ||
|
|
681b514e88 | ||
|
|
dbf98ffc93 | ||
|
|
f25ca77bfe | ||
|
|
e01e43025d | ||
|
|
1821cc8adf | ||
|
|
be446f04f3 | ||
|
|
42cecb6ed2 | ||
|
|
fee6509476 | ||
|
|
f98c1e0087 | ||
|
|
e4a5b4a720 | ||
|
|
cc91b61cea | ||
|
|
aab3dca9fc | ||
|
|
73468eda91 | ||
|
|
fc7b254953 | ||
|
|
ee3da3821b | ||
|
|
a702e4ff02 | ||
|
|
3563bd90dc | ||
|
|
9666bcfae7 | ||
|
|
d33a100961 | ||
|
|
5a65a97c58 | ||
|
|
439091eddf | ||
|
|
6f4fe05209 | ||
|
|
c9dc20f59e | ||
|
|
46f834fda7 | ||
|
|
f5aca4235e | ||
|
|
e55a1a4f62 | ||
|
|
345550fb99 | ||
|
|
207cf805e5 | ||
|
|
9cc751d618 | ||
|
|
147c7972a8 | ||
|
|
46fe5ad3f6 | ||
|
|
ba7c00e4a9 | ||
|
|
9fd95db929 | ||
|
|
1178ab3a1a | ||
|
|
ee5850a2b5 | ||
|
|
5dbc923cb3 | ||
|
|
e8d38961ee | ||
|
|
ba505510f2 | ||
|
|
34dee0ea4e | ||
|
|
d31f6ac4da | ||
|
|
e999846088 | ||
|
|
d0a3fb1b1b | ||
|
|
aa87d3db6d | ||
|
|
6481e8f7a3 | ||
|
|
3d4cd57a52 | ||
|
|
f3f11d1081 | ||
|
|
524a8298d0 | ||
|
|
ec7f4c68f9 | ||
|
|
71070d34c8 | ||
|
|
b3ce5bfa88 | ||
|
|
376c46bcf3 | ||
|
|
2129ac6c28 | ||
|
|
322ba565b6 | ||
|
|
0ccf503f0a | ||
|
|
e6c0cdae0c | ||
|
|
1c5a295082 | ||
|
|
adcd62248d | ||
|
|
487dacce79 | ||
|
|
6a8ca2252b | ||
|
|
384db9e890 | ||
|
|
7236dadd32 | ||
|
|
4c9e28b80a | ||
|
|
090e25ec2d | ||
|
|
47424e34ae | ||
|
|
59a1eade7c | ||
|
|
36e89d52d1 | ||
|
|
3acab49ce7 | ||
|
|
07fee8a91d | ||
|
|
22afdb80e1 | ||
|
|
95101b19fc | ||
|
|
14a3add47f | ||
|
|
11bf192d1a | ||
|
|
c9036e7555 | ||
|
|
33ca3d33e1 | ||
|
|
458d80002d | ||
|
|
52674e238a | ||
|
|
ff6294d231 | ||
|
|
675f1eb321 | ||
|
|
e20956305e | ||
|
|
5470386775 | ||
|
|
6f24832646 | ||
|
|
400fb9c2cb | ||
|
|
61eb2be2e1 | ||
|
|
9719635e58 | ||
|
|
28cae98ef0 | ||
|
|
ffdffa54f2 | ||
|
|
a1a4bcc49d | ||
|
|
7ffcaaf59a | ||
|
|
720767a9ff | ||
|
|
1587c49f5f | ||
|
|
14b736e942 | ||
|
|
04b9e5cb8f | ||
|
|
1669812689 | ||
|
|
b55d8f9700 | ||
|
|
0f8aac3c62 | ||
|
|
57b6c8775b | ||
|
|
5c87445310 | ||
|
|
cfba7c550f | ||
|
|
47bca852c1 | ||
|
|
5db64e27e9 | ||
|
|
d6f3de3c4c | ||
|
|
7fd24a40bb | ||
|
|
83a898d25b | ||
|
|
c8e19bec68 | ||
|
|
e7b98d3587 | ||
|
|
0beb9611df | ||
|
|
a74416d950 | ||
|
|
3891fe97d2 | ||
|
|
2ff93e4c76 | ||
|
|
56f397bef3 | ||
|
|
60f081c077 | ||
|
|
f46d5fda1d | ||
|
|
ed7432d988 | ||
|
|
06673e723e | ||
|
|
df3837eb7d | ||
|
|
aa9227f7c8 | ||
|
|
970d695718 | ||
|
|
6bf2c17f34 | ||
|
|
9f5e38229e | ||
|
|
de359d4930 | ||
|
|
e19914fe69 | ||
|
|
ac1a12f997 | ||
|
|
47199fede8 | ||
|
|
f8266639ea | ||
|
|
ba69304049 | ||
|
|
5562065e73 | ||
|
|
84221f04b5 | ||
|
|
61a103f371 | ||
|
|
afcafb6c5e | ||
|
|
c454cb92eb | ||
|
|
e76fb5dbf9 | ||
|
|
6dc5295ed0 | ||
|
|
b0e7a1e4f9 | ||
|
|
15a8c2a7fa | ||
|
|
d0f27ce4fe | ||
|
|
ea50ca48ba | ||
|
|
1310043953 | ||
|
|
2eca6a1e37 | ||
|
|
7bc25cef6d | ||
|
|
d2539babf4 | ||
|
|
b637c1db67 | ||
|
|
7e65a73d4d | ||
|
|
96fa4e8c6f | ||
|
|
57c6b81b96 | ||
|
|
64ad646066 | ||
|
|
97bf0a1bcc | ||
|
|
0dc19600d1 | ||
|
|
e391861c01 | ||
|
|
9cefdf59ad | ||
|
|
a93e4712ec | ||
|
|
943a2760ec | ||
|
|
1fe3d7eda6 | ||
|
|
51bc81919f | ||
|
|
620d7cf84d | ||
|
|
f96ba075a1 | ||
|
|
88dde8b763 | ||
|
|
a1e16d3273 | ||
|
|
6d9c1359ec | ||
|
|
7d88d4d502 | ||
|
|
fb67916c0f | ||
|
|
079acc2fb8 | ||
|
|
3ddcbda8b6 | ||
|
|
acc8c0c696 | ||
|
|
256eda8c7f | ||
|
|
0e05bda235 | ||
|
|
3142396c3c | ||
|
|
8ae9708e87 | ||
|
|
97dd6cf04c | ||
|
|
93c18d6fd1 | ||
|
|
d6d74e819f | ||
|
|
a65b7af6d5 | ||
|
|
a778c46362 | ||
|
|
ef422d9cb7 | ||
|
|
cd2e0e8f7a | ||
|
|
80b1e103cb | ||
|
|
7704bd1b92 | ||
|
|
fd44435a84 | ||
|
|
d1fc2ffa84 | ||
|
|
4cefdcb7ce | ||
|
|
5cbb1f4be8 | ||
|
|
3d83c7429e | ||
|
|
612f2a8e88 | ||
|
|
17bba9e7dd | ||
|
|
2befdcfa52 | ||
|
|
1462208991 | ||
|
|
ed6b8024b0 | ||
|
|
a6c4eafee8 | ||
|
|
74567a0a34 | ||
|
|
4be2a9a207 | ||
|
|
d1db937e78 | ||
|
|
3dabeddfc6 | ||
|
|
121928d29a | ||
|
|
12bc4717fd | ||
|
|
a131e9bbb0 | ||
|
|
63f155ac46 | ||
|
|
b99ea70e43 | ||
|
|
84839ab297 | ||
|
|
ae9192f96f | ||
|
|
269d509e42 | ||
|
|
e67673fac8 | ||
|
|
cc720b83aa | ||
|
|
5a5e092a53 | ||
|
|
a3fbb64493 | ||
|
|
186f9cd8c4 | ||
|
|
4590bf6cac | ||
|
|
f965e5d3e8 | ||
|
|
55a3c10e72 | ||
|
|
92047c453f | ||
|
|
9d58bc1d12 | ||
|
|
59554712cc | ||
|
|
8511ae20f0 | ||
|
|
83cac0306c | ||
|
|
4e8ead7caf | ||
|
|
42c5ccc298 | ||
|
|
b816189b94 | ||
|
|
a79c4d11a4 | ||
|
|
91d3d63858 | ||
|
|
37ba834ee1 | ||
|
|
467d46f8ab | ||
|
|
85826e5c27 | ||
|
|
e7ef2f3d5f | ||
|
|
174f2f6a70 | ||
|
|
5f58bb0959 | ||
|
|
ea0824cb22 | ||
|
|
8150a38dae | ||
|
|
a3c25e7b4f | ||
|
|
a2f9fb77a3 | ||
|
|
0370372ce3 | ||
|
|
72aa81e901 | ||
|
|
a9a0a1e5b9 | ||
|
|
640ffa7a62 | ||
|
|
d7f5a5fdfe | ||
|
|
9bd1b2e065 | ||
|
|
1454b010ae | ||
|
|
865e955840 | ||
|
|
3834be3d22 | ||
|
|
7356aedc77 | ||
|
|
369806e3e6 | ||
|
|
f13e6ba91a | ||
|
|
b0f0b14023 | ||
|
|
d33ce1c3ec | ||
|
|
376d3acb29 | ||
|
|
b77f757679 | ||
|
|
1b7c7e6075 | ||
|
|
e2241969f5 | ||
|
|
fffeb23239 | ||
|
|
ae4b678b94 | ||
|
|
4d0feffa42 | ||
|
|
6c0bfdc3f3 | ||
|
|
d1735a8356 | ||
|
|
c92a96ccb5 | ||
|
|
9a18b6fd6f | ||
|
|
608c93643e | ||
|
|
59a9af6d7c | ||
|
|
fde058518d | ||
|
|
d6dea097ca | ||
|
|
79db9b2a87 | ||
|
|
6360ccbfe3 | ||
|
|
e333f13710 | ||
|
|
9c1cae02ca | ||
|
|
0c3036abc7 | ||
|
|
b2817e6404 | ||
|
|
c3da0ad518 | ||
|
|
4a15e73429 | ||
|
|
7db2389846 | ||
|
|
f135312b44 | ||
|
|
abc75476d7 | ||
|
|
b6a351c330 | ||
|
|
3e369ba8c9 | ||
|
|
6145a397d6 | ||
|
|
5944e72d72 | ||
|
|
41ba5846b3 | ||
|
|
d62eed676e | ||
|
|
a73e7b8af2 | ||
|
|
9954579c2a | ||
|
|
c66c7814d0 | ||
|
|
18ddc2e45d | ||
|
|
a0d79a4886 | ||
|
|
167913524f | ||
|
|
4c595069e7 | ||
|
|
9dfeb545d5 | ||
|
|
690af29ad9 | ||
|
|
c4136ebd94 | ||
|
|
5b4cd5ce50 | ||
|
|
e917c95053 | ||
|
|
cd190481bd | ||
|
|
e437330808 | ||
|
|
8aa1cdfe17 | ||
|
|
836f453906 | ||
|
|
bdf4790fa0 | ||
|
|
b42845c567 | ||
|
|
10795da1c0 | ||
|
|
f47b7bbf4f | ||
|
|
5d981c2679 | ||
|
|
e8d70c333f | ||
|
|
2f1e2f8132 | ||
|
|
64e2864fef | ||
|
|
1ef7a29836 | ||
|
|
004fd06b96 | ||
|
|
a3f4def8b6 | ||
|
|
280e9d2423 | ||
|
|
165e28ae97 | ||
|
|
2ccd6122bd | ||
|
|
81e305421d | ||
|
|
0d80372173 |
No files matched your search
+4
-1
@@ -10,6 +10,7 @@ mkinstalldirs crlf=input
|
||||
*.sources crlf=input
|
||||
.gitattributes crlf=input
|
||||
*akefile* crlf=input
|
||||
m4/mono-output.m4 crlf=input
|
||||
|
||||
# ensure native line endings on checkout
|
||||
*.c crlf
|
||||
@@ -19,8 +20,10 @@ mkinstalldirs crlf=input
|
||||
*.sln crlf
|
||||
*.*proj* crlf
|
||||
|
||||
*.bat text eol=crlf
|
||||
*.cmd text eol=crlf
|
||||
|
||||
# don't do anything to line-endings. Let CRLFs/LFs go into the repo, and CRLF/LFs on checkout
|
||||
*.bat -crlf
|
||||
*.xml -crlf
|
||||
|
||||
# CRLF Handling
|
||||
|
||||
+2
-1
@@ -116,6 +116,8 @@
|
||||
|
||||
/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
|
||||
@@ -156,6 +158,5 @@
|
||||
/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
|
||||
@@ -139,8 +139,6 @@ llvm/usr/
|
||||
sdks/builds/llvm-*/
|
||||
sdks/builds/android-*/
|
||||
mcs/build/compiler-server.log
|
||||
tools/offsets-tool-py/offtool/
|
||||
tools/offsets-tool-py/clang/__pycache__
|
||||
|
||||
##############################################################################
|
||||
# Arcade output directories
|
||||
|
||||
+10
-50
@@ -2,33 +2,11 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
AM_CFLAGS = $(WERROR_CFLAGS)
|
||||
|
||||
MONOTOUCH_SUBDIRS = $(libgc_dir) mono
|
||||
SUBDIRS = @MONO_SUBDIRS@
|
||||
noinst_SUBDIRS = @MONO_NOINST_SUBDIRS@
|
||||
DIST_SUBDIRS = $(SUBDIRS) m4 netcore
|
||||
|
||||
# Some tools might not build when cross-compiling
|
||||
if CROSS_COMPILING
|
||||
tools_dir =
|
||||
else
|
||||
tools_dir = tools
|
||||
endif
|
||||
|
||||
if ENABLE_MSVC
|
||||
build_with_msvc = msvc
|
||||
build_without_msvc =
|
||||
else
|
||||
build_with_msvc =
|
||||
build_without_msvc = msvc
|
||||
endif
|
||||
|
||||
if ENABLE_NETCORE
|
||||
update_submodules =
|
||||
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
|
||||
if !ENABLE_NETCORE
|
||||
|
||||
all: $(update_submodules)
|
||||
|
||||
@@ -116,30 +94,10 @@ mcs-do-compiler-tests:
|
||||
bootstrap-world: compiler-tests
|
||||
$(MAKE) install
|
||||
|
||||
if INSTALL_MONOTOUCH
|
||||
monotouch-do-build: config.h
|
||||
@list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
|
||||
case "x$$subdir" in \
|
||||
xmono ) target="monotouch-do-build";; \
|
||||
* ) target="all";; \
|
||||
esac; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
|
||||
done;
|
||||
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-build)
|
||||
|
||||
monotouch-do-clean:
|
||||
@list='$(MONOTOUCH_SUBDIRS)'; for subdir in $$list; do \
|
||||
case "x$$subdir" in \
|
||||
xmono ) target="monotouch-do-clean";; \
|
||||
* ) target="clean";; \
|
||||
esac; \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
|
||||
done;
|
||||
(cd runtime && $(MAKE) $(AM_MAKEFLAGS) monotouch-do-clean)
|
||||
|
||||
endif
|
||||
install:
|
||||
for mydir in $(filter-out $(noinst_SUBDIRS),$(SUBDIRS)); do \
|
||||
(cd $${mydir} && ${MAKE} install) \
|
||||
done
|
||||
|
||||
update-csproj:
|
||||
-rm msvc/scripts/order
|
||||
@@ -183,3 +141,5 @@ update-solution-files:
|
||||
|
||||
update-solution-files-with-tests:
|
||||
$(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
|
||||
|
||||
endif
|
||||
+14
-5
@@ -104,12 +104,10 @@ if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Plug in the extension module
|
||||
#
|
||||
# Parse parameters
|
||||
has_ext_mod=false
|
||||
ext_mod_args=''
|
||||
has_disable_boehm=false
|
||||
for PARAM; do
|
||||
if [[ $PARAM =~ "--enable-extension-module" ]] ; then
|
||||
has_ext_mod=true
|
||||
@@ -117,8 +115,14 @@ for PARAM; do
|
||||
ext_mod_args=`echo $PARAM | cut -d= -f2`
|
||||
fi
|
||||
fi
|
||||
if [[ $PARAM =~ "--disable-boehm" ]] ; then
|
||||
has_disable_boehm=true
|
||||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Plug in the extension module
|
||||
#
|
||||
if test x$has_ext_mod = xtrue; then
|
||||
pushd $top_srcdir../mono-extensions/scripts
|
||||
sh ./prepare-repo.sh $ext_mod_args || exit 1
|
||||
@@ -150,7 +154,12 @@ automake $am_opt ||
|
||||
echo "Running autoconf ..."
|
||||
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
|
||||
|
||||
if test -d $srcdir/external/bdwgc; then
|
||||
# Update all submodules recursively to ensure everything is checked out
|
||||
if test -e $srcdir/scripts/update_submodules.sh; then
|
||||
(cd $srcdir && scripts/update_submodules.sh)
|
||||
fi
|
||||
|
||||
if test x$has_disable_boehm = xfalse -a -d $srcdir/external/bdwgc; then
|
||||
echo Running external/bdwgc/autogen.sh ...
|
||||
(cd $srcdir/external/bdwgc ; NOCONFIGURE=1 ./autogen.sh "$@")
|
||||
echo Done running external/bdwgc/autogen.sh ...
|
||||
|
||||
+296
-324
@@ -4,10 +4,10 @@
|
||||
# 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.9.0],
|
||||
AC_INIT(mono, [6.13.0],
|
||||
[https://github.com/mono/mono/issues/new])
|
||||
|
||||
AC_CONFIG_SRCDIR([README.md])
|
||||
AC_CONFIG_SRCDIR([Makefile.am])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
|
||||
AC_CANONICAL_SYSTEM
|
||||
@@ -63,7 +63,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=423e7794-9279-49a3-a477-f1cb2432e9f4
|
||||
MONO_CORLIB_VERSION=1A5E0066-58DC-428A-B21C-0AD6CDAE2789
|
||||
|
||||
#
|
||||
# Put a quoted #define in config.h.
|
||||
@@ -358,6 +358,10 @@ case "$host" in
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=504411
|
||||
disable_munmap=yes
|
||||
;;
|
||||
powerpc*-*-freebsd*)
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=504411
|
||||
disable_munmap=yes
|
||||
;;
|
||||
riscv*)
|
||||
support_boehm=no
|
||||
with_gc=sgen
|
||||
@@ -510,8 +514,8 @@ case "$host" in
|
||||
dnl We still set this for *FLAGS, however, because we may not
|
||||
dnl be setting OBJECT_MODE.
|
||||
LDFLAGS="$LDFLAGS -maix64"
|
||||
CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -D_THREAD_SAFE -D_LARGE_FILES -D_REENTRANT"
|
||||
libmono_cflags="-D_THREAD_SAFE -D_REENTRANT"
|
||||
CPPFLAGS="$CPPFLAGS -maix64 -DGC_AIX_THREADS -D_ALL_SOURCE -pthread -D_THREAD_SAFE -D_LARGE_FILES -D_REENTRANT"
|
||||
libmono_cflags="-pthread -D_THREAD_SAFE -D_REENTRANT"
|
||||
dnl Would you believe GNU nm doesn't know how to process AIX libraries?
|
||||
dnl Hardcode IBM binutils in case GNU ones end up on our path. Also
|
||||
dnl specifiy 64-bit mode for tools. (OBJECT_MODE is finicky with cmake.)
|
||||
@@ -605,6 +609,7 @@ AC_CHECK_TOOL(CC, gcc, gcc)
|
||||
AC_PROG_CC
|
||||
AC_CHECK_TOOL(CXX, g++, g++)
|
||||
AC_PROG_CXX
|
||||
AM_PATH_PYTHON([3.2])
|
||||
AM_PROG_AS
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_AWK
|
||||
@@ -672,7 +677,7 @@ AC_PROG_LD_GNU
|
||||
AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h sys/utime.h semaphore.h sys/un.h linux/rtc.h sys/syscall.h sys/mkdev.h sys/uio.h sys/param.h sys/sysctl.h libproc.h sys/prctl.h copyfile.h gnu/lib-names.h)
|
||||
AC_CHECK_HEADERS(sys/param.h sys/socket.h sys/ipc.h sys/utsname.h alloca.h ucontext.h pwd.h sys/select.h netinet/tcp.h netinet/in.h unistd.h sys/types.h link.h asm/sigcontext.h sys/inotify.h arpa/inet.h complex.h unwind.h)
|
||||
|
||||
# zlib/configure checks for unistd.h existance and defines HAVE_UNISTD_H on the compiler
|
||||
# zlib/configure checks for unistd.h existence and defines HAVE_UNISTD_H on the compiler
|
||||
# command line (not config.h) if it is present.
|
||||
AC_CHECK_HEADER(unistd.h,
|
||||
[HAVE_UNISTD_H=1
|
||||
@@ -1206,8 +1211,10 @@ AC_ARG_ENABLE(cxx, [ --enable-cxx compile some code as C++])
|
||||
|
||||
# mono/corefx/native has a lot of invalid C++98 in its headers
|
||||
# dotnet/corefx/native looks a lot better, i.e. 44e5bdafb8d989a220c9cf1b94f31a64a6e4f052
|
||||
# use these C99 print macros in the command line, since glib may not win first inttypes include
|
||||
#CXXFLAGS_COMMON=' -std=gnu++98 -fno-exceptions -fno-rtti '
|
||||
CXXFLAGS_COMMON=' -std=gnu++0x -fno-exceptions -fno-rtti '
|
||||
CXXFLAGS_COMMON="$CXXFLAGS_COMMON -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS"
|
||||
# "c++0x" instead of C++11, for compat with Centos6/gcc4.4
|
||||
|
||||
# -stdlib=libc++ is needed by clang for iOS 6.0 (-miphoneos-version-min=6.0)
|
||||
@@ -1355,7 +1362,9 @@ MONO_LLVM_PATH_OPTION=llvm-path="`pwd`/llvm/usr/bin"
|
||||
|
||||
if test x$cross_compiling = xyes -o x$enable_mcs_build = xno; then
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
elif test x$with_runtime_preset = xnetcore; then
|
||||
fi
|
||||
|
||||
if test x$with_runtime_preset = xnetcore; then
|
||||
# Keep in sync with winconfig.h netcore configuration.
|
||||
DISABLE_MCS_DOCS_default=yes
|
||||
BTLS_SUPPORTED=no
|
||||
@@ -1749,7 +1758,7 @@ AM_CONDITIONAL(ENABLE_STATIC_GCC_LIBS, test "x$enable_static_gcc_libs" = "xyes")
|
||||
AC_ARG_ENABLE(minimal, [ --enable-minimal=LIST drop support for LIST subsystems.
|
||||
LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug, appdomains, verifier, dllmap,
|
||||
reflection_emit, reflection_emit_save, large_code, logging, com, ssa, generics, attach, jit, interpreter, simd, soft_debug, perfcounters, normalization, desktop_loader, shared_perfcounters, remoting,
|
||||
security, lldb, mdb, assert_messages, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads.],
|
||||
security, lldb, mdb, assert_messages, cfgdir_config, cleanup, sgen_marksweep_conc, sgen_split_nursery, sgen_gc_bridge, sgen_debug_helpers, sockets, gac, threads.],
|
||||
[
|
||||
for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
|
||||
eval "mono_feature_disable_$feature='yes'"
|
||||
@@ -1925,6 +1934,11 @@ if test "x$mono_feature_disable_assert_messages" = "xyes"; then
|
||||
AC_MSG_NOTICE([Disabled assertion messages.])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_cfgdir_config" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_CFGDIR_CONFIG, 1, [Disable config directories.])
|
||||
AC_MSG_NOTICE([Disabled config directories.])
|
||||
fi
|
||||
|
||||
if test "x$mono_feature_disable_cleanup" = "xyes"; then
|
||||
AC_DEFINE(DISABLE_CLEANUP, 1, [Disable runtime cleanup.])
|
||||
AC_MSG_NOTICE([Disabled runtime cleanup.])
|
||||
@@ -2031,13 +2045,8 @@ if test "x$support_boehm" = "xyes"; then
|
||||
LIBGC_CPPFLAGS=
|
||||
LIBGC_LIBS=
|
||||
LIBGC_STATIC_LIBS=
|
||||
libgc_dir=
|
||||
case "x$libgc" in
|
||||
xincluded)
|
||||
if test "x$support_boehm" = "xyes"; then
|
||||
libgc_dir=external/bdwgc
|
||||
fi
|
||||
|
||||
LIBGC_CPPFLAGS='-I$(top_srcdir)/external/bdwgc/include -I$(top_srcdir)/external/bdwgc/libatomic_ops/src'
|
||||
LIBGC_LIBS='$(top_builddir)/external/bdwgc/libgc.la'
|
||||
LIBGC_STATIC_LIBS='$(top_builddir)/external/bdwgc/libgc-static.la'
|
||||
@@ -2085,7 +2094,6 @@ if test "x$support_boehm" = "xyes"; then
|
||||
AC_SUBST(LIBGC_CPPFLAGS)
|
||||
AC_SUBST(LIBGC_LIBS)
|
||||
AC_SUBST(LIBGC_STATIC_LIBS)
|
||||
AC_SUBST(libgc_dir)
|
||||
AC_SUBST(BOEHM_DEFINES)
|
||||
|
||||
fi
|
||||
@@ -2216,14 +2224,10 @@ if test x$host_win32 = xno; then
|
||||
dnl ******************************************************************
|
||||
AC_ARG_WITH(ikvm-native, [ --with-ikvm-native=yes,no build the IKVM JNI interface library (defaults to yes)],[with_ikvm_native=$withval],[with_ikvm_native=$ikvm_native])
|
||||
|
||||
ikvm_native_dir=
|
||||
if test x$with_ikvm_native = xyes; then
|
||||
ikvm_native_dir=ikvm-native
|
||||
jdk_headers_found="IKVM Native"
|
||||
fi
|
||||
|
||||
AC_SUBST(ikvm_native_dir)
|
||||
|
||||
AC_CHECK_HEADERS(execinfo.h)
|
||||
|
||||
AC_CHECK_HEADERS(sys/auxv.h sys/resource.h)
|
||||
@@ -2934,6 +2938,23 @@ if test x$host_win32 = xno; then
|
||||
])
|
||||
fi
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for sys_signame ***
|
||||
dnl ********************************
|
||||
AC_MSG_CHECKING(for sys_signame)
|
||||
AC_TRY_LINK([
|
||||
#include <signal.h>
|
||||
], [
|
||||
const char *signame = sys_signame[0];
|
||||
], [
|
||||
# Yes, we have it...
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SYSSIGNAME, 1, [Have sys_signame])
|
||||
], [
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
|
||||
dnl ********************************
|
||||
dnl *** Checks for semaphore lib ***
|
||||
dnl ********************************
|
||||
@@ -2945,13 +2966,6 @@ 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 ********************************
|
||||
@@ -4466,13 +4480,28 @@ case "$host" in
|
||||
;;
|
||||
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
|
||||
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \
|
||||
powerpc-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
|
||||
powerpc*-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
|
||||
if test "x$ac_cv_sizeof_void_p" = "x8"; then
|
||||
TARGET=POWERPC64;
|
||||
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
|
||||
if ! (echo $CC | grep -q -- 'clang'); then
|
||||
CFLAGS="$CFLAGS -mminimal-toc"
|
||||
fi
|
||||
# mono#18554 - be more robust in testing for -mminimal-toc
|
||||
AC_MSG_NOTICE([Checking for PowerPC ISA -mminimal-toc support])
|
||||
AX_CHECK_COMPILE_FLAG(
|
||||
[-mminimal-toc],
|
||||
[CFLAGS="$CFLAGS -mminimal-toc"],
|
||||
[CFLAGS="$CFLAGS"]
|
||||
)
|
||||
case "$host" in
|
||||
powerpc*-*-freebsd*)
|
||||
# We need to be aware if we are ELFv1 or v2 here
|
||||
AC_MSG_NOTICE([Checking FreeBSD ELF version])
|
||||
if ! ( echo | cc -dM -E - | awk '/_CALL_ELF/ {print $NF}'); then
|
||||
AC_DEFINE([POWERPC_ELF], 1, [PowerPC ELFv1])
|
||||
else
|
||||
AC_DEFINE([POWERPC_ELFV2], 1, [PowerPC ELFv2])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
TARGET=POWERPC;
|
||||
CPPFLAGS="$CPPFLAGS -D__mono_ppc__"
|
||||
@@ -4487,6 +4516,10 @@ case "$host" in
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=powerpc
|
||||
;;
|
||||
freebsd*)
|
||||
BTLS_SUPPORTED=yes
|
||||
BTLS_PLATFORM=powerpc
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
armv7k-*-darwin*)
|
||||
@@ -5022,21 +5055,23 @@ case "$host" in
|
||||
SQLITE3="libsqlite3.so"
|
||||
;;
|
||||
*-*-*linux*)
|
||||
AC_PATH_X
|
||||
dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh`
|
||||
AC_MSG_CHECKING(for the soname of libX11.so)
|
||||
for i in $x_libraries $dlsearch_path; do
|
||||
for r in 4 5 6; do
|
||||
if test -f $i/libX11.so.$r; then
|
||||
X11=libX11.so.$r
|
||||
AC_MSG_RESULT($X11)
|
||||
fi
|
||||
if test "x$with_core" != "xonly"; then
|
||||
AC_PATH_X
|
||||
dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh`
|
||||
AC_MSG_CHECKING(for the soname of libX11.so)
|
||||
for i in $x_libraries $dlsearch_path; do
|
||||
for r in 4 5 6; do
|
||||
if test -f $i/libX11.so.$r; then
|
||||
X11=libX11.so.$r
|
||||
AC_MSG_RESULT($X11)
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
||||
|
||||
if test "x$X11" = "xlibX11.so"; then
|
||||
AC_MSG_WARN([Could not find libX11.so. Do you have X.org or XFree86 installed? Assuming libX11.so.6...]);
|
||||
X11=libX11.so.6
|
||||
|
||||
if test "x$X11" = "xlibX11.so"; then
|
||||
AC_MSG_WARN([Could not find libX11.so. Do you have X.org or XFree86 installed? Assuming libX11.so.6...]);
|
||||
X11=libX11.so.6
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -5151,8 +5186,12 @@ AC_SEARCH_LIBS(dlopen, dl)
|
||||
#
|
||||
export_link_flags=--export-dynamic
|
||||
case $host_os in
|
||||
mingw*|cygwin*)
|
||||
mingw*|cygwin*)
|
||||
export_link_flags=--export-all-symbols
|
||||
;;
|
||||
*-*-darwin*)
|
||||
export_link_flags=--export_dynamic
|
||||
;;
|
||||
esac
|
||||
AX_APPEND_LINK_FLAGS([-Wl,$export_link_flags -Wl,-Bsymbolic -bsymbolic -Wl,-z,now -Wl,-bind_at_load])
|
||||
|
||||
@@ -5964,13 +6003,6 @@ fi
|
||||
|
||||
AM_CONDITIONAL(BTLS_ANDROID, test x$btls_android = xyes)
|
||||
|
||||
if test x$DISABLE_MCS_DOCS = xyes; then
|
||||
docs_dir=""
|
||||
else
|
||||
docs_dir=docs
|
||||
fi
|
||||
AC_SUBST(docs_dir)
|
||||
|
||||
## Maybe should also disable if mcsdir is invalid. Let's punt the issue for now.
|
||||
AM_CONDITIONAL(BUILD_MCS, [test x$cross_compiling = xno && test x$enable_mcs_build != xno])
|
||||
AM_CONDITIONAL(BUILD_SUPPORT, [test x$enable_support_build != xno])
|
||||
@@ -6067,8 +6099,8 @@ fi
|
||||
AC_SUBST(mono_runtime)
|
||||
AC_SUBST(mono_runtime_wrapper)
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
if test $csc_compiler = mcs; then
|
||||
CSC=$mcs_topdir/class/lib/build/mcs.exe
|
||||
@@ -6100,166 +6132,194 @@ AC_SUBST(mono_cfg_dir)
|
||||
|
||||
AC_SUBST(CSC)
|
||||
|
||||
AC_CONFIG_FILES([po/mcs/Makefile.in])
|
||||
if test "x$with_core" != "xonly"; then
|
||||
|
||||
AC_CONFIG_FILES([acceptance-tests/microbench-perf.sh],[chmod +x acceptance-tests/microbench-perf.sh])
|
||||
AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
|
||||
AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
|
||||
AC_CONFIG_FILES([runtime/bin/mono-hang-watchdog],[chmod +x runtime/bin/mono-hang-watchdog])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/1.0
|
||||
cd runtime/etc/mono/1.0
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_1_1/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/1.0
|
||||
cd runtime/etc/mono/1.0
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_1_1/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
|
||||
cd runtime/etc/mono/2.0
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_2_0/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
|
||||
cd runtime/etc/mono/2.0
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_2_0/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
|
||||
cd runtime/etc/mono/2.0
|
||||
rm -f web.config
|
||||
$LN_S $reldir/data/net_2_0/web.config web.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/web.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0
|
||||
cd runtime/etc/mono/2.0
|
||||
rm -f web.config
|
||||
$LN_S $reldir/data/net_2_0/web.config web.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
|
||||
[ depth=../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/
|
||||
cd runtime/etc/mono/
|
||||
rm -f browscap.ini
|
||||
$LN_S $reldir/data/browscap.ini browscap.ini
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
|
||||
[ depth=../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/
|
||||
cd runtime/etc/mono/
|
||||
rm -f browscap.ini
|
||||
$LN_S $reldir/data/browscap.ini browscap.ini
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
|
||||
[ depth=../../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
|
||||
cd runtime/etc/mono/2.0/Browsers
|
||||
rm -f Compat.browser
|
||||
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
|
||||
[ depth=../../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
|
||||
cd runtime/etc/mono/2.0/Browsers
|
||||
rm -f Compat.browser
|
||||
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/Browsers/Compat.browser],
|
||||
[ depth=../../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0/Browsers/
|
||||
cd runtime/etc/mono/4.0/Browsers
|
||||
rm -f Compat.browser
|
||||
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/Browsers/Compat.browser],
|
||||
[ depth=../../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0/Browsers/
|
||||
cd runtime/etc/mono/4.0/Browsers
|
||||
rm -f Compat.browser
|
||||
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/Browsers/Compat.browser],
|
||||
[ depth=../../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5/Browsers/
|
||||
cd runtime/etc/mono/4.5/Browsers
|
||||
rm -f Compat.browser
|
||||
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/Browsers/Compat.browser],
|
||||
[ depth=../../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5/Browsers/
|
||||
cd runtime/etc/mono/4.5/Browsers
|
||||
rm -f Compat.browser
|
||||
$LN_S $reldir/data/Browsers/Compat.browser Compat.browser
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
|
||||
cd runtime/etc/mono/4.0
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_4_0/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
|
||||
cd runtime/etc/mono/4.0
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_4_0/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
|
||||
cd runtime/etc/mono/4.0
|
||||
rm -f web.config
|
||||
$LN_S $reldir/data/net_4_0/web.config web.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.0/web.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.0
|
||||
cd runtime/etc/mono/4.0
|
||||
rm -f web.config
|
||||
$LN_S $reldir/data/net_4_0/web.config web.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
|
||||
cd runtime/etc/mono/4.5
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_4_5/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/machine.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
|
||||
cd runtime/etc/mono/4.5
|
||||
rm -f machine.config
|
||||
$LN_S $reldir/data/net_4_5/machine.config machine.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
|
||||
cd runtime/etc/mono/4.5
|
||||
rm -f web.config
|
||||
$LN_S $reldir/data/net_4_5/web.config web.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
fi
|
||||
|
||||
AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
|
||||
[ depth=../../../..
|
||||
case $srcdir in
|
||||
[[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
|
||||
.) reldir=$depth ;;
|
||||
*) reldir=$depth/$srcdir ;;
|
||||
esac
|
||||
$ac_aux_dir/install-sh -d runtime/etc/mono/4.5
|
||||
cd runtime/etc/mono/4.5
|
||||
rm -f web.config
|
||||
$LN_S $reldir/data/net_4_5/web.config web.config
|
||||
cd $depth
|
||||
],[LN_S='$LN_S'])
|
||||
# Top level Makefile.am subdirs
|
||||
if test "x$with_core" = "xonly"; then
|
||||
MONO_SUBDIRS="llvm mono"
|
||||
else
|
||||
if test "x$support_boehm" = "xyes" -a "x$libgc" = "xincluded"; then
|
||||
mono_subdirs_libgc=external/bdwgc
|
||||
fi
|
||||
|
||||
if test x$enable_support_build != xno; then
|
||||
mono_subdirs_support=support
|
||||
fi
|
||||
|
||||
if test x$cross_compiling = xno; then
|
||||
# Some tools might not build when cross-compiling
|
||||
mono_subdirs_tools=tools
|
||||
fi
|
||||
|
||||
if test x$DISABLE_MCS_DOCS != xyes; then
|
||||
mono_subdirs_docs=docs
|
||||
fi
|
||||
|
||||
if test x$with_ikvm_native = xyes; then
|
||||
mono_subdirs_ikvm_native=ikvm-native
|
||||
fi
|
||||
|
||||
MONO_SUBDIRS="po $mono_subdirs_libgc llvm mono $mono_subdirs_ikvm_native $mono_subdirs_support data runtime scripts man samples $mono_subdirs_tools $mono_subdirs_docs msvc acceptance-tests"
|
||||
MONO_NOINST_SUBDIRS="$mono_subdirs_libgc"
|
||||
fi
|
||||
|
||||
AC_SUBST(MONO_SUBDIRS)
|
||||
AC_SUBST(MONO_NOINST_SUBDIRS)
|
||||
|
||||
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
|
||||
AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/lock_old_archive_extraction=no/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
|
||||
@@ -6699,95 +6759,7 @@ if test "x$with_core" != "xonly"; then
|
||||
(cd $srcdir && scripts/update_submodules.sh)
|
||||
fi
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
mono-uninstalled.pc
|
||||
acceptance-tests/Makefile
|
||||
llvm/Makefile
|
||||
scripts/mono-find-provides
|
||||
scripts/mono-find-requires
|
||||
mk/Makefile
|
||||
mono/Makefile
|
||||
mono/btls/Makefile
|
||||
mono/native/Makefile
|
||||
mono/utils/Makefile
|
||||
mono/utils/jemalloc/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/zlib/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
mono/arch/Makefile
|
||||
mono/arch/x86/Makefile
|
||||
mono/arch/amd64/Makefile
|
||||
mono/arch/ppc/Makefile
|
||||
mono/arch/sparc/Makefile
|
||||
mono/arch/s390x/Makefile
|
||||
mono/arch/arm/Makefile
|
||||
mono/arch/arm64/Makefile
|
||||
mono/arch/mips/Makefile
|
||||
mono/arch/riscv/Makefile
|
||||
mono/sgen/Makefile
|
||||
mono/native/platform-type.c
|
||||
mono/native/platform-type-compat.c
|
||||
mono/native/platform-type-unified.c
|
||||
mono/tests/Makefile
|
||||
mono/tests/assembly-load-reference/Makefile
|
||||
mono/tests/tests-config
|
||||
mono/tests/gc-descriptors/Makefile
|
||||
mono/tests/testing_gac/Makefile
|
||||
mono/tests/fullaot-mixed/Makefile
|
||||
mono/tests/llvmonly-mixed/Makefile
|
||||
mono/unit-tests/Makefile
|
||||
mono/benchmark/Makefile
|
||||
mono/mini/Makefile
|
||||
mono/profiler/Makefile
|
||||
mono/eglib/Makefile
|
||||
mono/eglib/eglib-config.h
|
||||
mono/eglib/test/Makefile
|
||||
m4/Makefile
|
||||
ikvm-native/Makefile
|
||||
scripts/Makefile
|
||||
man/Makefile
|
||||
docs/Makefile
|
||||
data/Makefile
|
||||
data/net_2_0/Makefile
|
||||
data/net_4_0/Makefile
|
||||
data/net_4_5/Makefile
|
||||
data/net_2_0/Browsers/Makefile
|
||||
data/net_4_0/Browsers/Makefile
|
||||
data/net_4_5/Browsers/Makefile
|
||||
data/mint.pc
|
||||
data/mono-2.pc
|
||||
data/monosgen-2.pc
|
||||
data/mono.pc
|
||||
data/mono-cairo.pc
|
||||
data/mono-options.pc
|
||||
data/mono-lineeditor.pc
|
||||
data/monodoc.pc
|
||||
data/dotnet.pc
|
||||
data/dotnet35.pc
|
||||
data/wcf.pc
|
||||
data/cecil.pc
|
||||
data/system.web.extensions_1.0.pc
|
||||
data/system.web.extensions.design_1.0.pc
|
||||
data/system.web.mvc.pc
|
||||
data/system.web.mvc2.pc
|
||||
data/system.web.mvc3.pc
|
||||
data/aspnetwebstack.pc
|
||||
data/reactive.pc
|
||||
samples/Makefile
|
||||
support/Makefile
|
||||
data/config
|
||||
tools/Makefile
|
||||
tools/locale-builder/Makefile
|
||||
tools/sgen/Makefile
|
||||
tools/pedump/Makefile
|
||||
tools/mono-hang-watchdog/Makefile
|
||||
runtime/Makefile
|
||||
msvc/Makefile
|
||||
po/Makefile
|
||||
netcore/corerun/Makefile
|
||||
])
|
||||
AC_MONO_OUTPUT()
|
||||
|
||||
if test x$host_win32 = xyes; then
|
||||
# Get rid of 'cyg' prefixes in library names
|
||||
@@ -6803,40 +6775,6 @@ if test x$host_darwin = xyes; then
|
||||
sed -e 's,lock_old_archive_extraction=yes,lock_old_archive_extraction=no,g' < libtool > libtool.new && mv libtool.new libtool && chmod +x libtool
|
||||
fi
|
||||
|
||||
force_enable_compiler_server=no;
|
||||
|
||||
AC_MSG_CHECKING([compiler server])
|
||||
AC_ARG_WITH(compiler-server, [ --with-compiler-server=yes,no,default,force Enables or disables compiler server],[
|
||||
if test x$withval = xyes; then
|
||||
enable_compiler_server=yes;
|
||||
# force will bypass any automatic disables to allow you to test the compiler server
|
||||
# in scenarios where it is disabled
|
||||
elif test x$withval = xforce; then
|
||||
enable_compiler_server=yes;
|
||||
force_enable_compiler_server=yes;
|
||||
elif test x$withval = xno; then
|
||||
enable_compiler_server=no;
|
||||
elif test x$withval = xdefault; then
|
||||
enable_compiler_server=yes;
|
||||
else
|
||||
AC_MSG_ERROR([You must supply one of "yes", "no", "default" or "force" to the --with-compiler-server option])
|
||||
fi
|
||||
],[enable_compiler_server=yes])
|
||||
|
||||
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])
|
||||
enable_compiler_server=no;
|
||||
elif test x$csc_compiler = xmcs; then
|
||||
AC_MSG_WARN([mcs does not support the compiler server])
|
||||
enable_compiler_server=no;
|
||||
fi
|
||||
fi
|
||||
|
||||
(
|
||||
case $prefix in
|
||||
NONE) prefix=$ac_default_prefix ;;
|
||||
@@ -6966,6 +6904,40 @@ fi
|
||||
echo "MONO_NATIVE_USING_COMPAT=false" >> $srcdir/$mcsdir/build/config.make
|
||||
fi
|
||||
|
||||
force_enable_compiler_server=no;
|
||||
|
||||
AC_MSG_CHECKING([compiler server])
|
||||
AC_ARG_WITH(compiler-server, [ --with-compiler-server=yes,no,default,force Enables or disables compiler server],[
|
||||
if test x$withval = xyes; then
|
||||
enable_compiler_server=yes;
|
||||
# force will bypass any automatic disables to allow you to test the compiler server
|
||||
# in scenarios where it is disabled
|
||||
elif test x$withval = xforce; then
|
||||
enable_compiler_server=yes;
|
||||
force_enable_compiler_server=yes;
|
||||
elif test x$withval = xno; then
|
||||
enable_compiler_server=no;
|
||||
elif test x$withval = xdefault; then
|
||||
enable_compiler_server=yes;
|
||||
else
|
||||
AC_MSG_ERROR([You must supply one of "yes", "no", "default" or "force" to the --with-compiler-server option])
|
||||
fi
|
||||
],[enable_compiler_server=yes])
|
||||
|
||||
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])
|
||||
enable_compiler_server=no;
|
||||
elif test x$csc_compiler = xmcs; then
|
||||
AC_MSG_WARN([mcs does not support the compiler server])
|
||||
enable_compiler_server=no;
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "MONO_NATIVE_PLATFORM_TYPE=$MONO_NATIVE_PLATFORM_TYPE" >> $srcdir/$mcsdir/build/config.make
|
||||
echo "MONO_NATIVE_PLATFORM=$MONO_NATIVE_PLATFORM" >> $srcdir/$mcsdir/build/config.make
|
||||
if test x$enable_compiler_server = xyes; then
|
||||
|
||||
@@ -242,7 +242,7 @@ namespace HtmlAgilityPack
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks for existance of attribute with given name
|
||||
/// Checks for existence of attribute with given name
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
</Dependency>
|
||||
</ProductDependencies>
|
||||
<ToolsetDependencies>
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19567.2">
|
||||
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20109.1">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>928efaa081ffd17b37f6c662fee44775f2d0b90f</Sha>
|
||||
<Sha>b0e8d3944155f94f83deea8afe025debe369e69f</Sha>
|
||||
</Dependency>
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.19567.2">
|
||||
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20109.1">
|
||||
<Uri>https://github.com/dotnet/arcade</Uri>
|
||||
<Sha>928efaa081ffd17b37f6c662fee44775f2d0b90f</Sha>
|
||||
<Sha>b0e8d3944155f94f83deea8afe025debe369e69f</Sha>
|
||||
</Dependency>
|
||||
</ToolsetDependencies>
|
||||
</Dependencies>
|
||||
+27
-26
@@ -5,11 +5,12 @@ param(
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
function FirstMatchingSymbolDescriptionOrDefault {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $TargetServerParam, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
|
||||
[string] $TargetServerParameter, # Parameter to pass to `Symbol Tool` indicating the server to lookup for symbols
|
||||
[string] $SymbolsPath
|
||||
)
|
||||
|
||||
@@ -21,36 +22,36 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
||||
# checking and which type of file was uploaded.
|
||||
|
||||
# The file itself is returned
|
||||
$SymbolPath = $SymbolsPath + "\" + $FileName
|
||||
$SymbolPath = $SymbolsPath + '\' + $FileName
|
||||
|
||||
# PDB file for the module
|
||||
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
|
||||
$PdbPath = $SymbolPath.Replace($Extension, '.pdb')
|
||||
|
||||
# PDB file for R2R module (created by crossgen)
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
|
||||
|
||||
# DBG file for a .so library
|
||||
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
|
||||
$SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
|
||||
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
|
||||
|
||||
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
.\dotnet-symbol.exe --symbols --modules --windows-pdbs $TargetServerParameter $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
return 'PDB'
|
||||
}
|
||||
elseif (Test-Path $NGenPdb) {
|
||||
return "NGen PDB"
|
||||
return 'NGen PDB'
|
||||
}
|
||||
elseif (Test-Path $SODbg) {
|
||||
return "DBG for SO"
|
||||
return 'DBG for SO'
|
||||
}
|
||||
elseif (Test-Path $DylibDwarf) {
|
||||
return "Dwarf for Dylib"
|
||||
return 'Dwarf for Dylib'
|
||||
}
|
||||
elseif (Test-Path $SymbolPath) {
|
||||
return "Module"
|
||||
return 'Module'
|
||||
}
|
||||
else {
|
||||
return $null
|
||||
@@ -68,7 +69,7 @@ function CountMissingSymbols {
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for symbols
|
||||
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
|
||||
$RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
|
||||
|
||||
# How many files are missing symbol information
|
||||
$MissingSymbols = 0
|
||||
@@ -76,7 +77,7 @@ function CountMissingSymbols {
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$PackageGuid = New-Guid
|
||||
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
|
||||
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
|
||||
|
||||
@@ -86,31 +87,31 @@ function CountMissingSymbols {
|
||||
Get-ChildItem -Recurse $ExtractPath |
|
||||
Where-Object {$RelevantExtensions -contains $_.Extension} |
|
||||
ForEach-Object {
|
||||
if ($_.FullName -Match "\\ref\\") {
|
||||
if ($_.FullName -Match '\\ref\\') {
|
||||
Write-Host "`t Ignoring reference assembly file" $_.FullName
|
||||
return
|
||||
}
|
||||
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--microsoft-symbol-server' -SymbolsPath $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault -FullPath $_.FullName -TargetServerParameter '--internal-server' -SymbolsPath $SymbolsPath
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
|
||||
Write-Host "Symbols found on MSDL (${$SymbolsOnMSDL}) and SymWeb (${$SymbolsOnSymWeb})"
|
||||
}
|
||||
else {
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host "No symbols found on MSDL or SymWeb!"
|
||||
Write-Host 'No symbols found on MSDL or SymWeb!'
|
||||
}
|
||||
else {
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host "No symbols found on MSDL!"
|
||||
Write-Host 'No symbols found on MSDL!'
|
||||
}
|
||||
else {
|
||||
Write-Host "No symbols found on SymWeb!"
|
||||
Write-Host 'No symbols found on SymWeb!'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,26 +130,26 @@ function CheckSymbolsAvailable {
|
||||
Get-ChildItem "$InputPath\*.nupkg" |
|
||||
ForEach-Object {
|
||||
$FileName = $_.Name
|
||||
|
||||
|
||||
# These packages from Arcade-Services include some native libraries that
|
||||
# our current symbol uploader can't handle. Below is a workaround until
|
||||
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
|
||||
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
|
||||
if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
|
||||
elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Write-Host "Validating $FileName "
|
||||
$Status = CountMissingSymbols "$InputPath\$FileName"
|
||||
|
||||
if ($Status -ne 0) {
|
||||
Write-Error "Missing symbols for $Status modules in the package $FileName"
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
|
||||
}
|
||||
|
||||
Write-Host
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# condition: eq(variables['Agent.OS'], 'Windows_NT')
|
||||
# inputs:
|
||||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
|
||||
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
|
||||
# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
|
||||
# env:
|
||||
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
|
||||
@@ -95,10 +95,15 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
|
||||
}
|
||||
|
||||
if (!(Test-Path $ConfigFile -PathType Leaf)) {
|
||||
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if (!$Password) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Load NuGet.config
|
||||
$doc = New-Object System.Xml.XmlDocument
|
||||
$filename = (Get-Item $ConfigFile).FullName
|
||||
@@ -121,7 +126,16 @@ if ($creds -eq $null) {
|
||||
# Insert credential nodes for Maestro's private feeds
|
||||
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
|
||||
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
|
||||
if ($dotnet3Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
}
|
||||
|
||||
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
|
||||
if ($dotnet31Source -ne $null) {
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
|
||||
}
|
||||
|
||||
$doc.Save($filename)
|
||||
@@ -17,7 +17,7 @@
|
||||
# displayName: Setup Private Feeds Credentials
|
||||
# inputs:
|
||||
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
|
||||
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
|
||||
# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
|
||||
# condition: ne(variables['Agent.OS'], 'Windows_NT')
|
||||
# env:
|
||||
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
|
||||
@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
if [ ! -f "$ConfigFile" ]; then
|
||||
echo "Couldn't find the file NuGet config file: $ConfigFile"
|
||||
Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
if [ -z "$CredToken" ]; then
|
||||
Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then
|
||||
fi
|
||||
|
||||
# Ensure there is a <packageSources>...</packageSources> section.
|
||||
grep -i "<packageSources>" $ConfigFile
|
||||
grep -i "<packageSources>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding <packageSources>...</packageSources> section."
|
||||
ConfigNodeHeader="<configuration>"
|
||||
@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then
|
||||
fi
|
||||
|
||||
# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
|
||||
grep -i "<packageSourceCredentials>" $ConfigFile
|
||||
grep -i "<packageSourceCredentials>" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."
|
||||
|
||||
@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
|
||||
fi
|
||||
|
||||
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
|
||||
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal to the packageSources."
|
||||
PackageSources=()
|
||||
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
|
||||
# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
|
||||
grep -i "<add key=\"dotnet3\"" $ConfigFile
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
|
||||
if [ "$?" == "0" ]; then
|
||||
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3-internal')
|
||||
|
||||
grep -i "<add key=\"dotnet3-internal-transport\"" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal-transport to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3-internal-transport')
|
||||
fi
|
||||
|
||||
# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
|
||||
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3-internal-transport to the packageSources."
|
||||
# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
|
||||
grep -i "<add key=\"dotnet3.1\"" $ConfigFile
|
||||
if [ "$?" == "0" ]; then
|
||||
grep -i "<add key=\"dotnet3.1-internal\"" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3.1-internal to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2\" />"
|
||||
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3.1-internal')
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
|
||||
grep -i "<add key=\"dotnet3.1-internal-transport\">" $ConfigFile
|
||||
if [ "$?" != "0" ]; then
|
||||
echo "Adding dotnet3.1-internal-transport to the packageSources."
|
||||
PackageSourcesNodeFooter="</packageSources>"
|
||||
PackageSourceTemplate="${TB}<add key=\"dotnet3.1-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2\" />"
|
||||
|
||||
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
|
||||
fi
|
||||
PackageSources+=('dotnet3.1-internal-transport')
|
||||
fi
|
||||
|
||||
# I want things split line by line
|
||||
PrevIFS=$IFS
|
||||
IFS=$'\n'
|
||||
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
|
||||
PackageSources+="$IFS"
|
||||
PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
|
||||
IFS=$PrevIFS
|
||||
|
||||
PackageSources+=('dotnet3-internal')
|
||||
PackageSources+=('dotnet3-internal-transport')
|
||||
|
||||
for FeedName in ${PackageSources[@]} ; do
|
||||
# Check if there is no existing credential for this FeedName
|
||||
grep -i "<$FeedName>" $ConfigFile
|
||||
@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do
|
||||
PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
|
||||
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"
|
||||
|
||||
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
|
||||
sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
|
||||
fi
|
||||
done
|
||||
+140
-129
@@ -6,140 +6,15 @@ param(
|
||||
[Parameter(Mandatory=$true)][string] $GHCommit # GitHub commit SHA used to build the packages
|
||||
)
|
||||
|
||||
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
|
||||
# in the repository at a specific commit point. This is populated by inserting
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
)
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
throw "Input file does not exist: $PackagePath"
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
$FailedFiles = 0
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$FileName = $_.FullName
|
||||
$Extension = [System.IO.Path]::GetExtension($_.Name)
|
||||
$FakeName = -Join((New-Guid), $Extension)
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
return
|
||||
}
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
|
||||
$ValidateFile = {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $RealPath,
|
||||
[ref] $FailedFiles
|
||||
)
|
||||
|
||||
# Makes easier to reference `sourcelink cli`
|
||||
Push-Location $using:SourceLinkToolPath
|
||||
|
||||
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
|
||||
|
||||
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
|
||||
$NumFailedLinks = 0
|
||||
|
||||
# We only care about Http addresses
|
||||
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
|
||||
|
||||
if ($Matches.Count -ne 0) {
|
||||
$Matches.Value |
|
||||
ForEach-Object {
|
||||
$Link = $_
|
||||
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
|
||||
$FilePath = $Link.Replace($CommitUrl, "")
|
||||
$Status = 200
|
||||
$Cache = $using:RepoFiles
|
||||
|
||||
if ( !($Cache.ContainsKey($FilePath)) ) {
|
||||
try {
|
||||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
|
||||
if ($Status -ne 200) {
|
||||
if ($NumFailedLinks -eq 0) {
|
||||
if ($FailedFiles.Value -eq 0) {
|
||||
Write-Host
|
||||
}
|
||||
|
||||
Write-Host "`tFile $RealPath has broken links:"
|
||||
}
|
||||
|
||||
Write-Host "`t`tFailed to retrieve $Link"
|
||||
|
||||
$NumFailedLinks++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($NumFailedLinks -ne 0) {
|
||||
$FailedFiles.value++
|
||||
$global:LASTEXITCODE = 1
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
|
||||
}
|
||||
|
||||
$zip.Dispose()
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if (!($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
Write-Host "GHRepoName should be in the format <org>/<repo>"
|
||||
Write-PipelineTelemetryError -Category "Build" -Message "GHRepoName should be in the format <org>/<repo>"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
|
||||
if (!($GHCommit -Match "^[0-9a-fA-F]{40}$")) {
|
||||
Write-Host "GHCommit should be a 40 chars hexadecimal string"
|
||||
Write-PipelineTelemetryError -Category "Build" -Message "GHCommit should be a 40 chars hexadecimal string"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
@@ -160,7 +35,7 @@ function ValidateSourceLinkLinks {
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
Write-PipelineTelemetryError -Category "Build" -Message "Problems downloading the list of files from the repo. Url used: $RepoTreeURL"
|
||||
$global:LASTEXITCODE = 1
|
||||
return
|
||||
}
|
||||
@@ -181,4 +56,140 @@ function ValidateSourceLinkLinks {
|
||||
}
|
||||
}
|
||||
|
||||
Measure-Command { ValidateSourceLinkLinks }
|
||||
try {
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
# Cache/HashMap (File -> Exist flag) used to consult whether a file exist
|
||||
# in the repository at a specific commit point. This is populated by inserting
|
||||
# all files present in the repo at a specific commit point.
|
||||
$global:RepoFiles = @{}
|
||||
|
||||
$ValidatePackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a Symbols.NuGet package
|
||||
)
|
||||
|
||||
# Ensure input file exist
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
throw "Input file does not exist: $PackagePath"
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
$FailedFiles = 0
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$FileName = $_.FullName
|
||||
$Extension = [System.IO.Path]::GetExtension($_.Name)
|
||||
$FakeName = -Join((New-Guid), $Extension)
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
return
|
||||
}
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
|
||||
$ValidateFile = {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
[string] $RealPath,
|
||||
[ref] $FailedFiles
|
||||
)
|
||||
|
||||
# Makes easier to reference `sourcelink cli`
|
||||
Push-Location $using:SourceLinkToolPath
|
||||
|
||||
$SourceLinkInfos = .\sourcelink.exe print-urls $FullPath | Out-String
|
||||
|
||||
if ($LASTEXITCODE -eq 0 -and -not ([string]::IsNullOrEmpty($SourceLinkInfos))) {
|
||||
$NumFailedLinks = 0
|
||||
|
||||
# We only care about Http addresses
|
||||
$Matches = (Select-String '(http[s]?)(:\/\/)([^\s,]+)' -Input $SourceLinkInfos -AllMatches).Matches
|
||||
|
||||
if ($Matches.Count -ne 0) {
|
||||
$Matches.Value |
|
||||
ForEach-Object {
|
||||
$Link = $_
|
||||
$CommitUrl = -Join("https://raw.githubusercontent.com/", $using:GHRepoName, "/", $using:GHCommit, "/")
|
||||
$FilePath = $Link.Replace($CommitUrl, "")
|
||||
$Status = 200
|
||||
$Cache = $using:RepoFiles
|
||||
|
||||
if ( !($Cache.ContainsKey($FilePath)) ) {
|
||||
try {
|
||||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and $Uri.Host -match "github") {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
catch {
|
||||
$Status = 0
|
||||
}
|
||||
}
|
||||
|
||||
if ($Status -ne 200) {
|
||||
if ($NumFailedLinks -eq 0) {
|
||||
if ($FailedFiles.Value -eq 0) {
|
||||
Write-Host
|
||||
}
|
||||
|
||||
Write-Host "`tFile $RealPath has broken links:"
|
||||
}
|
||||
|
||||
Write-Host "`t`tFailed to retrieve $Link"
|
||||
|
||||
$NumFailedLinks++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($NumFailedLinks -ne 0) {
|
||||
$FailedFiles.value++
|
||||
$global:LASTEXITCODE = 1
|
||||
}
|
||||
}
|
||||
|
||||
Pop-Location
|
||||
}
|
||||
|
||||
&$ValidateFile $TargetFile $FileName ([ref]$FailedFiles)
|
||||
}
|
||||
|
||||
$zip.Dispose()
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
}
|
||||
}
|
||||
|
||||
Measure-Command { ValidateSourceLinkLinks }
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
+45
-45
@@ -26,50 +26,50 @@ Param(
|
||||
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function Print-Usage() {
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
Write-Host ""
|
||||
Write-Host "Common settings:"
|
||||
Write-Host " -configuration <value> Build configuration: 'Debug' or 'Release' (short: -c)"
|
||||
Write-Host " -platform <value> Platform configuration: 'x86', 'x64' or any valid Platform value to pass to msbuild"
|
||||
Write-Host " -verbosity <value> Msbuild verbosity: q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic] (short: -v)"
|
||||
Write-Host " -binaryLog Output binary log (short: -bl)"
|
||||
Write-Host " -help Print help and exit"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Actions:"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build solution (short: -b)"
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host " -clean Clean the solution"
|
||||
Write-Host ""
|
||||
Write-Host "Actions:"
|
||||
Write-Host " -restore Restore dependencies (short: -r)"
|
||||
Write-Host " -build Build solution (short: -b)"
|
||||
Write-Host " -rebuild Rebuild solution"
|
||||
Write-Host " -deploy Deploy built VSIXes"
|
||||
Write-Host " -deployDeps Deploy dependencies (e.g. VSIXes for integration tests)"
|
||||
Write-Host " -test Run all unit tests in the solution (short: -t)"
|
||||
Write-Host " -integrationTest Run all integration tests in the solution"
|
||||
Write-Host " -performanceTest Run all performance tests in the solution"
|
||||
Write-Host " -pack Package build outputs into NuGet packages and Willow components"
|
||||
Write-Host " -sign Sign build outputs"
|
||||
Write-Host " -publish Publish artifacts (e.g. symbols)"
|
||||
Write-Host " -clean Clean the solution"
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
Write-Host "Advanced settings:"
|
||||
Write-Host " -projects <value> Semi-colon delimited list of sln/proj's to build. Globbing is supported (*.sln)"
|
||||
Write-Host " -ci Set when running on CI server"
|
||||
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
|
||||
Write-Host " -warnAsError <value> Sets warnaserror msbuild parameter ('true' or 'false')"
|
||||
Write-Host " -msbuildEngine <value> Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
|
||||
Write-Host ""
|
||||
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
Write-Host "Command line arguments not listed above are passed thru to msbuild."
|
||||
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
|
||||
}
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InitializeCustomToolset {
|
||||
if (-not $restore) {
|
||||
return
|
||||
}
|
||||
|
||||
$script = Join-Path $EngRoot "restore-toolset.ps1"
|
||||
$script = Join-Path $EngRoot 'restore-toolset.ps1'
|
||||
|
||||
if (Test-Path $script) {
|
||||
. $script
|
||||
@@ -80,8 +80,8 @@ function Build {
|
||||
$toolsetBuildProj = InitializeToolset
|
||||
InitializeCustomToolset
|
||||
|
||||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "Build.binlog") } else { "" }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { "" }
|
||||
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' }
|
||||
$platformArg = if ($platform) { "/p:Platform=$platform" } else { '' }
|
||||
|
||||
if ($projects) {
|
||||
# Re-assign properties to a new variable because PowerShell doesn't let us append properties directly for unclear reasons.
|
||||
@@ -114,16 +114,16 @@ function Build {
|
||||
@properties
|
||||
}
|
||||
|
||||
if ($clean) {
|
||||
if(Test-Path $ArtifactsDir) {
|
||||
Remove-Item -Recurse -Force $ArtifactsDir
|
||||
Write-Host "Artifacts directory deleted."
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
try {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
if ($clean) {
|
||||
if (Test-Path $ArtifactsDir) {
|
||||
Remove-Item -Recurse -Force $ArtifactsDir
|
||||
Write-Host 'Artifacts directory deleted.'
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
@@ -141,7 +141,7 @@ try {
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,9 @@ __UbuntuPackages="build-essential"
|
||||
__AlpinePackages="alpine-base"
|
||||
__AlpinePackages+=" build-base"
|
||||
__AlpinePackages+=" linux-headers"
|
||||
__AlpinePackages+=" lldb-dev"
|
||||
__AlpinePackages+=" llvm-dev"
|
||||
__AlpinePackagesEdgeTesting=" lldb-dev"
|
||||
__AlpinePackagesEdgeMain=" llvm9-libs"
|
||||
__AlpinePackagesEdgeMain+=" python3"
|
||||
|
||||
# symlinks fixer
|
||||
__UbuntuPackages+=" symlinks"
|
||||
@@ -193,19 +194,29 @@ fi
|
||||
|
||||
if [[ "$__LinuxCodeName" == "alpine" ]]; then
|
||||
__ApkToolsVersion=2.9.1
|
||||
__AlpineVersion=3.7
|
||||
__AlpineVersion=3.9
|
||||
__ApkToolsDir=$(mktemp -d)
|
||||
wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
|
||||
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
|
||||
mkdir -p $__RootfsDir/usr/bin
|
||||
cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
|
||||
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackages
|
||||
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackagesEdgeMain
|
||||
|
||||
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
|
||||
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
|
||||
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
|
||||
add $__AlpinePackagesEdgeTesting
|
||||
|
||||
rm -r $__ApkToolsDir
|
||||
elif [[ -n $__LinuxCodeName ]]; then
|
||||
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
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 = 'minimal',
|
||||
$toolpath = $null
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
function InstallDarcCli ($darcVersion) {
|
||||
$darcCliPackageName = "microsoft.dotnet.darc"
|
||||
$darcCliPackageName = 'microsoft.dotnet.darc'
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
@@ -24,15 +24,24 @@ function InstallDarcCli ($darcVersion) {
|
||||
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
|
||||
}
|
||||
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
$arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
|
||||
Write-Host "Installing Darc CLI version $darcVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
|
||||
if (-not $toolpath) {
|
||||
Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
|
||||
}else {
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
|
||||
Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g --tool-path '$toolpath'"
|
||||
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
|
||||
}
|
||||
}
|
||||
|
||||
InstallDarcCli $darcVersion
|
||||
try {
|
||||
InstallDarcCli $darcVersion
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Darc' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
source="${BASH_SOURCE[0]}"
|
||||
darcVersion=''
|
||||
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='minimal'
|
||||
|
||||
while [[ $# > 0 ]]; do
|
||||
opt="$(echo "$1" | awk '{print tolower($0)}')"
|
||||
|
||||
Vendored
+12
-13
@@ -1,28 +1,27 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $architecture = "",
|
||||
[string] $version = "Latest",
|
||||
[string] $runtime = "dotnet",
|
||||
[string] $RuntimeSourceFeed = "",
|
||||
[string] $RuntimeSourceFeedKey = ""
|
||||
[string] $verbosity = 'minimal',
|
||||
[string] $architecture = '',
|
||||
[string] $version = 'Latest',
|
||||
[string] $runtime = 'dotnet',
|
||||
[string] $RuntimeSourceFeed = '',
|
||||
[string] $RuntimeSourceFeedKey = ''
|
||||
)
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
||||
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
|
||||
|
||||
$installdir = $dotnetRoot
|
||||
try {
|
||||
if ($architecture -and $architecture.Trim() -eq "x86") {
|
||||
$installdir = Join-Path $installdir "x86"
|
||||
if ($architecture -and $architecture.Trim() -eq 'x86') {
|
||||
$installdir = Join-Path $installdir 'x86'
|
||||
}
|
||||
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
|
||||
}
|
||||
InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-3
@@ -11,6 +11,8 @@ while [[ -h "$source" ]]; do
|
||||
done
|
||||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
|
||||
version='Latest'
|
||||
architecture=''
|
||||
runtime='dotnet'
|
||||
@@ -40,7 +42,7 @@ while [[ $# > 0 ]]; do
|
||||
runtimeSourceFeedKey="$1"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument: $1"
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Invalid argument: $1"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -73,7 +75,6 @@ case $cpuname in
|
||||
;;
|
||||
esac
|
||||
|
||||
. "$scriptroot/tools.sh"
|
||||
dotnetRoot="$repo_root/.dotnet"
|
||||
if [[ $architecture != "" ]] && [[ $architecture != $buildarch ]]; then
|
||||
dotnetRoot="$dotnetRoot/$architecture"
|
||||
@@ -81,7 +82,7 @@ fi
|
||||
|
||||
InstallDotNet $dotnetRoot $version "$architecture" $runtime true $runtimeSourceFeed $runtimeSourceFeedKey || {
|
||||
local exit_code=$?
|
||||
echo "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "dotnet-install.sh failed (exit code '$exit_code')." >&2
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
|
||||
|
||||
@@ -2,5 +2,12 @@ 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/"
|
||||
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
# Write-PipelineSetVariable will no-op if a variable named $ci is not defined
|
||||
# Since this script is only ever called in AzDO builds, just universally set it
|
||||
$ci = $true
|
||||
|
||||
Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false
|
||||
Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false
|
||||
@@ -3,39 +3,39 @@ Param(
|
||||
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
|
||||
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
|
||||
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
|
||||
[string] $darcVersion = '1.1.0-beta.19175.6', # darc's version
|
||||
[string] $darcVersion, # darc's version
|
||||
[string] $graphvizVersion = '2.38', # GraphViz version
|
||||
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
|
||||
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
|
||||
|
||||
function CheckExitCode ([string]$stage)
|
||||
{
|
||||
$exitCode = $LASTEXITCODE
|
||||
if ($exitCode -ne 0) {
|
||||
Write-Host "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
$ErrorActionPreference = 'Stop'
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
|
||||
|
||||
Push-Location $PSScriptRoot
|
||||
|
||||
Write-Host "Installing darc..."
|
||||
Write-Host 'Installing darc...'
|
||||
. .\darc-init.ps1 -darcVersion $darcVersion
|
||||
CheckExitCode "Running darc-init"
|
||||
CheckExitCode 'Running darc-init'
|
||||
|
||||
$engCommonBaseDir = Join-Path $PSScriptRoot "native\"
|
||||
$engCommonBaseDir = Join-Path $PSScriptRoot 'native\'
|
||||
$graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
|
||||
$nativeToolBaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external"
|
||||
$installBin = Join-Path $graphvizInstallDir "bin"
|
||||
$nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
|
||||
$installBin = Join-Path $graphvizInstallDir 'bin'
|
||||
|
||||
Write-Host "Installing dot..."
|
||||
Write-Host 'Installing dot...'
|
||||
.\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
|
||||
|
||||
$darcExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
@@ -51,37 +51,36 @@ try {
|
||||
$graphVizImageFilePath = "$outputFolder\graph.png"
|
||||
$normalGraphFilePath = "$outputFolder\graph-full.txt"
|
||||
$flatGraphFilePath = "$outputFolder\graph-flat.txt"
|
||||
$baseOptions = @( "--github-pat", "$gitHubPat", "--azdev-pat", "$azdoPat", "--password", "$barToken" )
|
||||
$baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" )
|
||||
|
||||
if ($includeToolset) {
|
||||
Write-Host "Toolsets will be included in the graph..."
|
||||
$baseOptions += @( "--include-toolset" )
|
||||
Write-Host 'Toolsets will be included in the graph...'
|
||||
$baseOptions += @( '--include-toolset' )
|
||||
}
|
||||
|
||||
Write-Host "Generating standard dependency graph..."
|
||||
Write-Host 'Generating standard dependency graph...'
|
||||
& "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
|
||||
CheckExitCode "Generating normal dependency graph"
|
||||
CheckExitCode 'Generating normal dependency graph'
|
||||
|
||||
Write-Host "Generating flat dependency graph and graphviz file..."
|
||||
Write-Host 'Generating flat dependency graph and graphviz file...'
|
||||
& "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
|
||||
CheckExitCode "Generating flat and graphviz dependency graph"
|
||||
CheckExitCode 'Generating flat and graphviz dependency graph'
|
||||
|
||||
Write-Host "Generating graph image $graphVizFilePath"
|
||||
$dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
|
||||
& "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
|
||||
CheckExitCode "Generating graphviz image"
|
||||
CheckExitCode 'Generating graphviz image'
|
||||
|
||||
Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
|
||||
}
|
||||
catch {
|
||||
if (!$includeToolset) {
|
||||
Write-Host "This might be a toolset repo which includes only toolset dependencies. " -NoNewline -ForegroundColor Yellow
|
||||
Write-Host "Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again..." -ForegroundColor Yellow
|
||||
Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow
|
||||
Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow
|
||||
}
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message $_
|
||||
ExitWithExitCode 1
|
||||
} finally {
|
||||
Pop-Location
|
||||
Pop-Location
|
||||
}
|
||||
@@ -35,7 +35,7 @@ File path to global.json file
|
||||
#>
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param (
|
||||
[string] $BaseUri = "https://netcorenativeassets.blob.core.windows.net/resource-packages/external",
|
||||
[string] $BaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external',
|
||||
[string] $InstallDirectory,
|
||||
[switch] $Clean = $False,
|
||||
[switch] $Force = $False,
|
||||
@@ -45,26 +45,27 @@ Param (
|
||||
)
|
||||
|
||||
if (!$GlobalJsonFile) {
|
||||
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName "global.json"
|
||||
$GlobalJsonFile = Join-Path (Get-Item $PSScriptRoot).Parent.Parent.FullName 'global.json'
|
||||
}
|
||||
|
||||
Set-StrictMode -version 2.0
|
||||
$ErrorActionPreference="Stop"
|
||||
$ErrorActionPreference='Stop'
|
||||
|
||||
Import-Module -Name (Join-Path $PSScriptRoot "native\CommonLibrary.psm1")
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
|
||||
|
||||
try {
|
||||
# Define verbose switch if undefined
|
||||
$Verbose = $VerbosePreference -Eq "Continue"
|
||||
$Verbose = $VerbosePreference -Eq 'Continue'
|
||||
|
||||
$EngCommonBaseDir = Join-Path $PSScriptRoot "native\"
|
||||
$EngCommonBaseDir = Join-Path $PSScriptRoot 'native\'
|
||||
$NativeBaseDir = $InstallDirectory
|
||||
if (!$NativeBaseDir) {
|
||||
$NativeBaseDir = CommonLibrary\Get-NativeInstallDirectory
|
||||
}
|
||||
$Env:CommonLibrary_NativeInstallDir = $NativeBaseDir
|
||||
$InstallBin = Join-Path $NativeBaseDir "bin"
|
||||
$InstallerPath = Join-Path $EngCommonBaseDir "install-tool.ps1"
|
||||
$InstallBin = Join-Path $NativeBaseDir 'bin'
|
||||
$InstallerPath = Join-Path $EngCommonBaseDir 'install-tool.ps1'
|
||||
|
||||
# Process tools list
|
||||
Write-Host "Processing $GlobalJsonFile"
|
||||
@@ -74,7 +75,7 @@ try {
|
||||
}
|
||||
$NativeTools = Get-Content($GlobalJsonFile) -Raw |
|
||||
ConvertFrom-Json |
|
||||
Select-Object -Expand "native-tools" -ErrorAction SilentlyContinue
|
||||
Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
|
||||
if ($NativeTools) {
|
||||
$NativeTools.PSObject.Properties | ForEach-Object {
|
||||
$ToolName = $_.Name
|
||||
@@ -112,18 +113,21 @@ try {
|
||||
}
|
||||
$toolInstallationFailure = $true
|
||||
} else {
|
||||
Write-Error $errMsg
|
||||
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
|
||||
Write-Host $errMsg
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
|
||||
# We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
|
||||
Write-Host 'Native tools bootstrap failed'
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
else {
|
||||
Write-Host "No native tools defined in global.json"
|
||||
Write-Host 'No native tools defined in global.json'
|
||||
exit 0
|
||||
}
|
||||
|
||||
@@ -131,18 +135,18 @@ try {
|
||||
exit 0
|
||||
}
|
||||
if (Test-Path $InstallBin) {
|
||||
Write-Host "Native tools are available from" (Convert-Path -Path $InstallBin)
|
||||
Write-Host 'Native tools are available from ' (Convert-Path -Path $InstallBin)
|
||||
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
|
||||
return $InstallBin
|
||||
}
|
||||
else {
|
||||
Write-Error "Native tools install directory does not exist, installation failed"
|
||||
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
|
||||
exit 1
|
||||
}
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
exit 1
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -12,6 +12,7 @@ retry_wait_time_seconds=30
|
||||
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
|
||||
declare -A native_assets
|
||||
|
||||
. $scriptroot/pipeline-logging-functions.sh
|
||||
. $scriptroot/native/common-library.sh
|
||||
|
||||
while (($# > 0)); do
|
||||
@@ -120,7 +121,7 @@ else
|
||||
$installer_command
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Execution Failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Execution Failed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
@@ -134,7 +135,7 @@ if [[ -d $install_bin ]]; then
|
||||
echo "Native tools are available from $install_bin"
|
||||
echo "##vso[task.prependpath]$install_bin"
|
||||
else
|
||||
echo "Native tools install directory does not exist, installation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Native tools install directory does not exist, installation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ param(
|
||||
[switch] $IsFeedPrivate
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
|
||||
. $PSScriptRoot\tools.ps1
|
||||
|
||||
# Sets VSS_NUGET_EXTERNAL_FEED_ENDPOINTS based on the "darc-int-*" feeds defined in NuGet.config. This is needed
|
||||
@@ -21,7 +20,7 @@ function SetupCredProvider {
|
||||
)
|
||||
|
||||
# Install the Cred Provider NuGet plugin
|
||||
Write-Host "Setting up Cred Provider NuGet plugin in the agent..."
|
||||
Write-Host 'Setting up Cred Provider NuGet plugin in the agent...'
|
||||
Write-Host "Getting 'installcredprovider.ps1' from 'https://github.com/microsoft/artifacts-credprovider'..."
|
||||
|
||||
$url = 'https://raw.githubusercontent.com/microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1'
|
||||
@@ -29,18 +28,18 @@ function SetupCredProvider {
|
||||
Write-Host "Writing the contents of 'installcredprovider.ps1' locally..."
|
||||
Invoke-WebRequest $url -OutFile installcredprovider.ps1
|
||||
|
||||
Write-Host "Installing plugin..."
|
||||
Write-Host 'Installing plugin...'
|
||||
.\installcredprovider.ps1 -Force
|
||||
|
||||
Write-Host "Deleting local copy of 'installcredprovider.ps1'..."
|
||||
Remove-Item .\installcredprovider.ps1
|
||||
|
||||
if (-Not("$env:USERPROFILE\.nuget\plugins\netcore")) {
|
||||
Write-Host "CredProvider plugin was not installed correctly!"
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message 'CredProvider plugin was not installed correctly!'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host "CredProvider plugin was installed correctly!"
|
||||
Write-Host 'CredProvider plugin was installed correctly!'
|
||||
}
|
||||
|
||||
# Then, we set the 'VSS_NUGET_EXTERNAL_FEED_ENDPOINTS' environment variable to restore from the stable
|
||||
@@ -49,7 +48,7 @@ function SetupCredProvider {
|
||||
$nugetConfigPath = "$RepoRoot\NuGet.config"
|
||||
|
||||
if (-Not (Test-Path -Path $nugetConfigPath)) {
|
||||
Write-Host "NuGet.config file not found in repo's root!"
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'NuGet.config file not found in repo root!'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -81,7 +80,7 @@ function SetupCredProvider {
|
||||
}
|
||||
else
|
||||
{
|
||||
Write-Host "No internal endpoints found in NuGet.config"
|
||||
Write-Host 'No internal endpoints found in NuGet.config'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +98,7 @@ function InstallDotNetSdkAndRestoreArcade {
|
||||
|
||||
& $dotnet restore $restoreProjPath
|
||||
|
||||
Write-Host "Arcade SDK restored!"
|
||||
Write-Host 'Arcade SDK restored!'
|
||||
|
||||
if (Test-Path -Path $restoreProjPath) {
|
||||
Remove-Item $restoreProjPath
|
||||
@@ -113,23 +112,22 @@ function InstallDotNetSdkAndRestoreArcade {
|
||||
try {
|
||||
Push-Location $PSScriptRoot
|
||||
|
||||
if ($Operation -like "setup") {
|
||||
if ($Operation -like 'setup') {
|
||||
SetupCredProvider $AuthToken
|
||||
}
|
||||
elseif ($Operation -like "install-restore") {
|
||||
elseif ($Operation -like 'install-restore') {
|
||||
InstallDotNetSdkAndRestoreArcade
|
||||
}
|
||||
else {
|
||||
Write-Host "Unknown operation '$Operation'!"
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message "Unknown operation '$Operation'!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Arcade' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
Pop-Location
|
||||
}
|
||||
@@ -30,7 +30,7 @@ function SetupCredProvider {
|
||||
rm installcredprovider.sh
|
||||
|
||||
if [ ! -d "$HOME/.nuget/plugins" ]; then
|
||||
echo "CredProvider plugin was not installed correctly!"
|
||||
Write-PipelineTelemetryError -category 'Build' 'CredProvider plugin was not installed correctly!'
|
||||
ExitWithExitCode 1
|
||||
else
|
||||
echo "CredProvider plugin was installed correctly!"
|
||||
@@ -42,7 +42,7 @@ function SetupCredProvider {
|
||||
local nugetConfigPath="$repo_root/NuGet.config"
|
||||
|
||||
if [ ! "$nugetConfigPath" ]; then
|
||||
echo "NuGet.config file not found in repo's root!"
|
||||
Write-PipelineTelemetryError -category 'Build' "NuGet.config file not found in repo's root!"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $verbosity = 'minimal',
|
||||
[bool] $warnAsError = $true,
|
||||
[bool] $nodeReuse = $true,
|
||||
[switch] $ci,
|
||||
@@ -18,9 +18,8 @@ try {
|
||||
MSBuild @extraArgs
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ function ExpandZip {
|
||||
echo "'Force flag enabled, but '$output_directory' exists. Removing directory"
|
||||
rm -rf $output_directory
|
||||
if [[ $? != 0 ]]; then
|
||||
echo Unable to remove '$output_directory'>&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to remove '$output_directory'"
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
@@ -45,7 +45,7 @@ function ExpandZip {
|
||||
echo "Extracting archive"
|
||||
tar -xf $zip_path -C $output_directory
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Unable to extract '$zip_path'" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Unable to extract '$zip_path'"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -117,7 +117,7 @@ function DownloadAndExtract {
|
||||
# Download file
|
||||
GetFile "$uri" "$temp_tool_path" $force $download_retries $retry_wait_time_seconds
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to download '$uri' to '$temp_tool_path'." >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to download '$uri' to '$temp_tool_path'."
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -125,7 +125,7 @@ function DownloadAndExtract {
|
||||
echo "extracting from $temp_tool_path to $installDir"
|
||||
ExpandZip "$temp_tool_path" "$installDir" $force $download_retries $retry_wait_time_seconds
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Failed to extract '$temp_tool_path' to '$installDir'." >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Failed to extract '$temp_tool_path' to '$installDir'."
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -148,7 +148,7 @@ function NewScriptShim {
|
||||
fi
|
||||
|
||||
if [[ ! -f $tool_file_path ]]; then
|
||||
echo "Specified tool file path:'$tool_file_path' does not exist" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
|
||||
return 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ fi
|
||||
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Installation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -110,7 +110,7 @@ fi
|
||||
NewScriptShim $shim_path $tool_file_path true
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Shim generation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ fi
|
||||
DownloadAndExtract $uri $tool_install_directory $force $download_retries $retry_wait_time_seconds
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Installation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Installation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -110,7 +110,7 @@ fi
|
||||
NewScriptShim $shim_path $tool_file_path true
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
echo "Shim generation failed" >&2
|
||||
Write-PipelineTelemetryError -category 'NativeToolsBootstrap' 'Shim generation failed'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ Param (
|
||||
[int] $RetryWaitTimeInSeconds = 30
|
||||
)
|
||||
|
||||
. $PSScriptRoot\..\pipeline-logging-functions.ps1
|
||||
|
||||
# Import common library modules
|
||||
Import-Module -Name (Join-Path $CommonLibraryDirectory "CommonLibrary.psm1")
|
||||
|
||||
@@ -93,7 +95,7 @@ try {
|
||||
-Verbose:$Verbose
|
||||
|
||||
if ($InstallStatus -Eq $False) {
|
||||
Write-Error "Installation failed"
|
||||
Write-PipelineTelemetryError "Installation failed" -Category "NativeToolsetBootstrapping"
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
@@ -103,7 +105,7 @@ try {
|
||||
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
|
||||
exit 1
|
||||
} elseif (@($ToolFilePath).Length -Lt 1) {
|
||||
Write-Error "$ToolName was not found in $ToolFilePath."
|
||||
Write-Host "$ToolName was not found in $ToolFilePath."
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -117,14 +119,14 @@ try {
|
||||
-Verbose:$Verbose
|
||||
|
||||
if ($GenerateShimStatus -Eq $False) {
|
||||
Write-Error "Generate shim failed"
|
||||
Write-PipelineTelemetryError "Generate shim failed" -Category "NativeToolsetBootstrapping"
|
||||
return 1
|
||||
}
|
||||
|
||||
exit 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "NativeToolsetBootstrapping" -Message $_
|
||||
exit 1
|
||||
}
|
||||
@@ -9,12 +9,12 @@ Param(
|
||||
[string] $Branch=$env:BUILD_SOURCEBRANCH,
|
||||
[string] $CommitSha=$env:BUILD_SOURCEVERSION,
|
||||
[string] $BuildNumber=$env:BUILD_BUILDNUMBER,
|
||||
[string] $RunCategories="coreclr corefx",
|
||||
[string] $RunCategories="Libraries Runtime",
|
||||
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
|
||||
[string] $Kind="micro",
|
||||
[switch] $Internal,
|
||||
[switch] $Compare,
|
||||
[string] $Configurations="CompilationMode=$CompilationMode"
|
||||
[string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind"
|
||||
)
|
||||
|
||||
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
|
||||
@@ -49,7 +49,8 @@ if ($Internal) {
|
||||
$HelixSourcePrefix = "official"
|
||||
}
|
||||
|
||||
$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
|
||||
# FIX ME: This is a workaround until we get this from the actual pipeline
|
||||
$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
|
||||
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
|
||||
|
||||
if ($RunFromPerformanceRepo) {
|
||||
|
||||
@@ -13,9 +13,9 @@ build_number=$BUILD_BUILDNUMBER
|
||||
internal=false
|
||||
compare=false
|
||||
kind="micro"
|
||||
run_categories="coreclr corefx"
|
||||
run_categories="Libraries Runtime"
|
||||
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
|
||||
configurations=
|
||||
configurations="CompliationMode=$compilation_mode RunKind=$kind"
|
||||
run_from_perf_repo=false
|
||||
use_core_run=true
|
||||
use_baseline_core_run=true
|
||||
@@ -164,7 +164,7 @@ if [[ "$internal" == true ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations"
|
||||
common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
|
||||
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
|
||||
|
||||
if [[ "$run_from_perf_repo" = true ]]; then
|
||||
|
||||
@@ -12,6 +12,7 @@ $script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"
|
||||
# TODO: BUG: Escape % ???
|
||||
# TODO: Add test to verify don't need to escape "=".
|
||||
|
||||
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
|
||||
function Write-PipelineTelemetryError {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
@@ -25,49 +26,53 @@ function Write-PipelineTelemetryError {
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput)
|
||||
[switch]$AsOutput,
|
||||
[switch]$Force)
|
||||
|
||||
$PSBoundParameters.Remove("Category") | Out-Null
|
||||
$PSBoundParameters.Remove('Category') | Out-Null
|
||||
|
||||
$Message = "(NETCORE_ENGINEERING_TELEMETRY=$Category) $Message"
|
||||
$PSBoundParameters.Remove("Message") | Out-Null
|
||||
$PSBoundParameters.Add("Message", $Message)
|
||||
|
||||
$PSBoundParameters.Remove('Message') | Out-Null
|
||||
$PSBoundParameters.Add('Message', $Message)
|
||||
Write-PipelineTaskError @PSBoundParameters
|
||||
}
|
||||
|
||||
# Specify "-Force" to force pipeline formatted output even if "$ci" is false or not set
|
||||
function Write-PipelineTaskError {
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Message,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Type = 'error',
|
||||
[string]$ErrCode,
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput)
|
||||
|
||||
if(!$ci) {
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$Message,
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$Type = 'error',
|
||||
[string]$ErrCode,
|
||||
[string]$SourcePath,
|
||||
[string]$LineNumber,
|
||||
[string]$ColumnNumber,
|
||||
[switch]$AsOutput,
|
||||
[switch]$Force
|
||||
)
|
||||
|
||||
if(!$Force -And (-Not (Test-Path variable:ci) -Or !$ci)) {
|
||||
if($Type -eq 'error') {
|
||||
Write-Host $Message -ForegroundColor Red
|
||||
return
|
||||
Write-Host $Message -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
elseif ($Type -eq 'warning') {
|
||||
Write-Host $Message -ForegroundColor Yellow
|
||||
return
|
||||
Write-Host $Message -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
|
||||
Write-Host $Message
|
||||
return
|
||||
}
|
||||
if(-not $PSBoundParameters.ContainsKey('Type')) {
|
||||
$PSBoundParameters.Add('Type', 'error')
|
||||
}
|
||||
Write-LogIssue @PSBoundParameters
|
||||
}
|
||||
|
||||
if(($Type -ne 'error') -and ($Type -ne 'warning')) {
|
||||
Write-Host $Message
|
||||
return
|
||||
}
|
||||
$PSBoundParameters.Remove('Force') | Out-Null
|
||||
if(-not $PSBoundParameters.ContainsKey('Type')) {
|
||||
$PSBoundParameters.Add('Type', 'error')
|
||||
}
|
||||
Write-LogIssue @PSBoundParameters
|
||||
}
|
||||
|
||||
function Write-PipelineSetVariable {
|
||||
@@ -80,7 +85,7 @@ function Write-PipelineTaskError {
|
||||
[switch]$AsOutput,
|
||||
[bool]$IsMultiJobVariable=$true)
|
||||
|
||||
if($ci) {
|
||||
if((Test-Path variable:ci) -And $ci) {
|
||||
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
|
||||
'variable' = $Name
|
||||
'isSecret' = $Secret
|
||||
@@ -95,7 +100,8 @@ function Write-PipelineTaskError {
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]$Path,
|
||||
[switch]$AsOutput)
|
||||
if($ci) {
|
||||
|
||||
if((Test-Path variable:ci) -And $ci) {
|
||||
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
|
||||
}
|
||||
}
|
||||
@@ -231,4 +237,4 @@ function Write-LogIssue {
|
||||
}
|
||||
|
||||
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
function Write-PipelineTelemetryError {
|
||||
local telemetry_category=''
|
||||
local force=false
|
||||
local function_args=()
|
||||
local message=''
|
||||
while [[ $# -gt 0 ]]; do
|
||||
@@ -11,6 +12,9 @@ function Write-PipelineTelemetryError {
|
||||
telemetry_category=$2
|
||||
shift
|
||||
;;
|
||||
-force|-f)
|
||||
force=true
|
||||
;;
|
||||
-*)
|
||||
function_args+=("$1 $2")
|
||||
shift
|
||||
@@ -22,19 +26,22 @@ function Write-PipelineTelemetryError {
|
||||
shift
|
||||
done
|
||||
|
||||
if [[ "$ci" != true ]]; then
|
||||
if [[ $force != true ]] && [[ "$ci" != true ]]; then
|
||||
echo "$message" >&2
|
||||
return
|
||||
fi
|
||||
|
||||
message="(NETCORE_ENGINEERING_TELEMETRY=$telemetry_category) $message"
|
||||
function_args+=("$message")
|
||||
if [[ $force == true ]]; then
|
||||
function_args+=("-force")
|
||||
fi
|
||||
|
||||
Write-PipelineTaskError $function_args
|
||||
}
|
||||
|
||||
function Write-PipelineTaskError {
|
||||
if [[ "$ci" != true ]]; then
|
||||
if [[ $force != true ]] && [[ "$ci" != true ]]; then
|
||||
echo "$@" >&2
|
||||
return
|
||||
fi
|
||||
|
||||
+10
-10
@@ -2,26 +2,26 @@ param(
|
||||
[Parameter(Mandatory=$true)][int] $BuildId,
|
||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
# Check that the channel we are going to promote the build to exist
|
||||
$channelInfo = Get-MaestroChannel -ChannelId $ChannelId
|
||||
|
||||
if (!$channelInfo) {
|
||||
Write-Host "Channel with BAR ID $ChannelId was not found in BAR!"
|
||||
Write-PipelineTelemetryCategory -Category 'PromoteBuild' -Message "Channel with BAR ID $ChannelId was not found in BAR!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
# Get info about which channels the build has already been promoted to
|
||||
# Get info about which channel(s) the build has already been promoted to
|
||||
$buildInfo = Get-MaestroBuild -BuildId $BuildId
|
||||
|
||||
if (!$buildInfo) {
|
||||
Write-Host "Build with BAR ID $BuildId was not found in BAR!"
|
||||
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "Build with BAR ID $BuildId was not found in BAR!"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ try {
|
||||
|
||||
Assign-BuildToChannel -BuildId $BuildId -ChannelId $ChannelId
|
||||
|
||||
Write-Host "done."
|
||||
Write-Host 'done.'
|
||||
}
|
||||
catch {
|
||||
Write-Host "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'PromoteBuild' -Message "There was an error while trying to promote build '$BuildId' to channel '$ChannelId'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -2,20 +2,20 @@ param(
|
||||
[Parameter(Mandatory=$true)][int] $BarBuildId, # ID of the build which assets should be downloaded
|
||||
[Parameter(Mandatory=$true)][string] $DropLocation, # Where the assets should be downloaded to
|
||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken, # Token used to access Maestro API
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com", # Maestro API URL
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16" # Version of Maestro API to use
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com', # Maestro API URL
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16' # Version of Maestro API to use
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
Write-Host "Installing DARC ..."
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
Write-Host 'Installing DARC ...'
|
||||
|
||||
. $PSScriptRoot\..\darc-init.ps1
|
||||
$exitCode = $LASTEXITCODE
|
||||
|
||||
if ($exitCode -ne 0) {
|
||||
Write-PipelineTaskError "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
|
||||
Write-PipelineTelemetryError -Category "Darc" -Message "Something failed while running 'darc-init.ps1'. Check for errors above. Exiting now..."
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
|
||||
@@ -38,8 +38,7 @@ try {
|
||||
--latest-location
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category "Darc" -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -6,20 +6,19 @@ param(
|
||||
[Parameter(Mandatory=$true)][string] $ToolDestinationPath # Where the validation tool should be downloaded to
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
try {
|
||||
$url = "https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1"
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
New-Item -ItemType "directory" -Path ${ToolDestinationPath} -Force
|
||||
$url = 'https://raw.githubusercontent.com/NuGet/NuGetGallery/jver-verify/src/VerifyMicrosoftPackage/verify.ps1'
|
||||
|
||||
New-Item -ItemType 'directory' -Path ${ToolDestinationPath} -Force
|
||||
|
||||
Invoke-WebRequest $url -OutFile ${ToolDestinationPath}\verify.ps1
|
||||
|
||||
& ${ToolDestinationPath}\verify.ps1 ${PackagesPath}\*.nupkg
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTaskError "NuGet package validation failed. Please check error logs."
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
# Most of the functions in this file require the variables `MaestroApiEndPoint`,
|
||||
# `MaestroApiVersion` and `MaestroApiAccessToken` to be globally available.
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$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
|
||||
$disableConfigureToolsetImport = "true"
|
||||
$disableConfigureToolsetImport = $true
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
function Create-MaestroApiRequestHeaders([string]$ContentType = "application/json") {
|
||||
function Create-MaestroApiRequestHeaders([string]$ContentType = 'application/json') {
|
||||
Validate-MaestroVars
|
||||
|
||||
$headers = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
||||
@@ -51,14 +51,6 @@ function Get-MaestroSubscriptions([string]$SourceRepository, [int]$ChannelId) {
|
||||
return $result
|
||||
}
|
||||
|
||||
function Trigger-Subscription([string]$SubscriptionId) {
|
||||
Validate-MaestroVars
|
||||
|
||||
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
|
||||
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
|
||||
Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
|
||||
}
|
||||
|
||||
function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
|
||||
Validate-MaestroVars
|
||||
|
||||
@@ -67,24 +59,32 @@ function Assign-BuildToChannel([int]$BuildId, [int]$ChannelId) {
|
||||
Invoke-WebRequest -Method Post -Uri $apiEndpoint -Headers $apiHeaders | Out-Null
|
||||
}
|
||||
|
||||
function Trigger-Subscription([string]$SubscriptionId) {
|
||||
Validate-MaestroVars
|
||||
|
||||
$apiHeaders = Create-MaestroApiRequestHeaders -AuthToken $MaestroApiAccessToken
|
||||
$apiEndpoint = "$MaestroApiEndPoint/api/subscriptions/$SubscriptionId/trigger?api-version=$MaestroApiVersion"
|
||||
Invoke-WebRequest -Uri $apiEndpoint -Headers $apiHeaders -Method Post | Out-Null
|
||||
}
|
||||
|
||||
function Validate-MaestroVars {
|
||||
try {
|
||||
Get-Variable MaestroApiEndPoint -Scope Global | Out-Null
|
||||
Get-Variable MaestroApiVersion -Scope Global | Out-Null
|
||||
Get-Variable MaestroApiAccessToken -Scope Global | Out-Null
|
||||
|
||||
if (!($MaestroApiEndPoint -Match "^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$")) {
|
||||
Write-PipelineTaskError "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
|
||||
if (!($MaestroApiEndPoint -Match '^http[s]?://maestro-(int|prod).westus2.cloudapp.azure.com$')) {
|
||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiEndPoint is not a valid Maestro URL. '$MaestroApiEndPoint'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if (!($MaestroApiVersion -Match "^[0-9]{4}-[0-9]{2}-[0-9]{2}$")) {
|
||||
Write-PipelineTaskError "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
|
||||
if (!($MaestroApiVersion -Match '^[0-9]{4}-[0-9]{2}-[0-9]{2}$')) {
|
||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message "MaestroApiVersion does not match a version string in the format yyyy-MM-DD. '$MaestroApiVersion'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTaskError "Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script."
|
||||
Write-PipelineTelemetryError -Category 'MaestroVars' -Message 'Error: Variables `MaestroApiEndPoint`, `MaestroApiVersion` and `MaestroApiAccessToken` are required while using this script.'
|
||||
Write-Host $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ $ValidatePackage = {
|
||||
|
||||
# Extensions for which we'll look for SourceLink information
|
||||
# For now we'll only care about Portable & Embedded PDBs
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
$RelevantExtensions = @('.dll', '.exe', '.pdb')
|
||||
|
||||
Write-Host -NoNewLine "Validating" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
Write-Host -NoNewLine 'Validating ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
@@ -58,7 +58,7 @@ $ValidatePackage = {
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $FakeName
|
||||
|
||||
# We ignore resource DLLs
|
||||
if ($FileName.EndsWith(".resources.dll")) {
|
||||
if ($FileName.EndsWith('.resources.dll')) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ $ValidatePackage = {
|
||||
$Uri = $Link -as [System.URI]
|
||||
|
||||
# Only GitHub links are valid
|
||||
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match "github" -or $Uri.Host -match "githubusercontent")) {
|
||||
if ($Uri.AbsoluteURI -ne $null -and ($Uri.Host -match 'github' -or $Uri.Host -match 'githubusercontent')) {
|
||||
$Status = (Invoke-WebRequest -Uri $Link -UseBasicParsing -Method HEAD -TimeoutSec 5).StatusCode
|
||||
}
|
||||
else {
|
||||
@@ -143,19 +143,19 @@ $ValidatePackage = {
|
||||
}
|
||||
|
||||
if ($FailedFiles -eq 0) {
|
||||
Write-Host "Passed."
|
||||
Write-Host 'Passed.'
|
||||
return 0
|
||||
}
|
||||
else {
|
||||
Write-Host "$PackagePath has broken SourceLink links."
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$PackagePath has broken SourceLink links."
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
function ValidateSourceLinkLinks {
|
||||
if ($GHRepoName -ne "" -and !($GHRepoName -Match "^[^\s\/]+/[^\s\/]+$")) {
|
||||
if (!($GHRepoName -Match "^[^\s-]+-[^\s]+$")) {
|
||||
Write-PipelineTaskError "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
|
||||
if ($GHRepoName -ne '' -and !($GHRepoName -Match '^[^\s\/]+/[^\s\/]+$')) {
|
||||
if (!($GHRepoName -Match '^[^\s-]+-[^\s]+$')) {
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHRepoName should be in the format <org>/<repo> or <org>-<repo>. '$GHRepoName'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
@@ -163,14 +163,14 @@ 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 -ne '' -and !($GHCommit -Match '^[0-9a-fA-F]{40}$')) {
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "GHCommit should be a 40 chars hexadecimal string. '$GHCommit'"
|
||||
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")
|
||||
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')
|
||||
|
||||
try {
|
||||
# Retrieve the list of files in the repo at that particular commit point and store them in the RepoFiles hash
|
||||
@@ -188,8 +188,8 @@ function ValidateSourceLinkLinks {
|
||||
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."
|
||||
elseif ($GHRepoName -ne '' -or $GHCommit -ne '') {
|
||||
Write-Host 'For using the http caching mechanism both GHRepoName and GHCommit should be informed.'
|
||||
}
|
||||
|
||||
if (Test-Path $ExtractPath) {
|
||||
@@ -217,18 +217,18 @@ function ValidateSourceLinkLinks {
|
||||
$ValidationFailures = 0
|
||||
foreach ($Job in @(Get-Job)) {
|
||||
$jobResult = Wait-Job -Id $Job.Id | Receive-Job
|
||||
if ($jobResult -ne "0") {
|
||||
if ($jobResult -ne '0') {
|
||||
$ValidationFailures++
|
||||
}
|
||||
}
|
||||
if ($ValidationFailures -gt 0) {
|
||||
Write-PipelineTaskError " $ValidationFailures package(s) failed validation."
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message "$ValidationFailures package(s) failed validation."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
function InstallSourcelinkCli {
|
||||
$sourcelinkCliPackageName = "sourcelink"
|
||||
$sourcelinkCliPackageName = 'sourcelink'
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
@@ -239,7 +239,7 @@ function InstallSourcelinkCli {
|
||||
}
|
||||
else {
|
||||
Write-Host "Installing SourceLink CLI version $sourcelinkCliVersion..."
|
||||
Write-Host "You may need to restart your command window if this is the first dotnet tool you have installed."
|
||||
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
|
||||
& "$dotnet" tool install $sourcelinkCliPackageName --version $sourcelinkCliVersion --verbosity "minimal" --global
|
||||
}
|
||||
}
|
||||
@@ -250,8 +250,8 @@ try {
|
||||
ValidateSourceLinkLinks
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'SourceLink' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -4,10 +4,6 @@ param(
|
||||
[Parameter(Mandatory=$true)][string] $DotnetSymbolVersion # Version of dotnet symbol to use
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
function FirstMatchingSymbolDescriptionOrDefault {
|
||||
param(
|
||||
[string] $FullPath, # Full path to the module that has to be checked
|
||||
@@ -23,19 +19,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
||||
# checking and which type of file was uploaded.
|
||||
|
||||
# The file itself is returned
|
||||
$SymbolPath = $SymbolsPath + "\" + $FileName
|
||||
$SymbolPath = $SymbolsPath + '\' + $FileName
|
||||
|
||||
# PDB file for the module
|
||||
$PdbPath = $SymbolPath.Replace($Extension, ".pdb")
|
||||
$PdbPath = $SymbolPath.Replace($Extension, '.pdb')
|
||||
|
||||
# PDB file for R2R module (created by crossgen)
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, ".ni.pdb")
|
||||
$NGenPdb = $SymbolPath.Replace($Extension, '.ni.pdb')
|
||||
|
||||
# DBG file for a .so library
|
||||
$SODbg = $SymbolPath.Replace($Extension, ".so.dbg")
|
||||
$SODbg = $SymbolPath.Replace($Extension, '.so.dbg')
|
||||
|
||||
# DWARF file for a .dylib
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, ".dylib.dwarf")
|
||||
$DylibDwarf = $SymbolPath.Replace($Extension, '.dylib.dwarf')
|
||||
|
||||
$dotnetSymbolExe = "$env:USERPROFILE\.dotnet\tools"
|
||||
$dotnetSymbolExe = Resolve-Path "$dotnetSymbolExe\dotnet-symbol.exe"
|
||||
@@ -43,19 +39,19 @@ function FirstMatchingSymbolDescriptionOrDefault {
|
||||
& $dotnetSymbolExe --symbols --modules --windows-pdbs $TargetServerParam $FullPath -o $SymbolsPath | Out-Null
|
||||
|
||||
if (Test-Path $PdbPath) {
|
||||
return "PDB"
|
||||
return 'PDB'
|
||||
}
|
||||
elseif (Test-Path $NGenPdb) {
|
||||
return "NGen PDB"
|
||||
return 'NGen PDB'
|
||||
}
|
||||
elseif (Test-Path $SODbg) {
|
||||
return "DBG for SO"
|
||||
return 'DBG for SO'
|
||||
}
|
||||
elseif (Test-Path $DylibDwarf) {
|
||||
return "Dwarf for Dylib"
|
||||
return 'Dwarf for Dylib'
|
||||
}
|
||||
elseif (Test-Path $SymbolPath) {
|
||||
return "Module"
|
||||
return 'Module'
|
||||
}
|
||||
else {
|
||||
return $null
|
||||
@@ -74,7 +70,7 @@ function CountMissingSymbols {
|
||||
}
|
||||
|
||||
# Extensions for which we'll look for symbols
|
||||
$RelevantExtensions = @(".dll", ".exe", ".so", ".dylib")
|
||||
$RelevantExtensions = @('.dll', '.exe', '.so', '.dylib')
|
||||
|
||||
# How many files are missing symbol information
|
||||
$MissingSymbols = 0
|
||||
@@ -82,38 +78,38 @@ function CountMissingSymbols {
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$PackageGuid = New-Guid
|
||||
$ExtractPath = Join-Path -Path $ExtractPath -ChildPath $PackageGuid
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath "Symbols"
|
||||
$SymbolsPath = Join-Path -Path $ExtractPath -ChildPath 'Symbols'
|
||||
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($PackagePath, $ExtractPath)
|
||||
|
||||
Get-ChildItem -Recurse $ExtractPath |
|
||||
Where-Object {$RelevantExtensions -contains $_.Extension} |
|
||||
ForEach-Object {
|
||||
if ($_.FullName -Match "\\ref\\") {
|
||||
Write-Host "`t Ignoring reference assembly file" $_.FullName
|
||||
if ($_.FullName -Match '\\ref\\') {
|
||||
Write-Host "`t Ignoring reference assembly file " $_.FullName
|
||||
return
|
||||
}
|
||||
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--microsoft-symbol-server" $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName "--internal-server" $SymbolsPath
|
||||
$SymbolsOnMSDL = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--microsoft-symbol-server' $SymbolsPath
|
||||
$SymbolsOnSymWeb = FirstMatchingSymbolDescriptionOrDefault $_.FullName '--internal-server' $SymbolsPath
|
||||
|
||||
Write-Host -NoNewLine "`t Checking file" $_.FullName "... "
|
||||
Write-Host -NoNewLine "`t Checking file " $_.FullName "... "
|
||||
|
||||
if ($SymbolsOnMSDL -ne $null -and $SymbolsOnSymWeb -ne $null) {
|
||||
Write-Host "Symbols found on MSDL (" $SymbolsOnMSDL ") and SymWeb (" $SymbolsOnSymWeb ")"
|
||||
Write-Host "Symbols found on MSDL ($SymbolsOnMSDL) and SymWeb ($SymbolsOnSymWeb)"
|
||||
}
|
||||
else {
|
||||
$MissingSymbols++
|
||||
|
||||
if ($SymbolsOnMSDL -eq $null -and $SymbolsOnSymWeb -eq $null) {
|
||||
Write-Host "No symbols found on MSDL or SymWeb!"
|
||||
Write-Host 'No symbols found on MSDL or SymWeb!'
|
||||
}
|
||||
else {
|
||||
if ($SymbolsOnMSDL -eq $null) {
|
||||
Write-Host "No symbols found on MSDL!"
|
||||
Write-Host 'No symbols found on MSDL!'
|
||||
}
|
||||
else {
|
||||
Write-Host "No symbols found on SymWeb!"
|
||||
Write-Host 'No symbols found on SymWeb!'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,27 +128,27 @@ function CheckSymbolsAvailable {
|
||||
Get-ChildItem "$InputPath\*.nupkg" |
|
||||
ForEach-Object {
|
||||
$FileName = $_.Name
|
||||
|
||||
|
||||
# These packages from Arcade-Services include some native libraries that
|
||||
# our current symbol uploader can't handle. Below is a workaround until
|
||||
# we get issue: https://github.com/dotnet/arcade/issues/2457 sorted.
|
||||
if ($FileName -Match "Microsoft\.DotNet\.Darc\.") {
|
||||
if ($FileName -Match 'Microsoft\.DotNet\.Darc\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
elseif ($FileName -Match "Microsoft\.DotNet\.Maestro\.Tasks\.") {
|
||||
elseif ($FileName -Match 'Microsoft\.DotNet\.Maestro\.Tasks\.') {
|
||||
Write-Host "Ignoring Arcade-services file: $FileName"
|
||||
Write-Host
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Write-Host "Validating $FileName "
|
||||
$Status = CountMissingSymbols "$InputPath\$FileName"
|
||||
|
||||
|
||||
if ($Status -ne 0) {
|
||||
Write-PipelineTaskError "Missing symbols for $Status modules in the package $FileName"
|
||||
ExitWithExitCode $exitCode
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message "Missing symbols for $Status modules in the package $FileName"
|
||||
ExitWithExitCode $exitCode
|
||||
}
|
||||
|
||||
Write-Host
|
||||
@@ -160,7 +156,7 @@ function CheckSymbolsAvailable {
|
||||
}
|
||||
|
||||
function InstallDotnetSymbol {
|
||||
$dotnetSymbolPackageName = "dotnet-symbol"
|
||||
$dotnetSymbolPackageName = 'dotnet-symbol'
|
||||
|
||||
$dotnetRoot = InitializeDotNetCli -install:$true
|
||||
$dotnet = "$dotnetRoot\dotnet.exe"
|
||||
@@ -171,19 +167,22 @@ function InstallDotnetSymbol {
|
||||
}
|
||||
else {
|
||||
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."
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
InstallDotnetSymbol
|
||||
|
||||
CheckSymbolsAvailable
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'CheckSymbols' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -2,56 +2,63 @@ param(
|
||||
[Parameter(Mandatory=$true)][string] $SourceRepo,
|
||||
[Parameter(Mandatory=$true)][int] $ChannelId,
|
||||
[Parameter(Mandatory=$true)][string] $MaestroApiAccessToken,
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = "https://maestro-prod.westus2.cloudapp.azure.com",
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = "2019-01-16"
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiEndPoint = 'https://maestro-prod.westus2.cloudapp.azure.com',
|
||||
[Parameter(Mandatory=$false)][string] $MaestroApiVersion = '2019-01-16'
|
||||
)
|
||||
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
try {
|
||||
. $PSScriptRoot\post-build-utils.ps1
|
||||
|
||||
# Get all the $SourceRepo subscriptions
|
||||
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
||||
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
|
||||
# Get all the $SourceRepo subscriptions
|
||||
$normalizedSourceRepo = $SourceRepo.Replace('dnceng@', '')
|
||||
$subscriptions = Get-MaestroSubscriptions -SourceRepository $normalizedSourceRepo -ChannelId $ChannelId
|
||||
|
||||
if (!$subscriptions) {
|
||||
Write-Host "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
if (!$subscriptions) {
|
||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message "No subscriptions found for source repo '$normalizedSourceRepo' in channel '$ChannelId'"
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
|
||||
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
|
||||
$failedTriggeredSubscription = $false
|
||||
$subscriptionsToTrigger = New-Object System.Collections.Generic.List[string]
|
||||
$failedTriggeredSubscription = $false
|
||||
|
||||
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
|
||||
foreach ($subscription in $subscriptions) {
|
||||
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
|
||||
Write-Host "Should trigger this subscription: $subscription.id"
|
||||
[void]$subscriptionsToTrigger.Add($subscription.id)
|
||||
# Get all enabled subscriptions that need dependency flow on 'everyBuild'
|
||||
foreach ($subscription in $subscriptions) {
|
||||
if ($subscription.enabled -and $subscription.policy.updateFrequency -like 'everyBuild' -and $subscription.channel.id -eq $ChannelId) {
|
||||
Write-Host "Should trigger this subscription: ${$subscription.id}"
|
||||
[void]$subscriptionsToTrigger.Add($subscription.id)
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
||||
try {
|
||||
Write-Host "Triggering subscription '$subscriptionToTrigger'."
|
||||
|
||||
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
|
||||
|
||||
Write-Host 'done.'
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
$failedTriggeredSubscription = $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($subscriptionsToTrigger.Count -eq 0) {
|
||||
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
|
||||
}
|
||||
elseif ($failedTriggeredSubscription) {
|
||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message 'At least one subscription failed to be triggered...'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host 'All subscriptions were triggered successfully!'
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($subscriptionToTrigger in $subscriptionsToTrigger) {
|
||||
try {
|
||||
Write-Host "Triggering subscription '$subscriptionToTrigger'."
|
||||
|
||||
Trigger-Subscription -SubscriptionId $subscriptionToTrigger
|
||||
|
||||
Write-Host "done."
|
||||
}
|
||||
catch
|
||||
{
|
||||
Write-Host "There was an error while triggering subscription '$subscriptionToTrigger'"
|
||||
Write-Host $_
|
||||
Write-Host $_.ScriptStackTrace
|
||||
$failedTriggeredSubscription = $true
|
||||
}
|
||||
}
|
||||
|
||||
if ($subscriptionsToTrigger.Count -eq 0) {
|
||||
Write-Host "No subscription matched source repo '$normalizedSourceRepo' and channel ID '$ChannelId'."
|
||||
}
|
||||
elseif ($failedTriggeredSubscription) {
|
||||
Write-Host "At least one subscription failed to be triggered..."
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'TriggerSubscriptions' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
else {
|
||||
Write-Host "All subscriptions were triggered successfully!"
|
||||
}
|
||||
+9
-10
@@ -1,8 +1,8 @@
|
||||
[CmdletBinding(PositionalBinding=$false)]
|
||||
Param(
|
||||
[string] $configuration = "Debug",
|
||||
[string] $configuration = 'Debug',
|
||||
[string] $task,
|
||||
[string] $verbosity = "minimal",
|
||||
[string] $verbosity = 'minimal',
|
||||
[string] $msbuildEngine = $null,
|
||||
[switch] $restore,
|
||||
[switch] $prepareMachine,
|
||||
@@ -32,7 +32,7 @@ function Print-Usage() {
|
||||
}
|
||||
|
||||
function Build([string]$target) {
|
||||
$logSuffix = if ($target -eq "Execute") { "" } else { ".$target" }
|
||||
$logSuffix = if ($target -eq 'Execute') { '' } else { ".$target" }
|
||||
$log = Join-Path $LogDir "$task$logSuffix.binlog"
|
||||
$outputPath = Join-Path $ToolsetDir "$task\\"
|
||||
|
||||
@@ -46,33 +46,32 @@ function Build([string]$target) {
|
||||
}
|
||||
|
||||
try {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains("/help") -or $properties.Contains("/?")))) {
|
||||
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
|
||||
Print-Usage
|
||||
exit 0
|
||||
}
|
||||
|
||||
if ($task -eq "") {
|
||||
Write-Host "Missing required parameter '-task <value>'" -ForegroundColor Red
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Missing required parameter '-task <value>'" -ForegroundColor Red
|
||||
Print-Usage
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$taskProject = GetSdkTaskProject $task
|
||||
if (!(Test-Path $taskProject)) {
|
||||
Write-Host "Unknown task: $task" -ForegroundColor Red
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Unknown task: $task" -ForegroundColor Red
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if ($restore) {
|
||||
Build "Restore"
|
||||
Build 'Restore'
|
||||
}
|
||||
|
||||
Build "Execute"
|
||||
Build 'Execute'
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Param(
|
||||
[string] $Repository=$env:BUILD_REPOSITORY_NAME, # Required: the name of the repository (e.g. dotnet/arcade)
|
||||
[string] $BranchName=$env:BUILD_SOURCEBRANCH, # Optional: name of branch or version of gdn settings; defaults to master
|
||||
[string] $SourceDirectory=$env:BUILD_SOURCESDIRECTORY, # Required: the directory where source files are located
|
||||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ("artifacts")), # Required: the directory where build artifacts are located
|
||||
[string] $ArtifactsDirectory = (Join-Path $env:BUILD_ARTIFACTSTAGINGDIRECTORY ('artifacts')), # Required: the directory where build artifacts are located
|
||||
[string] $AzureDevOpsAccessToken, # Required: access token for dnceng; should be provided via KeyVault
|
||||
[string[]] $SourceToolsList, # Optional: list of SDL tools to run on source code
|
||||
[string[]] $ArtifactToolsList, # Optional: list of SDL tools to run on built artifacts
|
||||
@@ -22,79 +22,89 @@ Param(
|
||||
[string] $TsaCodebaseAdmin, # Optional: only needed if TsaOnboard is true; the aliases which are admins of the TSA codebase (e.g. DOMAIN\alias); TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaBugAreaPath, # Optional: only needed if TsaOnboard is true; the area path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $TsaIterationPath, # Optional: only needed if TsaOnboard is true; the iteration path where TSA will file bugs in AzDO; TSA is the automated framework used to upload test results as bugs.
|
||||
[string] $GuardianLoggerLevel="Standard", # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
|
||||
[string] $GuardianLoggerLevel='Standard', # Optional: the logger level for the Guardian CLI; options are Trace, Verbose, Standard, Warning, and Error
|
||||
[string[]] $CrScanAdditionalRunConfigParams, # Optional: Additional Params to custom build a CredScan run config in the format @("xyz:abc","sdf:1")
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams # Optional: Additional Params to custom build a Policheck run config in the format @("xyz:abc","sdf:1")
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
Set-StrictMode -Version 2.0
|
||||
$LASTEXITCODE = 0
|
||||
try {
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
#Replace repo names to the format of org/repo
|
||||
if (!($Repository.contains('/'))) {
|
||||
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
#Replace repo names to the format of org/repo
|
||||
if (!($Repository.contains('/'))) {
|
||||
$RepoName = $Repository -replace '(.*?)-(.*)', '$1/$2';
|
||||
}
|
||||
else{
|
||||
$RepoName = $Repository;
|
||||
}
|
||||
|
||||
if ($GuardianPackageName) {
|
||||
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path 'tools' 'guardian.cmd'))
|
||||
} else {
|
||||
$guardianCliLocation = $GuardianCliLocation
|
||||
}
|
||||
|
||||
$workingDirectory = (Split-Path $SourceDirectory -Parent)
|
||||
$ValidPath = Test-Path $guardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Invalid Guardian CLI Location.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
& $(Join-Path $PSScriptRoot 'init-sdl.ps1') -GuardianCliLocation $guardianCliLocation -Repository $RepoName -BranchName $BranchName -WorkingDirectory $workingDirectory -AzureDevOpsAccessToken $AzureDevOpsAccessToken -GuardianLoggerLevel $GuardianLoggerLevel
|
||||
$gdnFolder = Join-Path $workingDirectory '.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
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not onboard to TSA -- not all required values ($TsaCodebaseName, $TsaNotificationEmail, $TsaCodebaseAdmin, $TsaBugAreaPath) were specified.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
if ($UpdateBaseline) {
|
||||
& (Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Update baseline'
|
||||
}
|
||||
|
||||
if ($TsaPublish) {
|
||||
if ($TsaBranchName -and $BuildNumber) {
|
||||
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
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message 'Could not publish to TSA -- not all required values ($TsaBranchName, $BuildNumber) were specified.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
$RepoName = $Repository;
|
||||
}
|
||||
|
||||
if ($GuardianPackageName) {
|
||||
$guardianCliLocation = Join-Path $NugetPackageDirectory (Join-Path $GuardianPackageName (Join-Path "tools" "guardian.cmd"))
|
||||
} else {
|
||||
$guardianCliLocation = $GuardianCliLocation
|
||||
}
|
||||
|
||||
$workingDirectory = (Split-Path $SourceDirectory -Parent)
|
||||
$ValidPath = Test-Path $guardianCliLocation
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-Host "Invalid Guardian CLI Location."
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
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"
|
||||
|
||||
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
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-onboard failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-Host "Could not onboard to TSA -- not all required values ($$TsaCodebaseName, $$TsaNotificationEmail, $$TsaCodebaseAdmin, $$TsaBugAreaPath) were specified."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
if ($UpdateBaseline) {
|
||||
& (Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $RepoName -BranchName $BranchName -GdnFolder $GdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Update baseline"
|
||||
}
|
||||
|
||||
if ($TsaPublish) {
|
||||
if ($TsaBranchName -and $BuildNumber) {
|
||||
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
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian tsa-publish failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
} else {
|
||||
Write-Host "Could not publish to TSA -- not all required values ($$TsaBranchName, $$BuildNumber) were specified."
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
@@ -3,55 +3,16 @@ param(
|
||||
[Parameter(Mandatory=$true)][string] $ExtractPath # Full path to directory where the packages will be extracted
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$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
|
||||
$disableConfigureToolsetImport = "true"
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
$disableConfigureToolsetImport = $true
|
||||
|
||||
$ExtractPackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a NuGet package
|
||||
)
|
||||
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-PipelineTaskError "Input file does not exist: $PackagePath"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$RelevantExtensions = @(".dll", ".exe", ".pdb")
|
||||
Write-Host -NoNewLine "Extracting" ([System.IO.Path]::GetFileName($PackagePath)) "... "
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
try {
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
||||
}
|
||||
finally {
|
||||
$zip.Dispose()
|
||||
}
|
||||
}
|
||||
function ExtractArtifacts {
|
||||
function ExtractArtifacts {
|
||||
if (!(Test-Path $InputPath)) {
|
||||
Write-Host "Input Path does not exist: $InputPath"
|
||||
ExitWithExitCode 0
|
||||
@@ -68,11 +29,52 @@ $ExtractPackage = {
|
||||
}
|
||||
|
||||
try {
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
$ExtractPackage = {
|
||||
param(
|
||||
[string] $PackagePath # Full path to a NuGet package
|
||||
)
|
||||
|
||||
if (!(Test-Path $PackagePath)) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message "Input file does not exist: $PackagePath"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$RelevantExtensions = @('.dll', '.exe', '.pdb')
|
||||
Write-Host -NoNewLine 'Extracting ' ([System.IO.Path]::GetFileName($PackagePath)) '...'
|
||||
|
||||
$PackageId = [System.IO.Path]::GetFileNameWithoutExtension($PackagePath)
|
||||
$ExtractPath = Join-Path -Path $using:ExtractPath -ChildPath $PackageId
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
[System.IO.Directory]::CreateDirectory($ExtractPath);
|
||||
|
||||
try {
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($PackagePath)
|
||||
|
||||
$zip.Entries |
|
||||
Where-Object {$RelevantExtensions -contains [System.IO.Path]::GetExtension($_.Name)} |
|
||||
ForEach-Object {
|
||||
$TargetFile = Join-Path -Path $ExtractPath -ChildPath $_.Name
|
||||
|
||||
[System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, $TargetFile, $true)
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
finally {
|
||||
$zip.Dispose()
|
||||
}
|
||||
}
|
||||
Measure-Command { ExtractArtifacts }
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
Write-Host $_.Exception
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
+25
-13
@@ -1,16 +1,19 @@
|
||||
Param(
|
||||
[string] $GuardianCliLocation,
|
||||
[string] $Repository,
|
||||
[string] $BranchName="master",
|
||||
[string] $BranchName='master',
|
||||
[string] $WorkingDirectory,
|
||||
[string] $AzureDevOpsAccessToken,
|
||||
[string] $GuardianLoggerLevel="Standard"
|
||||
[string] $GuardianLoggerLevel='Standard'
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
# Don't display the console progress UI - it's a huge perf hit
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
@@ -21,11 +24,10 @@ $uri = "https://dev.azure.com/dnceng/internal/_apis/git/repositories/sdl-tool-cf
|
||||
$zipFile = "$WorkingDirectory/gdn.zip"
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
$gdnFolder = (Join-Path $WorkingDirectory ".gdn")
|
||||
Try
|
||||
{
|
||||
$gdnFolder = (Join-Path $WorkingDirectory '.gdn')
|
||||
try {
|
||||
# We try to download the zip; if the request fails (e.g. the file doesn't exist), we catch it and init guardian instead
|
||||
Write-Host "Downloading gdn folder from internal config repostiory..."
|
||||
Write-Host 'Downloading gdn folder from internal config repostiory...'
|
||||
Invoke-WebRequest -Headers @{ "Accept"="application/zip"; "Authorization"="Basic $encodedPat" } -Uri $uri -OutFile $zipFile
|
||||
if (Test-Path $gdnFolder) {
|
||||
# Remove the gdn folder if it exists (it shouldn't unless there's too much caching; this is just in case)
|
||||
@@ -33,19 +35,29 @@ Try
|
||||
}
|
||||
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $WorkingDirectory)
|
||||
Write-Host $gdnFolder
|
||||
} Catch [System.Net.WebException] {
|
||||
ExitWithExitCode 0
|
||||
} catch [System.Net.WebException] { } # Catch and ignore webexception
|
||||
try {
|
||||
# if the folder does not exist, we'll do a guardian init and push it to the remote repository
|
||||
Write-Host "Initializing Guardian..."
|
||||
Write-Host 'Initializing Guardian...'
|
||||
Write-Host "$GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel"
|
||||
& $GuardianCliLocation init --working-directory $WorkingDirectory --logger-level $GuardianLoggerLevel
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Guardian init failed with exit code $LASTEXITCODE."
|
||||
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian init failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
# We create the mainbaseline so it can be edited later
|
||||
Write-Host "$GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline"
|
||||
& $GuardianCliLocation baseline --working-directory $WorkingDirectory --name mainbaseline
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Guardian baseline failed with exit code $LASTEXITCODE."
|
||||
Write-PipelineTelemetryError -Force -Category 'Build' -Message "Guardian baseline failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
& $(Join-Path $PSScriptRoot "push-gdn.ps1") -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason "Initialize gdn folder"
|
||||
}
|
||||
& $(Join-Path $PSScriptRoot 'push-gdn.ps1') -Repository $Repository -BranchName $BranchName -GdnFolder $gdnFolder -AzureDevOpsAccessToken $AzureDevOpsAccessToken -PushReason 'Initialize gdn folder'
|
||||
ExitWithExitCode 0
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
+53
-39
@@ -1,51 +1,65 @@
|
||||
Param(
|
||||
[string] $Repository,
|
||||
[string] $BranchName="master",
|
||||
[string] $BranchName='master',
|
||||
[string] $GdnFolder,
|
||||
[string] $AzureDevOpsAccessToken,
|
||||
[string] $PushReason
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
# We create the temp directory where we'll store the sdl-config repository
|
||||
$sdlDir = Join-Path $env:TEMP "sdl"
|
||||
if (Test-Path $sdlDir) {
|
||||
Remove-Item -Force -Recurse $sdlDir
|
||||
}
|
||||
try {
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
Write-Host "git clone https://dnceng:`$[email protected]/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
|
||||
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git clone failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
# We copy the .gdn folder from our local run into the git repository so it can be committed
|
||||
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) ".gdn"
|
||||
if (Get-Command Robocopy) {
|
||||
Robocopy /S $GdnFolder $sdlRepositoryFolder
|
||||
} else {
|
||||
rsync -r $GdnFolder $sdlRepositoryFolder
|
||||
}
|
||||
# cd to the sdl-config directory so we can run git there
|
||||
Push-Location $sdlDir
|
||||
# git add . --> git commit --> git push
|
||||
Write-Host "git add ."
|
||||
git add .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git add failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
Write-Host "git -c user.email=`"[email protected]`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
|
||||
git -c user.email="[email protected]" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git commit failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
Write-Host "git push"
|
||||
git push
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Error "Git push failed with exit code $LASTEXITCODE."
|
||||
}
|
||||
# We create the temp directory where we'll store the sdl-config repository
|
||||
$sdlDir = Join-Path $env:TEMP 'sdl'
|
||||
if (Test-Path $sdlDir) {
|
||||
Remove-Item -Force -Recurse $sdlDir
|
||||
}
|
||||
|
||||
# Return to the original directory
|
||||
Pop-Location
|
||||
Write-Host "git clone https://dnceng:`$[email protected]/dnceng/internal/_git/sdl-tool-cfg $sdlDir"
|
||||
git clone https://dnceng:$AzureDevOpsAccessToken@dev.azure.com/dnceng/internal/_git/sdl-tool-cfg $sdlDir
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git clone failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
# We copy the .gdn folder from our local run into the git repository so it can be committed
|
||||
$sdlRepositoryFolder = Join-Path (Join-Path (Join-Path $sdlDir $Repository) $BranchName) '.gdn'
|
||||
if (Get-Command Robocopy) {
|
||||
Robocopy /S $GdnFolder $sdlRepositoryFolder
|
||||
} else {
|
||||
rsync -r $GdnFolder $sdlRepositoryFolder
|
||||
}
|
||||
# cd to the sdl-config directory so we can run git there
|
||||
Push-Location $sdlDir
|
||||
# git add . --> git commit --> git push
|
||||
Write-Host 'git add .'
|
||||
git add .
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git add failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
Write-Host "git -c user.email=`"[email protected]`" -c user.name=`"Dotnet Bot`" commit -m `"$PushReason for $Repository/$BranchName`""
|
||||
git -c user.email="[email protected]" -c user.name="Dotnet Bot" commit -m "$PushReason for $Repository/$BranchName"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git commit failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
Write-Host 'git push'
|
||||
git push
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Git push failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
|
||||
# Return to the original directory
|
||||
Pop-Location
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
+49
-39
@@ -5,55 +5,65 @@ Param(
|
||||
[string] $GdnFolder,
|
||||
[string[]] $ToolsList,
|
||||
[string] $UpdateBaseline,
|
||||
[string] $GuardianLoggerLevel="Standard",
|
||||
[string] $GuardianLoggerLevel='Standard',
|
||||
[string[]] $CrScanAdditionalRunConfigParams,
|
||||
[string[]] $PoliCheckAdditionalRunConfigParams
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
Set-StrictMode -Version 2.0
|
||||
$disableConfigureToolsetImport = $true
|
||||
$LASTEXITCODE = 0
|
||||
|
||||
# We store config files in the r directory of .gdn
|
||||
Write-Host $ToolsList
|
||||
$gdnConfigPath = Join-Path $GdnFolder "r"
|
||||
$ValidPath = Test-Path $GuardianCliLocation
|
||||
try {
|
||||
. $PSScriptRoot\..\tools.ps1
|
||||
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-Host "Invalid Guardian CLI Location."
|
||||
exit 1
|
||||
}
|
||||
# We store config files in the r directory of .gdn
|
||||
Write-Host $ToolsList
|
||||
$gdnConfigPath = Join-Path $GdnFolder 'r'
|
||||
$ValidPath = Test-Path $GuardianCliLocation
|
||||
|
||||
$configParam = @("--config")
|
||||
|
||||
foreach ($tool in $ToolsList) {
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
|
||||
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})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
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})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
if ($ValidPath -eq $False)
|
||||
{
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Invalid Guardian CLI Location."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$configParam+=$gdnConfigFile
|
||||
}
|
||||
$configParam = @('--config')
|
||||
|
||||
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
|
||||
foreach ($tool in $ToolsList) {
|
||||
$gdnConfigFile = Join-Path $gdnConfigPath "$tool-configure.gdnconfig"
|
||||
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})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
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})
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian configure for $tool failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
|
||||
$configParam+=$gdnConfigFile
|
||||
}
|
||||
|
||||
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-PipelineTelemetryError -Force -Category 'Sdl' -Message "Guardian run for $ToolsList using $configParam failed with exit code $LASTEXITCODE."
|
||||
ExitWithExitCode $LASTEXITCODE
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host $_.ScriptStackTrace
|
||||
Write-PipelineTelemetryError -Category 'Sdl' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
parameters:
|
||||
enable: 'false' # Whether the SDL validation job should execute or not
|
||||
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
|
||||
@@ -16,8 +17,15 @@ jobs:
|
||||
- job: Run_SDL
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
displayName: Run SDL tool
|
||||
condition: eq( ${{ parameters.enable }}, 'true')
|
||||
variables:
|
||||
- group: DotNet-VSTS-Bot
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
name: Hosted VS2017
|
||||
steps:
|
||||
@@ -28,14 +36,22 @@ jobs:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: ${{ artifactName }}
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
- ${{ if eq(parameters.artifactNames, '') }}:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Build Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: specific files
|
||||
itemPattern: "**"
|
||||
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
|
||||
|
||||
@@ -23,23 +23,32 @@ stages:
|
||||
- job: publish_symbols
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PdbArtifacts/**
|
||||
BlobArtifacts/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
# 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
|
||||
@@ -80,29 +89,31 @@ stages:
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PackageArtifacts/**
|
||||
BlobArtifacts/**
|
||||
AssetManifests/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
@@ -155,6 +166,6 @@ stages:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'AssetsPublishing'
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
- template: ../../steps/add-build-to-channel.yml
|
||||
parameters:
|
||||
ChannelId: ${{ parameters.channelId }}
|
||||
@@ -23,23 +23,32 @@ stages:
|
||||
- job: publish_symbols
|
||||
displayName: Symbol Publishing
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
variables:
|
||||
- group: DotNet-Symbol-Server-Pats
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
artifactName: 'BlobArtifacts'
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download PDB Artifacts
|
||||
inputs:
|
||||
artifactName: 'PDBArtifacts'
|
||||
continueOnError: true
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PdbArtifacts/**
|
||||
BlobArtifacts/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
# 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
|
||||
@@ -71,7 +80,6 @@ stages:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'SymbolPublishing'
|
||||
|
||||
|
||||
- job: publish_assets
|
||||
displayName: Publish Assets
|
||||
dependsOn: setupMaestroVars
|
||||
@@ -80,29 +88,31 @@ stages:
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: IsStableBuild
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
displayName: Download Build Assets
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
continueOnError: true
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Asset Manifests
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: AssetManifests
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
downloadType: 'specific'
|
||||
itemPattern: |
|
||||
PackageArtifacts/**
|
||||
BlobArtifacts/**
|
||||
AssetManifests/**
|
||||
downloadPath: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: 'Install NuGet.exe'
|
||||
@@ -155,6 +165,6 @@ stages:
|
||||
StageLabel: '${{ parameters.stageName }}'
|
||||
JobLabel: 'AssetsPublishing'
|
||||
|
||||
- template: ../../steps/promote-build.yml
|
||||
- template: ../../steps/add-build-to-channel.yml
|
||||
parameters:
|
||||
ChannelId: ${{ parameters.channelId }}
|
||||
@@ -4,7 +4,7 @@ variables:
|
||||
- group: DotNet-DotNetCli-Storage
|
||||
- group: DotNet-MSRC-Storage
|
||||
- group: Publish-Build-Assets
|
||||
|
||||
|
||||
# .NET Core 3.1 Dev
|
||||
- name: PublicDevRelease_31_Channel_Id
|
||||
value: 128
|
||||
@@ -13,19 +13,19 @@ variables:
|
||||
- name: NetCore_5_Dev_Channel_Id
|
||||
value: 131
|
||||
|
||||
# .NET Tools - Validation
|
||||
- name: NetCore_Tools_Validation_Channel_Id
|
||||
# .NET Eng - Validation
|
||||
- name: Net_Eng_Validation_Channel_Id
|
||||
value: 9
|
||||
|
||||
# .NET Tools - Latest
|
||||
- name: NetCore_Tools_Latest_Channel_Id
|
||||
# .NET Eng - Latest
|
||||
- name: Net_Eng_Latest_Channel_Id
|
||||
value: 2
|
||||
|
||||
# .NET 3 Tools - Validation
|
||||
- name: NETCore_3_Tools_Validation_Channel_Id
|
||||
# .NET 3 Eng - Validation
|
||||
- name: NET_3_Eng_Validation_Channel_Id
|
||||
value: 390
|
||||
|
||||
# .NET 3 Tools - Latest
|
||||
# .NET 3 Eng
|
||||
- name: NetCore_3_Tools_Channel_Id
|
||||
value: 344
|
||||
|
||||
@@ -49,6 +49,10 @@ variables:
|
||||
- name: NetCore_31_Blazor_Features_Channel_Id
|
||||
value: 531
|
||||
|
||||
# .NET Core Experimental
|
||||
- name: NetCore_Experimental_Channel_Id
|
||||
value: 562
|
||||
|
||||
# Whether the build is internal or not
|
||||
- name: IsInternalBuild
|
||||
value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
|
||||
|
||||
@@ -26,97 +26,136 @@ stages:
|
||||
- stage: Validate
|
||||
dependsOn: ${{ parameters.validateDependsOn }}
|
||||
displayName: Validate
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
jobs:
|
||||
- ${{ if eq(parameters.enableNugetValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: NuGet Validation
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
- template: setup-maestro-vars.yml
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
||||
- job:
|
||||
displayName: NuGet Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableNugetValidation }}, 'true')
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
variables:
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- ${{ if eq(parameters.enableSigningValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: PackageArtifacts
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
|
||||
arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
|
||||
-ToolDestinationPath $(Agent.BuildDirectory)/Extract/
|
||||
|
||||
# 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'
|
||||
- job:
|
||||
displayName: Signing Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableSigningValidation }}, 'true')
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Package Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: PackageArtifacts
|
||||
|
||||
- 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)
|
||||
# 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: 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'
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
- 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)
|
||||
|
||||
- template: ../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: 'Validation'
|
||||
JobLabel: 'Signing'
|
||||
- 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'
|
||||
${{ parameters.signingValidationAdditionalParameters }}
|
||||
|
||||
- ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
|
||||
- job:
|
||||
displayName: SourceLink Validation
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: BlobArtifacts
|
||||
- template: ../steps/publish-logs.yml
|
||||
parameters:
|
||||
StageLabel: 'Validation'
|
||||
JobLabel: 'Signing'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-ExtractPath $(Agent.BuildDirectory)/Extract/
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
- job:
|
||||
displayName: SourceLink Validation
|
||||
dependsOn: setupMaestroVars
|
||||
condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true')
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: AzDOProjectName
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
|
||||
- name: AzDOPipelineId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
|
||||
- name: AzDOBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Blob Artifacts
|
||||
inputs:
|
||||
buildType: specific
|
||||
buildVersionToDownload: specific
|
||||
project: $(AzDOProjectName)
|
||||
pipeline: $(AzDOPipelineId)
|
||||
buildId: $(AzDOBuildId)
|
||||
artifactName: BlobArtifacts
|
||||
|
||||
- ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||
- task: PowerShell@2
|
||||
displayName: Validate
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
|
||||
arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
|
||||
-ExtractPath $(Agent.BuildDirectory)/Extract/
|
||||
-GHRepoName $(Build.Repository.Name)
|
||||
-GHCommit $(Build.SourceVersion)
|
||||
-SourcelinkCliVersion $(SourceLinkCLIVersion)
|
||||
continueOnError: true
|
||||
|
||||
- template: /eng/common/templates/job/execute-sdl.yml
|
||||
parameters:
|
||||
enable: ${{ parameters.SDLValidationParameters.enable }}
|
||||
dependsOn: setupMaestroVars
|
||||
additionalParameters: ${{ parameters.SDLValidationParameters.params }}
|
||||
continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
|
||||
artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
@@ -137,21 +176,8 @@ stages:
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Dev31_Publish'
|
||||
channelName: '.NET Core 3.1 Dev'
|
||||
channelId: 128
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Tools_Latest_Publish'
|
||||
channelName: '.NET Tools - Latest'
|
||||
stageName: 'Net_Eng_Latest_Publish'
|
||||
channelName: '.NET Eng - Latest'
|
||||
channelId: 2
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
@@ -163,91 +189,13 @@ stages:
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'PVR_Publish'
|
||||
channelName: '.NET Tools - Validation'
|
||||
stageName: 'Net_Eng_Validation_Publish'
|
||||
channelName: '.NET Eng - Validation'
|
||||
channelId: 9
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_3_Tools_Validation_Publish'
|
||||
channelName: '.NET 3 Tools - Validation'
|
||||
channelId: 390
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_3_Tools_Publish'
|
||||
channelName: '.NET 3 Tools'
|
||||
channelId: 344
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Release30_Publish'
|
||||
channelName: '.NET Core 3.0 Release'
|
||||
channelId: 19
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Release31_Publish'
|
||||
channelName: '.NET Core 3.1 Release'
|
||||
channelId: 129
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_Blazor31_Features_Publish'
|
||||
channelName: '.NET Core 3.1 Blazor Features'
|
||||
channelId: 531
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet3.1-blazor-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NetCore_30_Internal_Servicing_Publishing'
|
||||
channelName: '.NET Core 3.0 Internal Servicing'
|
||||
channelId: 184
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
@@ -286,3 +234,55 @@ stages:
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-internal-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NET_Internal_Tooling_Publishing'
|
||||
channelName: '.NET Internal Tooling'
|
||||
channelId: 551
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet-tools-internal-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'NETCore_Experimental_Publishing'
|
||||
channelName: '.NET Core Experimental'
|
||||
channelId: 562
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'Net_Eng_Services_Int_Publish'
|
||||
channelName: '.NET Eng Services - Int'
|
||||
channelId: 678
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
|
||||
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
|
||||
parameters:
|
||||
artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
|
||||
dependsOn: ${{ parameters.publishDependsOn }}
|
||||
publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
|
||||
symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
|
||||
stageName: 'Net_Eng_Services_Prod_Publish'
|
||||
channelName: '.NET Eng Services - Prod'
|
||||
channelId: 679
|
||||
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
|
||||
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
|
||||
@@ -1,25 +0,0 @@
|
||||
parameters:
|
||||
ChannelId: 0
|
||||
|
||||
jobs:
|
||||
- job:
|
||||
displayName: Promote Build
|
||||
dependsOn: setupMaestroVars
|
||||
condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
|
||||
variables:
|
||||
- name: BARBuildId
|
||||
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
|
||||
- name: ChannelId
|
||||
value: ${{ parameters.ChannelId }}
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId $(ChannelId)
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
@@ -1,6 +1,12 @@
|
||||
jobs:
|
||||
- job: setupMaestroVars
|
||||
displayName: Setup Maestro Vars
|
||||
variables:
|
||||
- template: common-variables.yml
|
||||
- name: BuildId
|
||||
value: $[ coalesce(variables.BARBuildId, 0) ]
|
||||
- name: PromoteToChannelId
|
||||
value: $[ coalesce(variables.PromoteToMaestroChannelId, 0) ]
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
@@ -8,6 +14,7 @@ jobs:
|
||||
|
||||
- task: DownloadBuildArtifacts@0
|
||||
displayName: Download Release Configs
|
||||
condition: eq(variables.PromoteToChannelId, 0)
|
||||
inputs:
|
||||
buildType: current
|
||||
artifactName: ReleaseConfigs
|
||||
@@ -19,18 +26,50 @@ jobs:
|
||||
targetType: inline
|
||||
script: |
|
||||
try {
|
||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||
if ($Env:PromoteToChannelId -eq 0) {
|
||||
$Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
|
||||
|
||||
$BarId = $Content | Select -Index 0
|
||||
$BarId = $Content | Select -Index 0
|
||||
|
||||
$Channels = ""
|
||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||
$Channels = ""
|
||||
$Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
|
||||
|
||||
$IsStableBuild = $Content | Select -Index 2
|
||||
|
||||
$IsStableBuild = $Content | Select -Index 2
|
||||
$AzureDevOpsProject = $Env:System_TeamProject
|
||||
$AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId
|
||||
$AzureDevOpsBuildId = $Env:Build_BuildId
|
||||
$PromoteToMaestroChannelId = 0
|
||||
}
|
||||
else {
|
||||
$buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
|
||||
|
||||
$apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
|
||||
$apiHeaders.Add('Accept', 'application/json')
|
||||
$apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
|
||||
|
||||
$buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
|
||||
|
||||
$BarId = $Env:BARBuildId
|
||||
$Channels = 'None'
|
||||
|
||||
#TODO: Fix this once this issue is done: https://github.com/dotnet/arcade/issues/3834
|
||||
$IsStableBuild = 'False'
|
||||
|
||||
$AzureDevOpsProject = $buildInfo.azureDevOpsProject
|
||||
$AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId
|
||||
$AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId
|
||||
$PromoteToMaestroChannelId = $Env:PromoteToMaestroChannelId
|
||||
}
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId"
|
||||
Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels"
|
||||
Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild"
|
||||
|
||||
Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject"
|
||||
Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId"
|
||||
Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId"
|
||||
Write-Host "##vso[task.setvariable variable=PromoteToMaestroChannelId;isOutput=true]$PromoteToMaestroChannelId"
|
||||
}
|
||||
catch {
|
||||
Write-Host $_
|
||||
@@ -38,3 +77,5 @@ jobs:
|
||||
Write-Host $_.ScriptStackTrace
|
||||
exit 1
|
||||
}
|
||||
env:
|
||||
MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
|
||||
+2
-2
@@ -5,9 +5,9 @@ steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Add Build to Channel
|
||||
inputs:
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
|
||||
filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
|
||||
arguments: -BuildId $(BARBuildId)
|
||||
-ChannelId ${{ parameters.ChannelId }}
|
||||
-MaestroApiAccessToken $(MaestroApiAccessToken)
|
||||
-MaestroApiEndPoint $(MaestroApiEndPoint)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
-MaestroApiVersion $(MaestroApiVersion)
|
||||
@@ -18,6 +18,6 @@ steps:
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
|
||||
PublishLocation: Container
|
||||
ArtifactName: PostBuilLogs
|
||||
ArtifactName: PostBuildLogs
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
+136
-77
@@ -5,7 +5,7 @@
|
||||
[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }
|
||||
|
||||
# Build configuration. Common values include 'Debug' and 'Release', but the repository may use other names.
|
||||
[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { "Debug" }
|
||||
[string]$configuration = if (Test-Path variable:configuration) { $configuration } else { 'Debug' }
|
||||
|
||||
# Set to true to output binary log from msbuild. Note that emitting binary log slows down the build.
|
||||
# Binary log must be enabled on CI.
|
||||
@@ -24,7 +24,7 @@
|
||||
[bool]$restore = if (Test-Path variable:restore) { $restore } else { $true }
|
||||
|
||||
# Adjusts msbuild verbosity level.
|
||||
[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { "minimal" }
|
||||
[string]$verbosity = if (Test-Path variable:verbosity) { $verbosity } else { 'minimal' }
|
||||
|
||||
# Set to true to reuse msbuild nodes. Recommended to not reuse on CI.
|
||||
[bool]$nodeReuse = if (Test-Path variable:nodeReuse) { $nodeReuse } else { !$ci }
|
||||
@@ -41,23 +41,23 @@
|
||||
|
||||
# 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" }
|
||||
[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 }
|
||||
|
||||
# An array of names of processes to stop on script exit if prepareMachine is true.
|
||||
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @("msbuild", "dotnet", "vbcscompiler") }
|
||||
$processesToStopOnExit = if (Test-Path variable:processesToStopOnExit) { $processesToStopOnExit } else { @('msbuild', 'dotnet', 'vbcscompiler') }
|
||||
|
||||
$disableConfigureToolsetImport = if (Test-Path variable:disableConfigureToolsetImport) { $disableConfigureToolsetImport } else { $null }
|
||||
|
||||
set-strictmode -version 2.0
|
||||
$ErrorActionPreference = "Stop"
|
||||
$ErrorActionPreference = 'Stop'
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
function Create-Directory([string[]] $path) {
|
||||
if (!(Test-Path $path)) {
|
||||
New-Item -path $path -force -itemType "Directory" | Out-Null
|
||||
New-Item -path $path -force -itemType 'Directory' | Out-Null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,10 @@ function Exec-Process([string]$command, [string]$commandArgs) {
|
||||
}
|
||||
}
|
||||
|
||||
function InitializeDotNetCli([bool]$install) {
|
||||
# createSdkLocationFile parameter enables a file being generated under the toolset directory
|
||||
# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
|
||||
# as dot sourcing isn't possible.
|
||||
function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
|
||||
if (Test-Path variable:global:_DotNetInstallDir) {
|
||||
return $global:_DotNetInstallDir
|
||||
}
|
||||
@@ -121,7 +124,7 @@ function InitializeDotNetCli([bool]$install) {
|
||||
|
||||
# Find the first path on %PATH% that contains the dotnet.exe
|
||||
if ($useInstalledDotNetCli -and (-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -eq $null)) {
|
||||
$dotnetCmd = Get-Command "dotnet.exe" -ErrorAction SilentlyContinue
|
||||
$dotnetCmd = Get-Command 'dotnet.exe' -ErrorAction SilentlyContinue
|
||||
if ($dotnetCmd -ne $null) {
|
||||
$env:DOTNET_INSTALL_DIR = Split-Path $dotnetCmd.Path -Parent
|
||||
}
|
||||
@@ -134,13 +137,13 @@ function InitializeDotNetCli([bool]$install) {
|
||||
if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
|
||||
$dotnetRoot = $env:DOTNET_INSTALL_DIR
|
||||
} else {
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
||||
$dotnetRoot = Join-Path $RepoRoot '.dotnet'
|
||||
|
||||
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
|
||||
if ($install) {
|
||||
InstallDotNetSdk $dotnetRoot $dotnetSdkVersion
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unable to find dotnet with SDK version '$dotnetSdkVersion'"
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
@@ -148,6 +151,24 @@ function InitializeDotNetCli([bool]$install) {
|
||||
$env:DOTNET_INSTALL_DIR = $dotnetRoot
|
||||
}
|
||||
|
||||
# Creates a temporary file under the toolset dir.
|
||||
# The following code block is protecting against concurrent access so that this function can
|
||||
# be called in parallel.
|
||||
if ($createSdkLocationFile) {
|
||||
do {
|
||||
$sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())
|
||||
}
|
||||
until (!(Test-Path $sdkCacheFileTemp))
|
||||
Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
|
||||
|
||||
try {
|
||||
Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
|
||||
} catch {
|
||||
# Somebody beat us
|
||||
Remove-Item -Path $sdkCacheFileTemp
|
||||
}
|
||||
}
|
||||
|
||||
# Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
|
||||
# build steps from using anything other than what we've downloaded.
|
||||
# It also ensures that VS msbuild will use the downloaded sdk targets.
|
||||
@@ -163,27 +184,53 @@ function InitializeDotNetCli([bool]$install) {
|
||||
}
|
||||
|
||||
function GetDotNetInstallScript([string] $dotnetRoot) {
|
||||
$installScript = Join-Path $dotnetRoot "dotnet-install.ps1"
|
||||
$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
|
||||
|
||||
$maxRetries = 5
|
||||
$retries = 1
|
||||
|
||||
$uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
|
||||
|
||||
while($true) {
|
||||
try {
|
||||
Write-Host "GET $uri"
|
||||
Invoke-WebRequest $uri -OutFile $installScript
|
||||
break
|
||||
}
|
||||
catch {
|
||||
Write-Host "Failed to download '$uri'"
|
||||
Write-Error $_.Exception.Message -ErrorAction Continue
|
||||
}
|
||||
|
||||
if (++$retries -le $maxRetries) {
|
||||
$delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
|
||||
Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
|
||||
Start-Sleep -Seconds $delayInSeconds
|
||||
}
|
||||
else {
|
||||
throw "Unable to download file in $maxRetries attempts."
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return $installScript
|
||||
}
|
||||
|
||||
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = "") {
|
||||
function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') {
|
||||
InstallDotNet $dotnetRoot $version $architecture
|
||||
}
|
||||
|
||||
function InstallDotNet([string] $dotnetRoot,
|
||||
[string] $version,
|
||||
[string] $architecture = "",
|
||||
[string] $runtime = "",
|
||||
[bool] $skipNonVersionedFiles = $false,
|
||||
[string] $runtimeSourceFeed = "",
|
||||
[string] $runtimeSourceFeedKey = "") {
|
||||
function InstallDotNet([string] $dotnetRoot,
|
||||
[string] $version,
|
||||
[string] $architecture = '',
|
||||
[string] $runtime = '',
|
||||
[bool] $skipNonVersionedFiles = $false,
|
||||
[string] $runtimeSourceFeed = '',
|
||||
[string] $runtimeSourceFeedKey = '') {
|
||||
|
||||
$installScript = GetDotNetInstallScript $dotnetRoot
|
||||
$installParameters = @{
|
||||
@@ -199,7 +246,7 @@ function InstallDotNet([string] $dotnetRoot,
|
||||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from public location."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from public location."
|
||||
|
||||
# Only the runtime can be installed from a custom [private] location.
|
||||
if ($runtime -and ($runtimeSourceFeed -or $runtimeSourceFeedKey)) {
|
||||
@@ -215,8 +262,11 @@ function InstallDotNet([string] $dotnetRoot,
|
||||
& $installScript @installParameters
|
||||
}
|
||||
catch {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
} else {
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,16 +288,16 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
||||
}
|
||||
|
||||
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
|
||||
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { "15.9" }
|
||||
$vsMinVersionStr = if ($vsRequirements.version) { $vsRequirements.version } else { '15.9' }
|
||||
$vsMinVersion = [Version]::new($vsMinVersionStr)
|
||||
|
||||
# Try msbuild command available in the environment.
|
||||
if ($env:VSINSTALLDIR -ne $null) {
|
||||
$msbuildCmd = Get-Command "msbuild.exe" -ErrorAction SilentlyContinue
|
||||
$msbuildCmd = Get-Command 'msbuild.exe' -ErrorAction SilentlyContinue
|
||||
if ($msbuildCmd -ne $null) {
|
||||
# Workaround for https://github.com/dotnet/roslyn/issues/35793
|
||||
# Due to this issue $msbuildCmd.Version returns 0.0.0.0 for msbuild.exe 16.2+
|
||||
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split(@('-', '+'))[0])
|
||||
$msbuildVersion = [Version]::new((Get-Item $msbuildCmd.Path).VersionInfo.ProductVersion.Split([char[]]@('-', '+'))[0])
|
||||
|
||||
if ($msbuildVersion -ge $vsMinVersion) {
|
||||
return $global:_MSBuildExe = $msbuildCmd.Path
|
||||
@@ -267,7 +317,7 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
||||
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion
|
||||
} else {
|
||||
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "xcopy-msbuild") {
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'xcopy-msbuild') {
|
||||
$xcopyMSBuildVersion = $GlobalJson.tools.'xcopy-msbuild'
|
||||
$vsMajorVersion = $xcopyMSBuildVersion.Split('.')[0]
|
||||
} else {
|
||||
@@ -275,9 +325,12 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
|
||||
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
|
||||
}
|
||||
|
||||
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
|
||||
$vsInstallDir = $null
|
||||
if ($xcopyMSBuildVersion.Trim() -ine "none") {
|
||||
$vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
|
||||
}
|
||||
if ($vsInstallDir -eq $null) {
|
||||
throw "Unable to find Visual Studio that has required version and components installed"
|
||||
throw 'Unable to find Visual Studio that has required version and components installed'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +354,7 @@ function InstallXCopyMSBuild([string]$packageVersion) {
|
||||
}
|
||||
|
||||
function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
||||
$packageName = "RoslynTools.MSBuild"
|
||||
$packageName = 'RoslynTools.MSBuild'
|
||||
$packageDir = Join-Path $ToolsDir "msbuild\$packageVersion"
|
||||
$packagePath = Join-Path $packageDir "$packageName.$packageVersion.nupkg"
|
||||
|
||||
@@ -317,7 +370,7 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
||||
Unzip $packagePath $packageDir
|
||||
}
|
||||
|
||||
return Join-Path $packageDir "tools"
|
||||
return Join-Path $packageDir 'tools'
|
||||
}
|
||||
|
||||
#
|
||||
@@ -334,32 +387,32 @@ function InitializeXCopyMSBuild([string]$packageVersion, [bool]$install) {
|
||||
# or $null if no instance meeting the requirements is found on the machine.
|
||||
#
|
||||
function LocateVisualStudio([object]$vsRequirements = $null){
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "vswhere") {
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'vswhere') {
|
||||
$vswhereVersion = $GlobalJson.tools.vswhere
|
||||
} else {
|
||||
$vswhereVersion = "2.5.2"
|
||||
$vswhereVersion = '2.5.2'
|
||||
}
|
||||
|
||||
$vsWhereDir = Join-Path $ToolsDir "vswhere\$vswhereVersion"
|
||||
$vsWhereExe = Join-Path $vsWhereDir "vswhere.exe"
|
||||
$vsWhereExe = Join-Path $vsWhereDir 'vswhere.exe'
|
||||
|
||||
if (!(Test-Path $vsWhereExe)) {
|
||||
Create-Directory $vsWhereDir
|
||||
Write-Host "Downloading vswhere"
|
||||
Write-Host 'Downloading vswhere'
|
||||
Invoke-WebRequest "https://github.com/Microsoft/vswhere/releases/download/$vswhereVersion/vswhere.exe" -OutFile $vswhereExe
|
||||
}
|
||||
|
||||
if (!$vsRequirements) { $vsRequirements = $GlobalJson.tools.vs }
|
||||
$args = @("-latest", "-prerelease", "-format", "json", "-requires", "Microsoft.Component.MSBuild", "-products", "*")
|
||||
$args = @('-latest', '-prerelease', '-format', 'json', '-requires', 'Microsoft.Component.MSBuild', '-products', '*')
|
||||
|
||||
if (Get-Member -InputObject $vsRequirements -Name "version") {
|
||||
$args += "-version"
|
||||
if (Get-Member -InputObject $vsRequirements -Name 'version') {
|
||||
$args += '-version'
|
||||
$args += $vsRequirements.version
|
||||
}
|
||||
|
||||
if (Get-Member -InputObject $vsRequirements -Name "components") {
|
||||
if (Get-Member -InputObject $vsRequirements -Name 'components') {
|
||||
foreach ($component in $vsRequirements.components) {
|
||||
$args += "-requires"
|
||||
$args += '-requires'
|
||||
$args += $component
|
||||
}
|
||||
}
|
||||
@@ -385,27 +438,27 @@ function InitializeBuildTool() {
|
||||
|
||||
# Initialize dotnet cli if listed in 'tools'
|
||||
$dotnetRoot = $null
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
|
||||
$dotnetRoot = InitializeDotNetCli -install:$restore
|
||||
}
|
||||
|
||||
if ($msbuildEngine -eq "dotnet") {
|
||||
if ($msbuildEngine -eq 'dotnet') {
|
||||
if (!$dotnetRoot) {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "/global.json must specify 'tools.dotnet'."
|
||||
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" }
|
||||
$buildTool = @{ Path = Join-Path $dotnetRoot 'dotnet.exe'; Command = 'msbuild'; Tool = 'dotnet'; Framework = 'netcoreapp2.1' }
|
||||
} elseif ($msbuildEngine -eq "vs") {
|
||||
try {
|
||||
$msbuildPath = InitializeVisualStudioMSBuild -install:$restore
|
||||
} catch {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message $_
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$buildTool = @{ Path = $msbuildPath; Command = ""; Tool = "vs"; Framework = "net472" }
|
||||
} else {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Unexpected value of -msbuildEngine: '$msbuildEngine'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -414,15 +467,15 @@ function InitializeBuildTool() {
|
||||
|
||||
function GetDefaultMSBuildEngine() {
|
||||
# Presence of tools.vs indicates the repo needs to build using VS msbuild on Windows.
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "vs") {
|
||||
return "vs"
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'vs') {
|
||||
return 'vs'
|
||||
}
|
||||
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name "dotnet") {
|
||||
return "dotnet"
|
||||
if (Get-Member -InputObject $GlobalJson.tools -Name 'dotnet') {
|
||||
return 'dotnet'
|
||||
}
|
||||
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "-msbuildEngine must be specified, or /global.json must specify 'tools.dotnet' or 'tools.vs'."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
@@ -431,9 +484,9 @@ function GetNuGetPackageCachePath() {
|
||||
# Use local cache on CI to ensure deterministic build,
|
||||
# use global cache in dev builds to avoid cost of downloading packages.
|
||||
if ($useGlobalNuGetCache) {
|
||||
$env:NUGET_PACKAGES = Join-Path $env:UserProfile ".nuget\packages"
|
||||
$env:NUGET_PACKAGES = Join-Path $env:UserProfile '.nuget\packages'
|
||||
} else {
|
||||
$env:NUGET_PACKAGES = Join-Path $RepoRoot ".packages"
|
||||
$env:NUGET_PACKAGES = Join-Path $RepoRoot '.packages'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,14 +528,14 @@ function InitializeToolset() {
|
||||
}
|
||||
|
||||
if (-not $restore) {
|
||||
Write-PipelineTelemetryError -Category "InitializeToolset" -Message "Toolset version $toolsetVersion has not been restored."
|
||||
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Toolset version $toolsetVersion has not been restored."
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
$buildTool = InitializeBuildTool
|
||||
|
||||
$proj = Join-Path $ToolsetDir "restore.proj"
|
||||
$bl = if ($binaryLog) { "/bl:" + (Join-Path $LogDir "ToolsetRestore.binlog") } else { "" }
|
||||
$proj = Join-Path $ToolsetDir 'restore.proj'
|
||||
$bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'ToolsetRestore.binlog') } else { '' }
|
||||
|
||||
'<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' | Set-Content $proj
|
||||
|
||||
@@ -504,7 +557,7 @@ function ExitWithExitCode([int] $exitCode) {
|
||||
}
|
||||
|
||||
function Stop-Processes() {
|
||||
Write-Host "Killing running build processes..."
|
||||
Write-Host 'Killing running build processes...'
|
||||
foreach ($processName in $processesToStopOnExit) {
|
||||
Get-Process -Name $processName -ErrorAction SilentlyContinue | Stop-Process
|
||||
}
|
||||
@@ -521,7 +574,7 @@ function MSBuild() {
|
||||
|
||||
# Work around issues with Azure Artifacts credential provider
|
||||
# https://github.com/dotnet/arcade/issues/3932
|
||||
if ($ci -and $buildTool.Tool -eq "dotnet") {
|
||||
if ($ci -and $buildTool.Tool -eq 'dotnet') {
|
||||
dotnet nuget locals http-cache -c
|
||||
|
||||
$env:NUGET_PLUGIN_HANDSHAKE_TIMEOUT_IN_SECONDS = 20
|
||||
@@ -532,7 +585,7 @@ function MSBuild() {
|
||||
|
||||
$toolsetBuildProject = InitializeToolset
|
||||
$path = Split-Path -parent $toolsetBuildProject
|
||||
$path = Join-Path $path (Join-Path $buildTool.Framework "Microsoft.DotNet.Arcade.Sdk.dll")
|
||||
$path = Join-Path $path (Join-Path $buildTool.Framework 'Microsoft.DotNet.Arcade.Sdk.dll')
|
||||
$args += "/logger:$path"
|
||||
}
|
||||
|
||||
@@ -547,12 +600,12 @@ function MSBuild() {
|
||||
function MSBuild-Core() {
|
||||
if ($ci) {
|
||||
if (!$binaryLog) {
|
||||
Write-PipelineTaskError -Message "Binary log must be enabled in CI build."
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'Binary log must be enabled in CI build.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
|
||||
if ($nodeReuse) {
|
||||
Write-PipelineTaskError -Message "Node reuse must be disabled in CI build."
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'Node reuse must be disabled in CI build.'
|
||||
ExitWithExitCode 1
|
||||
}
|
||||
}
|
||||
@@ -562,10 +615,10 @@ function MSBuild-Core() {
|
||||
$cmdArgs = "$($buildTool.Command) /m /nologo /clp:Summary /v:$verbosity /nr:$nodeReuse /p:ContinuousIntegrationBuild=$ci"
|
||||
|
||||
if ($warnAsError) {
|
||||
$cmdArgs += " /warnaserror /p:TreatWarningsAsErrors=true"
|
||||
$cmdArgs += ' /warnaserror /p:TreatWarningsAsErrors=true'
|
||||
}
|
||||
else {
|
||||
$cmdArgs += " /p:TreatWarningsAsErrors=false"
|
||||
$cmdArgs += ' /p:TreatWarningsAsErrors=false'
|
||||
}
|
||||
|
||||
foreach ($arg in $args) {
|
||||
@@ -577,7 +630,7 @@ function MSBuild-Core() {
|
||||
$exitCode = Exec-Process $buildTool.Path $cmdArgs
|
||||
|
||||
if ($exitCode -ne 0) {
|
||||
Write-PipelineTaskError -Message "Build failed."
|
||||
Write-PipelineTelemetryError Category 'Build' -Message 'Build failed.'
|
||||
|
||||
$buildLog = GetMSBuildBinaryLogCommandLineArgument $args
|
||||
if ($buildLog -ne $null) {
|
||||
@@ -592,12 +645,12 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
||||
foreach ($argument in $arguments) {
|
||||
if ($argument -ne $null) {
|
||||
$arg = $argument.Trim()
|
||||
if ($arg.StartsWith("/bl:", "OrdinalIgnoreCase")) {
|
||||
return $arg.Substring("/bl:".Length)
|
||||
if ($arg.StartsWith('/bl:', "OrdinalIgnoreCase")) {
|
||||
return $arg.Substring('/bl:'.Length)
|
||||
}
|
||||
|
||||
if ($arg.StartsWith("/binaryLogger:", "OrdinalIgnoreCase")) {
|
||||
return $arg.Substring("/binaryLogger:".Length)
|
||||
if ($arg.StartsWith('/binaryLogger:', 'OrdinalIgnoreCase')) {
|
||||
return $arg.Substring('/binaryLogger:'.Length)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -607,14 +660,14 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
||||
|
||||
. $PSScriptRoot\pipeline-logging-functions.ps1
|
||||
|
||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
|
||||
$ToolsetDir = Join-Path $ArtifactsDir "toolset"
|
||||
$ToolsDir = Join-Path $RepoRoot ".tools"
|
||||
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
|
||||
$TempDir = Join-Path (Join-Path $ArtifactsDir "tmp") $configuration
|
||||
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot "global.json") | ConvertFrom-Json
|
||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot '..\..')
|
||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot '..')
|
||||
$ArtifactsDir = Join-Path $RepoRoot 'artifacts'
|
||||
$ToolsetDir = Join-Path $ArtifactsDir 'toolset'
|
||||
$ToolsDir = Join-Path $RepoRoot '.tools'
|
||||
$LogDir = Join-Path (Join-Path $ArtifactsDir 'log') $configuration
|
||||
$TempDir = Join-Path (Join-Path $ArtifactsDir 'tmp') $configuration
|
||||
$GlobalJson = Get-Content -Raw -Path (Join-Path $RepoRoot 'global.json') | ConvertFrom-Json
|
||||
# true if global.json contains a "runtimes" section
|
||||
$globalJsonHasRuntimes = if ($GlobalJson.tools.PSObject.Properties.Name -Match 'runtimes') { $true } else { $false }
|
||||
|
||||
@@ -631,8 +684,14 @@ Write-PipelineSetVariable -Name 'TMP' -Value $TempDir
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
# Note: Import in global scope so that the script set top-level variables without qualification.
|
||||
if (!$disableConfigureToolsetImport) {
|
||||
$configureToolsetScript = Join-Path $EngRoot "configure-toolset.ps1"
|
||||
$configureToolsetScript = Join-Path $EngRoot 'configure-toolset.ps1'
|
||||
if (Test-Path $configureToolsetScript) {
|
||||
. $configureToolsetScript
|
||||
. $configureToolsetScript
|
||||
if ((Test-Path variable:failOnConfigureToolsetError) -And $failOnConfigureToolsetError) {
|
||||
if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
|
||||
Write-PipelineTelemetryError -Category 'Build' -Message 'configure-toolset.ps1 returned a non-zero exit code'
|
||||
ExitWithExitCode $LastExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
-15
@@ -4,7 +4,6 @@
|
||||
|
||||
# CI mode - set to true on CI server for PR validation build or official build.
|
||||
ci=${ci:-false}
|
||||
disable_configure_toolset_import=${disable_configure_toolset_import:-}
|
||||
|
||||
# Set to true to use the pipelines logger which will enable Azure logging output.
|
||||
# https://github.com/Microsoft/azure-pipelines-tasks/blob/master/docs/authoring/commands.md
|
||||
@@ -42,7 +41,7 @@ fi
|
||||
# Configures warning treatment in msbuild.
|
||||
warn_as_error=${warn_as_error:-true}
|
||||
|
||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||
# True to attempt using .NET Core already that meets requirements specified in global.json
|
||||
# installed on the machine instead of downloading one.
|
||||
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
|
||||
|
||||
@@ -82,7 +81,7 @@ function ReadGlobalVersion {
|
||||
local pattern="\"$key\" *: *\"(.*)\""
|
||||
|
||||
if [[ ! $line =~ $pattern ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Error: Cannot find \"$key\" in $global_json_file"
|
||||
Write-PipelineTelemetryError -category 'Build' "Error: Cannot find \"$key\" in $global_json_file"
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
@@ -173,7 +172,7 @@ function InstallDotNetSdk {
|
||||
function InstallDotNet {
|
||||
local root=$1
|
||||
local version=$2
|
||||
|
||||
|
||||
GetDotNetInstallScript "$root"
|
||||
local install_script=$_GetDotNetInstallScript
|
||||
|
||||
@@ -212,11 +211,35 @@ function InstallDotNet {
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
else
|
||||
ExitWithExitCode $exit_code
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
function with_retries {
|
||||
local maxRetries=5
|
||||
local retries=1
|
||||
echo "Trying to run '$@' for maximum of $maxRetries attempts."
|
||||
while [[ $((retries++)) -le $maxRetries ]]; do
|
||||
"$@"
|
||||
|
||||
if [[ $? == 0 ]]; then
|
||||
echo "Ran '$@' successfully."
|
||||
return 0
|
||||
fi
|
||||
|
||||
timeout=$((2**$retries-1))
|
||||
echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
|
||||
sleep $timeout
|
||||
done
|
||||
|
||||
echo "Failed to execute '$@' for $maxRetries times." 1>&2
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
function GetDotNetInstallScript {
|
||||
local root=$1
|
||||
local install_script="$root/dotnet-install.sh"
|
||||
@@ -229,13 +252,13 @@ 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" || {
|
||||
with_retries curl "$install_script_url" -isSLv --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" || {
|
||||
else
|
||||
with_retries wget -v -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
|
||||
@@ -250,11 +273,11 @@ function InitializeBuildTool {
|
||||
if [[ -n "${_InitializeBuildTool:-}" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
InitializeDotNetCli $restore
|
||||
|
||||
# return values
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildTool="$_InitializeDotNetCli/dotnet"
|
||||
_InitializeBuildToolCommand="msbuild"
|
||||
_InitializeBuildToolFramework="netcoreapp2.1"
|
||||
}
|
||||
@@ -318,14 +341,14 @@ function InitializeToolset {
|
||||
if [[ "$binary_log" == true ]]; then
|
||||
bl="/bl:$log_dir/ToolsetRestore.binlog"
|
||||
fi
|
||||
|
||||
|
||||
echo '<Project Sdk="Microsoft.DotNet.Arcade.Sdk"/>' > "$proj"
|
||||
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
|
||||
|
||||
local toolset_build_proj=`cat "$toolset_location_file"`
|
||||
|
||||
if [[ ! -a "$toolset_build_proj" ]]; then
|
||||
Write-PipelineTelemetryError -category 'InitializeToolset' "Invalid toolset path: $toolset_build_proj"
|
||||
Write-PipelineTelemetryError -category 'Build' "Invalid toolset path: $toolset_build_proj"
|
||||
ExitWithExitCode 3
|
||||
fi
|
||||
|
||||
@@ -375,12 +398,12 @@ function MSBuild {
|
||||
function MSBuild-Core {
|
||||
if [[ "$ci" == true ]]; then
|
||||
if [[ "$binary_log" != true ]]; then
|
||||
Write-PipelineTaskError "Binary log must be enabled in CI build."
|
||||
Write-PipelineTelemetryError -category 'Build' "Binary log must be enabled in CI build."
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
|
||||
if [[ "$node_reuse" == true ]]; then
|
||||
Write-PipelineTaskError "Node reuse must be disabled in CI build."
|
||||
Write-PipelineTelemetryError -category 'Build' "Node reuse must be disabled in CI build."
|
||||
ExitWithExitCode 1
|
||||
fi
|
||||
fi
|
||||
@@ -394,7 +417,7 @@ function MSBuild-Core {
|
||||
|
||||
"$_InitializeBuildTool" "$_InitializeBuildToolCommand" /m /nologo /clp:Summary /v:$verbosity /nr:$node_reuse $warnaserror_switch /p:TreatWarningsAsErrors=$warn_as_error /p:ContinuousIntegrationBuild=$ci "$@" || {
|
||||
local exit_code=$?
|
||||
Write-PipelineTaskError "Build failed (exit code '$exit_code')."
|
||||
Write-PipelineTelemetryError -category 'Build' "Build failed (exit code '$exit_code')."
|
||||
ExitWithExitCode $exit_code
|
||||
}
|
||||
}
|
||||
@@ -437,7 +460,7 @@ Write-PipelineSetVariable -name "Temp" -value "$temp_dir"
|
||||
Write-PipelineSetVariable -name "TMP" -value "$temp_dir"
|
||||
|
||||
# Import custom tools configuration, if present in the repo.
|
||||
if [[ -z "$disable_configure_toolset_import" ]]; then
|
||||
if [ -z "${disable_configure_toolset_import:-}" ]; then
|
||||
configure_toolset_script="$eng_root/configure-toolset.sh"
|
||||
if [[ -a "$configure_toolset_script" ]]; then
|
||||
. "$configure_toolset_script"
|
||||
|
||||
Vendored
+1
-1
Submodule external/api-snapshot updated: 46c93c66be...5b8247e289.
Vendored
+1
-1
Submodule external/binary-reference-assemblies updated: 20704e7005...e68046d510.
Vendored
+1
-1
Submodule external/bockbuild updated: c9d4ecdba4...23374e3b63.
Vendored
+1
-1
Submodule external/cecil updated: a6a7f5c0f4...8021f3fbe7.
Vendored
+1
-1
Submodule external/corefx updated: 1cdb9c2094...7c9e215892.
Vendored
+1
-1
Submodule external/linker updated: e8d054bf32...6e0105e0fc.
Vendored
+1
-1
Submodule external/nunit-lite updated: 5406f2a7a0...26dbdb9a88.
Vendored
+1
-1
Submodule external/roslyn-binaries updated: e8390db828...27c352d6ed.
+3
-3
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"tools": {
|
||||
"dotnet": "5.0.100-alpha1-014854"
|
||||
"dotnet": "5.0.100-alpha1-015772"
|
||||
},
|
||||
"msbuild-sdks": {
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.19567.2",
|
||||
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.19567.2"
|
||||
"Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20109.1",
|
||||
"Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20109.1"
|
||||
}
|
||||
}
|
||||
+97
-97
@@ -1,98 +1,98 @@
|
||||
:: Set up build environment and build LLVM using MSVC and msbuild targets in mono.sln.
|
||||
|
||||
:: Arguments:
|
||||
:: -------------------------------------------------------
|
||||
:: %1 Visual Studio target, build|clean, default build
|
||||
:: %2 Host CPU architecture, x86_64|i686, default x86_64
|
||||
:: %3 Visual Studio configuration, debug|release, default release
|
||||
:: %4 Mono MSVC source folder.
|
||||
:: %5 LLVM build directory.
|
||||
:: %6 LLVM install directory.
|
||||
:: %7 Additional arguments passed to msbuild, needs to be quoted if multiple.
|
||||
:: -------------------------------------------------------
|
||||
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set BUILD_RESULT=1
|
||||
|
||||
:: Get path for current running script.
|
||||
set RUN_BUILD_LLVM_MSBUILD_SCRIPT_PATH=%~dp0
|
||||
|
||||
:: Configure all known build arguments.
|
||||
set VS_BUILD_ARGS=
|
||||
set VS_TARGET=build
|
||||
if /i "%~1" == "clean" (
|
||||
set VS_TARGET="clean"
|
||||
)
|
||||
shift
|
||||
|
||||
set VS_PLATFORM=x64
|
||||
if /i "%~1" == "i686" (
|
||||
set VS_PLATFORM="Win32"
|
||||
)
|
||||
if /i "%~1" == "win32" (
|
||||
set VS_PLATFORM="Win32"
|
||||
)
|
||||
shift
|
||||
|
||||
set VS_CONFIGURATION=Release
|
||||
if /i "%~1" == "debug" (
|
||||
set VS_CONFIGURATION="Debug"
|
||||
)
|
||||
shift
|
||||
|
||||
set MONO_MSVC_SOURCE_DIR=%RUN_BUILD_LLVM_MSBUILD_SCRIPT_PATH%..\msvc\
|
||||
if not "%~1" == "" (
|
||||
set MONO_MSVC_SOURCE_DIR=%~1
|
||||
)
|
||||
shift
|
||||
|
||||
set MONO_LLVM_BUILD_DIR=
|
||||
if not "%~1" == "" (
|
||||
set MONO_LLVM_BUILD_DIR=%~1
|
||||
)
|
||||
shift
|
||||
|
||||
set MONO_LLVM_INSTALL_DIR=
|
||||
if not "%~1" == "" (
|
||||
set MONO_LLVM_INSTALL_DIR=%~1
|
||||
)
|
||||
shift
|
||||
|
||||
set VS_ADDITIONAL_ARGUMENTS=
|
||||
if not "%~1" == "" (
|
||||
set VS_ADDITIONAL_ARGUMENTS=%~1
|
||||
)
|
||||
|
||||
:: Setup Windows environment.
|
||||
call %MONO_MSVC_SOURCE_DIR%setup-windows-env.bat
|
||||
|
||||
:: Setup VS msbuild environment.
|
||||
call %MONO_MSVC_SOURCE_DIR%setup-vs-msbuild-env.bat
|
||||
|
||||
if "%VS_ADDITIONAL_ARGUMENTS%" == "" (
|
||||
set "VS_ADDITIONAL_ARGUMENTS=/p:PlatformToolset=%VS_DEFAULT_PLATFORM_TOOL_SET% /p:MONO_TARGET_GC=sgen"
|
||||
)
|
||||
|
||||
if not "%MONO_LLVM_BUILD_DIR%" == "" (
|
||||
set VS_BUILD_ARGS=/p:_LLVMBuildDir="%MONO_LLVM_BUILD_DIR%"
|
||||
)
|
||||
|
||||
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
|
||||
call msbuild.exe %VS_BUILD_ARGS% "%MONO_MSVC_SOURCE_DIR%build-external-llvm.vcxproj" && (
|
||||
set BUILD_RESULT=0
|
||||
) || (
|
||||
set BUILD_RESULT=1
|
||||
if not %ERRORLEVEL% == 0 (
|
||||
set BUILD_RESULT=%ERRORLEVEL%
|
||||
)
|
||||
)
|
||||
|
||||
exit /b %BUILD_RESULT%
|
||||
|
||||
:: Set up build environment and build LLVM using MSVC and msbuild targets in mono.sln.
|
||||
|
||||
:: Arguments:
|
||||
:: -------------------------------------------------------
|
||||
:: %1 Visual Studio target, build|clean, default build
|
||||
:: %2 Host CPU architecture, x86_64|i686, default x86_64
|
||||
:: %3 Visual Studio configuration, debug|release, default release
|
||||
:: %4 Mono MSVC source folder.
|
||||
:: %5 LLVM build directory.
|
||||
:: %6 LLVM install directory.
|
||||
:: %7 Additional arguments passed to msbuild, needs to be quoted if multiple.
|
||||
:: -------------------------------------------------------
|
||||
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set BUILD_RESULT=1
|
||||
|
||||
:: Get path for current running script.
|
||||
set RUN_BUILD_LLVM_MSBUILD_SCRIPT_PATH=%~dp0
|
||||
|
||||
:: Configure all known build arguments.
|
||||
set VS_BUILD_ARGS=
|
||||
set VS_TARGET=build
|
||||
if /i "%~1" == "clean" (
|
||||
set VS_TARGET="clean"
|
||||
)
|
||||
shift
|
||||
|
||||
set VS_PLATFORM=x64
|
||||
if /i "%~1" == "i686" (
|
||||
set VS_PLATFORM="Win32"
|
||||
)
|
||||
if /i "%~1" == "win32" (
|
||||
set VS_PLATFORM="Win32"
|
||||
)
|
||||
shift
|
||||
|
||||
set VS_CONFIGURATION=Release
|
||||
if /i "%~1" == "debug" (
|
||||
set VS_CONFIGURATION="Debug"
|
||||
)
|
||||
shift
|
||||
|
||||
set MONO_MSVC_SOURCE_DIR=%RUN_BUILD_LLVM_MSBUILD_SCRIPT_PATH%..\msvc\
|
||||
if not "%~1" == "" (
|
||||
set MONO_MSVC_SOURCE_DIR=%~1
|
||||
)
|
||||
shift
|
||||
|
||||
set MONO_LLVM_BUILD_DIR=
|
||||
if not "%~1" == "" (
|
||||
set MONO_LLVM_BUILD_DIR=%~1
|
||||
)
|
||||
shift
|
||||
|
||||
set MONO_LLVM_INSTALL_DIR=
|
||||
if not "%~1" == "" (
|
||||
set MONO_LLVM_INSTALL_DIR=%~1
|
||||
)
|
||||
shift
|
||||
|
||||
set VS_ADDITIONAL_ARGUMENTS=
|
||||
if not "%~1" == "" (
|
||||
set VS_ADDITIONAL_ARGUMENTS=%~1
|
||||
)
|
||||
|
||||
:: Setup Windows environment.
|
||||
call %MONO_MSVC_SOURCE_DIR%setup-windows-env.bat
|
||||
|
||||
:: Setup VS msbuild environment.
|
||||
call %MONO_MSVC_SOURCE_DIR%setup-vs-msbuild-env.bat
|
||||
|
||||
if "%VS_ADDITIONAL_ARGUMENTS%" == "" (
|
||||
set "VS_ADDITIONAL_ARGUMENTS=/p:PlatformToolset=%VS_DEFAULT_PLATFORM_TOOL_SET% /p:MONO_TARGET_GC=sgen"
|
||||
)
|
||||
|
||||
if not "%MONO_LLVM_BUILD_DIR%" == "" (
|
||||
set VS_BUILD_ARGS=/p:_LLVMBuildDir="%MONO_LLVM_BUILD_DIR%"
|
||||
)
|
||||
|
||||
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
|
||||
call msbuild.exe %VS_BUILD_ARGS% "%MONO_MSVC_SOURCE_DIR%build-external-llvm.vcxproj" && (
|
||||
set BUILD_RESULT=0
|
||||
) || (
|
||||
set BUILD_RESULT=1
|
||||
if not %ERRORLEVEL% == 0 (
|
||||
set BUILD_RESULT=%ERRORLEVEL%
|
||||
)
|
||||
)
|
||||
|
||||
exit /b %BUILD_RESULT%
|
||||
|
||||
@echo on
|
||||
@@ -0,0 +1,101 @@
|
||||
# Usage:
|
||||
# AC_MONO_OUTPUT()
|
||||
#
|
||||
# Generates the output files used by Mono.
|
||||
#
|
||||
AC_DEFUN([AC_MONO_OUTPUT], [
|
||||
|
||||
AC_CONFIG_FILES([po/mcs/Makefile.in])
|
||||
AC_CONFIG_FILES([acceptance-tests/microbench-perf.sh], [chmod +x acceptance-tests/microbench-perf.sh])
|
||||
AC_CONFIG_FILES([runtime/mono-wrapper], [chmod +x runtime/mono-wrapper])
|
||||
AC_CONFIG_FILES([runtime/monodis-wrapper], [chmod +x runtime/monodis-wrapper])
|
||||
AC_CONFIG_FILES([runtime/bin/mono-hang-watchdog], [chmod +x runtime/bin/mono-hang-watchdog])
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
llvm/Makefile
|
||||
mono/Makefile
|
||||
mono/btls/Makefile
|
||||
mono/native/Makefile
|
||||
mono/utils/Makefile
|
||||
mono/metadata/Makefile
|
||||
mono/zlib/Makefile
|
||||
mono/dis/Makefile
|
||||
mono/cil/Makefile
|
||||
mono/arch/Makefile
|
||||
mono/arch/x86/Makefile
|
||||
mono/arch/amd64/Makefile
|
||||
mono/arch/ppc/Makefile
|
||||
mono/arch/sparc/Makefile
|
||||
mono/arch/s390x/Makefile
|
||||
mono/arch/arm/Makefile
|
||||
mono/arch/arm64/Makefile
|
||||
mono/arch/mips/Makefile
|
||||
mono/arch/riscv/Makefile
|
||||
mono/sgen/Makefile
|
||||
mono/native/platform-type.c
|
||||
mono/native/platform-type-compat.c
|
||||
mono/native/platform-type-unified.c
|
||||
mono/tests/Makefile
|
||||
mono/tests/assembly-load-reference/Makefile
|
||||
mono/tests/tests-config
|
||||
mono/tests/gc-descriptors/Makefile
|
||||
mono/tests/testing_gac/Makefile
|
||||
mono/tests/fullaot-mixed/Makefile
|
||||
mono/tests/llvmonly-mixed/Makefile
|
||||
mono/unit-tests/Makefile
|
||||
mono/benchmark/Makefile
|
||||
mono/mini/Makefile
|
||||
mono/profiler/Makefile
|
||||
mono/eglib/Makefile
|
||||
mono/eglib/eglib-config.h
|
||||
mono/eglib/test/Makefile
|
||||
m4/Makefile
|
||||
msvc/Makefile
|
||||
mono/utils/jemalloc/Makefile
|
||||
mono-uninstalled.pc
|
||||
acceptance-tests/Makefile
|
||||
scripts/mono-find-provides
|
||||
scripts/mono-find-requires
|
||||
ikvm-native/Makefile
|
||||
scripts/Makefile
|
||||
man/Makefile
|
||||
docs/Makefile
|
||||
data/Makefile
|
||||
data/net_2_0/Makefile
|
||||
data/net_4_0/Makefile
|
||||
data/net_4_5/Makefile
|
||||
data/net_2_0/Browsers/Makefile
|
||||
data/net_4_0/Browsers/Makefile
|
||||
data/net_4_5/Browsers/Makefile
|
||||
data/mint.pc
|
||||
data/mono-2.pc
|
||||
data/monosgen-2.pc
|
||||
data/mono.pc
|
||||
data/mono-cairo.pc
|
||||
data/mono-options.pc
|
||||
data/mono-lineeditor.pc
|
||||
data/monodoc.pc
|
||||
data/dotnet.pc
|
||||
data/dotnet35.pc
|
||||
data/wcf.pc
|
||||
data/cecil.pc
|
||||
data/system.web.extensions_1.0.pc
|
||||
data/system.web.extensions.design_1.0.pc
|
||||
data/system.web.mvc.pc
|
||||
data/system.web.mvc2.pc
|
||||
data/system.web.mvc3.pc
|
||||
data/aspnetwebstack.pc
|
||||
data/reactive.pc
|
||||
samples/Makefile
|
||||
support/Makefile
|
||||
data/config
|
||||
tools/Makefile
|
||||
tools/locale-builder/Makefile
|
||||
tools/sgen/Makefile
|
||||
tools/pedump/Makefile
|
||||
tools/mono-hang-watchdog/Makefile
|
||||
runtime/Makefile
|
||||
po/Makefile
|
||||
])
|
||||
])
|
||||
+4
-2
@@ -860,9 +860,11 @@ Instruct the runtime on the number of times that the method specified
|
||||
by --compile (or all the methods if --compile-all is used) to be
|
||||
compiled. This is used for testing the code generator performance.
|
||||
.TP
|
||||
\fB--stats\fR
|
||||
\fB--stats=[method]\fR
|
||||
Displays information about the work done by the runtime during the
|
||||
execution of an application.
|
||||
execution of an application. If a method (namespace.name:methodname)
|
||||
is specified, it will display that information when the method is
|
||||
first run in addition to the end of program execution.
|
||||
.TP
|
||||
\fB--wapi=hps|semdel\fR
|
||||
Perform maintenance of the process shared data.
|
||||
|
||||
+71
-40
@@ -89,26 +89,32 @@ endif
|
||||
test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
|
||||
test_lib_output = $(test_lib_dir)/$(test_lib)
|
||||
|
||||
test_sourcefile_base_excludes = $(test_lib).exclude.sources
|
||||
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_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_lib_output:$(ASSEMBLY_EXT)=.pdb)
|
||||
|
||||
tests_CLEAN_FILES += $(test_lib_output) $(test_response) $(test_makefrag)
|
||||
|
||||
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_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
|
||||
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
|
||||
|
||||
ifeq ($(wildcard $(xtest_sourcefile_base)),)
|
||||
xtest_sourcefile_base = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
|
||||
@@ -140,6 +146,10 @@ 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) $(test_lib_output:.dll=.part3.dll)
|
||||
endif
|
||||
|
||||
check: run-test
|
||||
test-local: $(test_assemblies) $(test_lib_dir)/nunit-excludes.txt
|
||||
run-test-local: run-test-lib
|
||||
@@ -262,44 +272,42 @@ 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_FILES += `sed -e '/^$$/d' -e 's,^../,,' -e '/^\#.*$$/d' -et -e 's,^,Test/,' $(test_sourcefile_base)`
|
||||
|
||||
$(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)
|
||||
|
||||
tests_CLEAN_FILES += $(test_sourcefile) $(test_response) $(test_makefrag)
|
||||
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
|
||||
|
||||
$(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
|
||||
|
||||
$(test_lib_output:.dll=.part3.dll): $(test_lib_output) $(test_response).part3
|
||||
ifneq ($(wildcard $(test_response).part3),)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response).part3
|
||||
endif
|
||||
|
||||
# part3 is optional so we need this empty target to silence make if it doesn't exist
|
||||
$(test_response).part3: ;
|
||||
|
||||
tests_CLEAN_FILES += $(test_response).part1 $(test_response).part2 $(test_response).part3
|
||||
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) $(test_lib_output:.dll=.part3.dll): ,' $< >$@
|
||||
|
||||
-include $(test_makefrag)
|
||||
|
||||
build-test-lib: $(test_lib_output)
|
||||
@echo Building testing lib
|
||||
|
||||
endif
|
||||
|
||||
@@ -336,8 +344,15 @@ 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) $(xtest_lib_output:.dll=.part3.dll)
|
||||
endif
|
||||
|
||||
|
||||
check: run-xunit-test-local
|
||||
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
|
||||
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
|
||||
run-xunit-test-local: run-xunit-test-lib
|
||||
|
||||
$(test_lib_dir)/xunit-excludes.txt: $(topdir)/build/tests.make | $(test_lib_dir)
|
||||
@@ -360,19 +375,35 @@ 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): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src) $(XTEST_REMOTE_EXECUTOR) | $(test_lib_dir)
|
||||
$(xtest_lib_output): $(xtest_assembly_dep) $(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)
|
||||
|
||||
xtest_response_preprocessed = $(xtest_response)_preprocessed
|
||||
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)
|
||||
|
||||
$(xtest_lib_output:.dll=.part3.dll): $(xtest_lib_output) $(xtest_response).part3
|
||||
ifneq ($(wildcard $(xtest_response).part3),)
|
||||
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response).part3 $(xunit_src)
|
||||
endif
|
||||
|
||||
# part3 is optional so we need this empty target to silence make if it doesn't exist
|
||||
$(xtest_response).part3: ;
|
||||
|
||||
xtests_CLEAN_FILES += $(xtest_response).part1 $(xtest_response).part2 $(xtest_response).part3
|
||||
endif
|
||||
|
||||
# This handles .excludes/.sources pairs, as well as resolving the
|
||||
# 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)"
|
||||
# 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)"
|
||||
|
||||
$(xtest_makefrag): $(xtest_response)
|
||||
@echo Creating $@ ...
|
||||
@sed 's,^,$(xtest_lib_output): ,' $< >$@
|
||||
@sed 's,^,$(xtest_lib_output) $(xtest_lib_output:.dll=.part1.dll) $(xtest_lib_output:.dll=.part2.dll) $(xtest_lib_output:.dll=.part3.dll): ,' $< >$@
|
||||
|
||||
-include $(xtest_makefrag)
|
||||
|
||||
|
||||
@@ -27,14 +27,28 @@
|
||||
[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))]
|
||||
@@ -42,10 +56,15 @@
|
||||
[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))]
|
||||
|
||||
|
||||
@@ -52,8 +52,6 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
|
||||
#if !CECIL && !MOBILE
|
||||
ModuleBuilder mb;
|
||||
delegate Guid GetGuidFunc (ModuleBuilder mb);
|
||||
GetGuidFunc get_guid_func;
|
||||
|
||||
public SymbolWriterImpl (ModuleBuilder mb)
|
||||
{
|
||||
@@ -62,16 +60,7 @@ namespace Mono.CompilerServices.SymbolWriter
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
MethodInfo mi = typeof (ModuleBuilder).GetMethod (
|
||||
"Mono_GetGuid",
|
||||
BindingFlags.Static | BindingFlags.NonPublic);
|
||||
if (mi == null)
|
||||
return;
|
||||
|
||||
get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
|
||||
typeof (GetGuidFunc), mi);
|
||||
|
||||
msw.WriteSymbolFile (get_guid_func (mb));
|
||||
msw.WriteSymbolFile (mb.ModuleVersionId);
|
||||
}
|
||||
#else
|
||||
Guid guid;
|
||||
|
||||
@@ -51,10 +51,19 @@ namespace Mono.Debugger.Soft
|
||||
// Since protocol version 2.46
|
||||
public Value Value {
|
||||
get {
|
||||
ValueImpl value;
|
||||
if (Address == 0)
|
||||
return null;
|
||||
|
||||
return vm.DecodeValue (vm.conn.Pointer_GetValue (Address, Type));
|
||||
try {
|
||||
value = vm.conn.Pointer_GetValue (Address, Type);
|
||||
}
|
||||
catch (CommandException ex) {
|
||||
if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT)
|
||||
throw new ArgumentException ("Invalid pointer address.");
|
||||
else
|
||||
throw;
|
||||
}
|
||||
return vm.DecodeValue (value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -558,6 +558,10 @@ public class Tests : TestsBase, ITest2
|
||||
runtime_invoke_hybrid_exceptions();
|
||||
return 0;
|
||||
}
|
||||
if (args.Length > 0 && args [0] == "new_thread_hybrid_exception") {
|
||||
new_thread_hybrid_exception();
|
||||
return 0;
|
||||
}
|
||||
assembly_load ();
|
||||
breakpoints ();
|
||||
single_stepping ();
|
||||
@@ -605,6 +609,10 @@ public class Tests : TestsBase, ITest2
|
||||
fixed_size_array();
|
||||
test_new_exception_filter();
|
||||
test_async_debug_generics();
|
||||
if (args.Length >0 && args [0] == "pointer_arguments2") {
|
||||
pointers2 ();
|
||||
return 0;
|
||||
}
|
||||
return 3;
|
||||
}
|
||||
|
||||
@@ -2222,12 +2230,38 @@ public class Tests : TestsBase, ITest2
|
||||
[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[] { });
|
||||
ConstructorInfo rtConstructor = rtType.GetConstructor(Type.EmptyTypes);
|
||||
object rtObject = rtConstructor.Invoke(new object[] { });
|
||||
MethodInfo rtMethod = rtType.GetMethod("RuntimeInvokeThrowMethod");
|
||||
rtMethod.Invoke(rtObject, new object[] { });
|
||||
}
|
||||
|
||||
public static unsafe void pointer_arguments2 (int* a) {
|
||||
*a = 0;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static unsafe void pointers2 () {
|
||||
int[] a = new [] {1,2,3};
|
||||
fixed (int* pa = a)
|
||||
pointer_arguments2 (pa);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static void new_thread_hybrid_exception() {
|
||||
try
|
||||
{
|
||||
Thread thread = new Thread(new_thread_hybrid_exception2);
|
||||
thread.Start();
|
||||
}
|
||||
catch (Exception sockEx)
|
||||
{
|
||||
}
|
||||
}
|
||||
public static void new_thread_hybrid_exception2()
|
||||
{
|
||||
throw new Exception("Error");
|
||||
}
|
||||
}
|
||||
|
||||
public class SentinelClass : MarshalByRefObject {
|
||||
|
||||
@@ -5151,6 +5151,19 @@ public class DebuggerTests
|
||||
vm.Exit (0);
|
||||
vm = null;
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestNewThreadHybridSuspendException () {
|
||||
TearDown ();
|
||||
Start (dtest_app_path, "new_thread_hybrid_exception", 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 () {
|
||||
@@ -5161,6 +5174,32 @@ public class DebuggerTests
|
||||
e = step_in_await ("MoveNext", e);
|
||||
e = step_in_await ("MoveNext", e);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InvalidPointer_GetValue () {
|
||||
vm.Detach ();
|
||||
Start (dtest_app_path, "pointer_arguments2");
|
||||
Event e = run_until ("pointer_arguments2");
|
||||
var frame = e.Thread.GetFrames () [0];
|
||||
|
||||
var param = frame.Method.GetParameters()[0];
|
||||
Assert.AreEqual("Int32*", param.ParameterType.Name);
|
||||
|
||||
var pointerValue = frame.GetValue(param) as PointerValue;
|
||||
Assert.AreEqual("Int32*", pointerValue.Type.Name);
|
||||
|
||||
|
||||
var pointerValue2 = new PointerValue (pointerValue.VirtualMachine, pointerValue.Type, 200);
|
||||
|
||||
try {
|
||||
var val = pointerValue2.Value;
|
||||
}
|
||||
catch (ArgumentException ex) {
|
||||
Assert.IsInstanceOfType (typeof (ArgumentException), ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
} // class DebuggerTests
|
||||
|
||||
+3
-20
@@ -43,33 +43,16 @@ namespace Mono.Messaging.RabbitMQ {
|
||||
public class RabbitMQMessagingProvider : IMessagingProvider {
|
||||
|
||||
private int txCounter = 0;
|
||||
private readonly uint localIp;
|
||||
private readonly Guid localId;
|
||||
private readonly MessagingContextPool contextPool;
|
||||
|
||||
public RabbitMQMessagingProvider ()
|
||||
{
|
||||
localIp = GetLocalIP ();
|
||||
localId = Guid.NewGuid ();
|
||||
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 ();
|
||||
@@ -78,7 +61,7 @@ namespace Mono.Messaging.RabbitMQ {
|
||||
public IMessageQueueTransaction CreateMessageQueueTransaction ()
|
||||
{
|
||||
Interlocked.Increment (ref txCounter);
|
||||
string txId = localIp.ToString () + txCounter.ToString ();
|
||||
string txId = localId.ToString () + "_" + txCounter.ToString ();
|
||||
|
||||
return new RabbitMQMessageQueueTransaction (txId, contextPool);
|
||||
}
|
||||
|
||||
@@ -311,8 +311,8 @@ public class UnixEncoding : Encoding
|
||||
|
||||
public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount)
|
||||
{
|
||||
if (bytes == null || chars == null)
|
||||
throw new ArgumentNullException (bytes == null ? "bytes" : "chars");
|
||||
if ((bytes == null && byteCount != 0) || (chars == null && charCount != 0))
|
||||
throw new ArgumentNullException ((bytes == null && byteCount != 0) ? "bytes" : "chars");
|
||||
|
||||
if (charCount < 0 || byteCount < 0)
|
||||
throw new ArgumentOutOfRangeException (charCount < 0 ? "charCount" : "byteCount");
|
||||
|
||||
@@ -995,6 +995,23 @@ namespace MonoTests.Mono.Unix {
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestEmptyString ()
|
||||
{
|
||||
byte[] data = new byte [] {};
|
||||
Encoding enc = new UnixEncoding ();
|
||||
|
||||
string s = enc.GetString (data);
|
||||
Assert.AreEqual (s, "", "#1");
|
||||
char[] chars = enc.GetChars (data);
|
||||
Assert.AreEqual (chars.Length, 0, "#2");
|
||||
|
||||
byte[] b1 = enc.GetBytes ("");
|
||||
Assert.AreEqual (b1.Length, 0, "#3");
|
||||
byte[] b2 = enc.GetBytes (new char[] {});
|
||||
Assert.AreEqual (b2.Length, 0, "#3");
|
||||
}
|
||||
|
||||
private void Compare (string prefix, string start, byte[] end)
|
||||
{
|
||||
byte[] bytes = unix.GetBytes (start);
|
||||
|
||||
@@ -508,7 +508,7 @@ namespace MonoTests.Mono.Profiler.Log {
|
||||
});
|
||||
}
|
||||
|
||||
[Fact (Skip = "https://github.com/mono/mono/issues/8709")]
|
||||
[Fact]
|
||||
public void HeapshotDataIsValid ()
|
||||
{
|
||||
new ProfilerTestRun ("simple-allocation", "heapshot").Run (events => {
|
||||
|
||||
@@ -86,8 +86,8 @@ namespace Mono.Security {
|
||||
Buffer.BlockCopy (data, (2 + nLenLength), m_aValue, 0, nLength);
|
||||
|
||||
if ((m_nTag & 0x20) == 0x20) {
|
||||
int nStart = (2 + nLenLength);
|
||||
Decode (data, ref nStart, data.Length);
|
||||
int nStart = 0;
|
||||
Decode (m_aValue, ref nStart, m_aValue.Length);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ namespace Mono.Security {
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder hexLine = new StringBuilder ();
|
||||
|
||||
|
||||
// Add tag
|
||||
hexLine.AppendFormat ("Tag: {0} {1}", m_nTag.ToString ("X2"), Environment.NewLine);
|
||||
|
||||
|
||||
@@ -5658,21 +5658,30 @@ namespace PEAPI {
|
||||
char[] name;
|
||||
Hashtable htable = new Hashtable();
|
||||
Hashtable btable = new Hashtable (new ByteArrayHashCodeProvider (), new ByteArrayComparer ());
|
||||
bool addInitByte = false;
|
||||
bool initByteAdded = false;
|
||||
|
||||
internal MetaDataStream(char[] name, bool addInitByte) : base(new MemoryStream())
|
||||
{
|
||||
if (addInitByte) { Write((byte)0); size = 1; }
|
||||
this.addInitByte = addInitByte;
|
||||
this.name = name;
|
||||
sizeOfHeader = StreamHeaderSize + (uint)name.Length;
|
||||
}
|
||||
|
||||
internal MetaDataStream(char[] name, System.Text.Encoding enc, bool addInitByte) : base(new MemoryStream(),enc)
|
||||
{
|
||||
if (addInitByte) { Write((byte)0); size = 1; }
|
||||
this.addInitByte = addInitByte;
|
||||
this.name = name;
|
||||
sizeOfHeader = StreamHeaderSize + (uint)name.Length;
|
||||
}
|
||||
|
||||
void AddInitByte () {
|
||||
if (addInitByte && !initByteAdded) {
|
||||
Write((byte)0);
|
||||
size += 1;
|
||||
initByteAdded = true;
|
||||
}
|
||||
}
|
||||
public uint Start {
|
||||
get { return start; }
|
||||
set { start = value; }
|
||||
@@ -5706,6 +5715,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(string str, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
Object val = htable[str];
|
||||
uint index = 0;
|
||||
if (val == null) {
|
||||
@@ -5723,6 +5733,7 @@ namespace PEAPI {
|
||||
}
|
||||
internal uint Add (byte[] str, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
Object val = btable [str];
|
||||
uint index = 0;
|
||||
if (val == null) {
|
||||
@@ -5740,6 +5751,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(Guid guid, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
byte [] b = guid.ToByteArray ();
|
||||
if (prependSize) CompressNum ((uint) b.Length);
|
||||
Write(guid.ToByteArray());
|
||||
@@ -5749,6 +5761,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(byte[] blob)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
CompressNum((uint)blob.Length);
|
||||
Write(blob);
|
||||
@@ -5758,6 +5771,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(byte val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (1);
|
||||
Write(val);
|
||||
@@ -5767,6 +5781,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(sbyte val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (1);
|
||||
Write(val);
|
||||
@@ -5776,6 +5791,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(ushort val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (2);
|
||||
Write(val);
|
||||
@@ -5785,6 +5801,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(short val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (2);
|
||||
Write(val);
|
||||
@@ -5794,6 +5811,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(uint val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (4);
|
||||
Write(val);
|
||||
@@ -5803,6 +5821,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(int val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (4);
|
||||
Write (val);
|
||||
@@ -5812,6 +5831,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(ulong val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (8);
|
||||
Write(val);
|
||||
@@ -5821,6 +5841,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(long val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (8);
|
||||
Write(val);
|
||||
@@ -5830,6 +5851,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(float val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (4);
|
||||
Write(val);
|
||||
@@ -5839,6 +5861,7 @@ namespace PEAPI {
|
||||
|
||||
internal uint Add(double val, bool prependSize)
|
||||
{
|
||||
AddInitByte ();
|
||||
uint ix = size;
|
||||
if (prependSize) CompressNum (8);
|
||||
Write(val);
|
||||
|
||||
@@ -62,4 +62,6 @@ XTEST_LIB_REFS = System Facades/System.Threading.Tasks Microsoft.CSharp Facades/
|
||||
XTEST_LIB_FLAGS = -unsafe -d:FEATURE_COMPILE
|
||||
XTEST_RESX_RESOURCE_STRING = ../../../external/corefx/src/System.Collections.Immutable/src/Resources/Strings.resx
|
||||
|
||||
XTEST_SPLIT_ASSEMBLIES := $(filter monotouch%, $(PROFILE))
|
||||
|
||||
include ../../build/library.make
|
||||
@@ -3,12 +3,10 @@
|
||||
../../../external/corefx/src/CoreFx.Private.TestUtilities/src/System/AssertExtensions.cs
|
||||
../../../external/corefx/src/Common/tests/System/Threading/Tasks/TaskTimeoutExtensions.cs
|
||||
|
||||
# System.Linq
|
||||
# TODO: ../../../external/corefx/src/System.Linq/tests/*.cs
|
||||
|
||||
# System.Linq.Queryable
|
||||
../../../external/corefx/src/System.Linq.Queryable/tests/*.cs
|
||||
../../../external/corefx/src/Common/tests/System/Linq/SkipTakeData.cs
|
||||
#split monotouch
|
||||
#split monotouch_tv
|
||||
#split monotouch_watch
|
||||
|
||||
# System.Linq.Expressions
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/Array/*.cs:NewArrayBoundsTests.cs,ArrayAccessTests.cs,ArrayIndexTests.cs
|
||||
@@ -56,7 +54,19 @@
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/Unary/IncDecAssign/*.cs
|
||||
../../../external/corefx/src/System.Linq.Expressions/tests/*.cs:StackSpillerTests.cs,ReadOnlyCollectionBuilderTests.cs
|
||||
|
||||
# System.Linq.Expressions
|
||||
|
||||
#split monotouch
|
||||
#split monotouch_tv
|
||||
#split monotouch_watch
|
||||
|
||||
# System.Linq
|
||||
# TODO: ../../../external/corefx/src/System.Linq/tests/*.cs
|
||||
|
||||
# System.Linq.Queryable
|
||||
../../../external/corefx/src/System.Linq.Queryable/tests/*.cs
|
||||
../../../external/corefx/src/Common/tests/System/Linq/SkipTakeData.cs
|
||||
|
||||
# System.Linq.Parallel
|
||||
../../../external/corefx/src/System.Linq.Parallel/tests/Combinatorial/*.cs
|
||||
../../../external/corefx/src/System.Linq.Parallel/tests/Helpers/*.cs
|
||||
../../../external/corefx/src/System.Linq.Parallel/tests/QueryOperators/*.cs:DefaultIfEmptyTests.cs,SingleSingleOrDefaultTests.cs
|
||||
|
||||
+22
-22
@@ -1,22 +1,22 @@
|
||||
@echo off
|
||||
echo This batch will throw some errors, if the user already exists or
|
||||
echo the database does not exist. You can safely ignore those
|
||||
echo.
|
||||
echo You should run this as the installation owner (the user, that installed Ingres)
|
||||
echo.
|
||||
echo Tested on Ingres 9.2.0 Build 118
|
||||
|
||||
echo Trying to drop database northwind...
|
||||
destroydb northwind -uLinqUser > nwind.log
|
||||
|
||||
echo Creating user LinqUser...
|
||||
sql iidbdb < create_User.sql >> nwind.log
|
||||
|
||||
echo Creating database northwind...
|
||||
createdb northwind -uLinqUser >> nwind.log
|
||||
|
||||
echo Filling data into northwind...
|
||||
sql northwind -uLinqUser < create_Northwind.sql >> nwind.log
|
||||
|
||||
echo Done.
|
||||
pause
|
||||
@echo off
|
||||
echo This batch will throw some errors, if the user already exists or
|
||||
echo the database does not exist. You can safely ignore those
|
||||
echo.
|
||||
echo You should run this as the installation owner (the user, that installed Ingres)
|
||||
echo.
|
||||
echo Tested on Ingres 9.2.0 Build 118
|
||||
|
||||
echo Trying to drop database northwind...
|
||||
destroydb northwind -uLinqUser > nwind.log
|
||||
|
||||
echo Creating user LinqUser...
|
||||
sql iidbdb < create_User.sql >> nwind.log
|
||||
|
||||
echo Creating database northwind...
|
||||
createdb northwind -uLinqUser >> nwind.log
|
||||
|
||||
echo Filling data into northwind...
|
||||
sql northwind -uLinqUser < create_Northwind.sql >> nwind.log
|
||||
|
||||
echo Done.
|
||||
pause
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
REM you need to have DbMetal.exe compiled in the standard directory
|
||||
|
||||
REM you need to have DbMetal.exe compiled in the standard directory
|
||||
|
||||
..\..\..\DbMetal\bin\DbMetal.exe -Provider=MySql -server:localhost -user:LinqUser -password:linq2 -database:AllTypes -namespace:AllTypesExample -code:AllTypes.cs
|
||||
@@ -1,5 +1,5 @@
|
||||
REM: note that the '-sprocs' option is turned on
|
||||
|
||||
..\..\..\SqlMetal\bin\MySqlMetal.exe -database:Andrus -server:localhost -user:LinqUser -password:linq2 -namespace:andrusDB -code:..\nwind\Andrus.cs -sprocs
|
||||
|
||||
|
||||
REM: note that the '-sprocs' option is turned on
|
||||
|
||||
..\..\..\SqlMetal\bin\MySqlMetal.exe -database:Andrus -server:localhost -user:LinqUser -password:linq2 -namespace:andrusDB -code:..\nwind\Andrus.cs -sprocs
|
||||
|
||||
|
||||
@@ -2,16 +2,15 @@ thisdir = class/System.Net.Http/FunctionalTests
|
||||
SUBDIRS =
|
||||
include ../../../build/rules.make
|
||||
|
||||
ASSEMBLY = System.Net.Http.FunctionalTests
|
||||
LIBRARY = System.Net.Http.FunctionalTests.dll
|
||||
NO_BUILD = yes
|
||||
NO_INSTALL = yes
|
||||
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks System.Net.Http
|
||||
USE_XTEST_REMOTE_EXECUTOR = YES
|
||||
|
||||
XTEST_LIB_FLAGS = /resource:../../System/Test/TestData/testservereku.contoso.com.pfx
|
||||
|
||||
the_assembly = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/System.Net.Http.dll
|
||||
|
||||
include ../../../build/tests.make
|
||||
include ../../../build/library.make
|
||||
|
||||
TEST_RUNTIME := MONO_URI_DOTNETRELATIVEORABSOLUTE=true $(TEST_RUNTIME)
|
||||
|
||||
|
||||
Whitespace-only changes.
@@ -78,8 +78,8 @@ namespace System.Net.Http
|
||||
}
|
||||
|
||||
public bool UseProxy {
|
||||
get => throw new PlatformNotSupportedException ("Property AutomaticDecompression is not supported.");
|
||||
set => throw new PlatformNotSupportedException ("Property AutomaticDecompression is not supported.");
|
||||
get => throw new PlatformNotSupportedException ("Property UseProxy is not supported.");
|
||||
set => throw new PlatformNotSupportedException ("Property UseProxy is not supported.");
|
||||
}
|
||||
|
||||
public IWebProxy Proxy {
|
||||
@@ -132,7 +132,7 @@ namespace System.Net.Http
|
||||
set => throw new PlatformNotSupportedException ("Property MaxRequestContentBufferSize is not supported.");
|
||||
}
|
||||
|
||||
public IDictionary<string, object> Properties => throw new PlatformNotSupportedException ();
|
||||
public IDictionary<string, object> Properties => throw new PlatformNotSupportedException ("Property Properties is not supported.");
|
||||
|
||||
public static Func<HttpRequestMessage, X509Certificate2, X509Chain, SslPolicyErrors, bool> DangerousAcceptAnyServerCertificateValidator { get; } = delegate { return true; };
|
||||
|
||||
|
||||
@@ -2,15 +2,15 @@ thisdir = class/System.Net.Http/UnitTests
|
||||
SUBDIRS =
|
||||
include ../../../build/rules.make
|
||||
|
||||
ASSEMBLY = System.Net.Http.UnitTests
|
||||
LIBRARY = System.Net.Http.UnitTests.dll
|
||||
NO_BUILD = yes
|
||||
NO_INSTALL = yes
|
||||
|
||||
XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks
|
||||
USE_XTEST_REMOTE_EXECUTOR = YES
|
||||
XTEST_MCS_FLAGS = -nowarn:436
|
||||
|
||||
include ../../../build/tests.make
|
||||
|
||||
xtest_flags = $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS) /unsafe
|
||||
include ../../../build/library.make
|
||||
|
||||
clean-local:
|
||||
-rm -f $(tests_CLEAN_FILES) $(CLEAN_FILES)
|
||||
|
||||
Whitespace-only changes.
@@ -30,7 +30,10 @@ namespace MonoTests.Remoting
|
||||
{
|
||||
try
|
||||
{
|
||||
tcp = new TcpChannel (0);
|
||||
Hashtable tcpOptions = new Hashtable ();
|
||||
tcpOptions ["port"] = 0;
|
||||
tcpOptions ["bindTo"] = "127.0.0.1";
|
||||
tcp = new TcpChannel (tcpOptions, null, null);
|
||||
|
||||
Hashtable options = new Hashtable ();
|
||||
options ["timeout"] = 10000; // 10s
|
||||
@@ -42,8 +45,8 @@ namespace MonoTests.Remoting
|
||||
AppDomain domain = BaseCallTest.CreateDomain ("testdomain_activation");
|
||||
server = (ActivationServer) domain.CreateInstanceAndUnwrap(GetType().Assembly.FullName,"MonoTests.Remoting.ActivationServer");
|
||||
|
||||
var tcpUrlPrefix = $"tcp://localhost:{server.TcpPort}";
|
||||
var httpUrlPrefix = $"http://localhost:{server.HttpPort}";
|
||||
var tcpUrlPrefix = $"tcp://127.0.0.1:{server.TcpPort}";
|
||||
var httpUrlPrefix = $"http://127.0.0.1:{server.HttpPort}";
|
||||
RemotingConfiguration.RegisterActivatedClientType (typeof(CaObject1), tcpUrlPrefix);
|
||||
RemotingConfiguration.RegisterActivatedClientType (typeof(CaObject2), httpUrlPrefix);
|
||||
RemotingConfiguration.RegisterWellKnownClientType (typeof(WkObjectSinglecall1), tcpUrlPrefix + "/wkoSingleCall1");
|
||||
@@ -169,8 +172,14 @@ namespace MonoTests.Remoting
|
||||
{
|
||||
TcpPort = NetworkHelpers.FindFreePort ();
|
||||
HttpPort = NetworkHelpers.FindFreePort ();
|
||||
tcp = new TcpChannel (TcpPort);
|
||||
http = new HttpChannel (HttpPort);
|
||||
IDictionary tcpProps = new Hashtable ();
|
||||
IDictionary httpProps = new Hashtable ();
|
||||
tcpProps ["port"] = TcpPort;
|
||||
tcpProps ["bindTo"] = "127.0.0.1";
|
||||
httpProps ["port"] = HttpPort;
|
||||
httpProps ["bindTo"] = "127.0.0.1";
|
||||
tcp = new TcpChannel (tcpProps, null, null);
|
||||
http = new HttpChannel (httpProps, null, null);
|
||||
|
||||
ChannelServices.RegisterChannel (tcp);
|
||||
ChannelServices.RegisterChannel (http);
|
||||
|
||||
@@ -172,6 +172,7 @@ namespace MonoTests.Remoting
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["name"] = Guid.NewGuid ().ToString("N");
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chan = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chan);
|
||||
|
||||
|
||||
@@ -20,11 +20,15 @@ namespace MonoTests.Remoting.Http
|
||||
[Ignore ("This test somehow keeps http channel registered and then blocks any further http tests working. This also happens under .NET, so this test itself is wrong with nunit 2.4.8.")]
|
||||
public void Test ()
|
||||
{
|
||||
new HttpChannel (8086);
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = port;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
new HttpChannel (props, null, null);
|
||||
RemotingServices.Marshal (new Service (), "test");
|
||||
|
||||
Service remObj = (Service) RemotingServices.Connect (
|
||||
typeof (Service), "http://localhost:8086/test");
|
||||
typeof (Service), $"http://127.0.0.1:{port}/test");
|
||||
|
||||
ArrayList list;
|
||||
remObj.Test (out list);
|
||||
@@ -70,13 +74,16 @@ namespace MonoTests.Remoting.Http
|
||||
public void Main ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
channel = new HttpChannel (port);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = port;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
channel = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (channel);
|
||||
RemotingConfiguration.RegisterWellKnownServiceType
|
||||
(typeof (Bug321420),"Server.soap", WellKnownObjectMode.Singleton);
|
||||
|
||||
Bug321420 s = (Bug321420) Activator.GetObject (typeof
|
||||
(Bug321420), $"http://localhost:{port}/Server.soap");
|
||||
(Bug321420), $"http://127.0.0.1:{port}/Server.soap");
|
||||
|
||||
// this works: s.Method ("a", "b");
|
||||
s.Method ("a", "a");
|
||||
@@ -101,7 +108,7 @@ namespace MonoTests.Remoting.Http
|
||||
public void Main ()
|
||||
{
|
||||
Foo foo = (Foo) Activator.GetObject (typeof (Foo),
|
||||
$"http://localhost:{server.HttpPort}/Test");
|
||||
$"http://127.0.0.1:{server.HttpPort}/Test");
|
||||
|
||||
Bar bar = foo.Login ();
|
||||
if (bar != null)
|
||||
@@ -146,7 +153,10 @@ namespace MonoTests.Remoting.Http
|
||||
public void Start ()
|
||||
{
|
||||
HttpPort = NetworkHelpers.FindFreePort ();
|
||||
c = new HttpChannel (HttpPort);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = HttpPort;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
c = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (c);
|
||||
|
||||
Type t = typeof(Foo);
|
||||
@@ -174,11 +184,14 @@ namespace MonoTests.Remoting.Http
|
||||
[Test]
|
||||
public void Main ()
|
||||
{
|
||||
channel = new HttpChannel (0);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = 0;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
channel = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (channel);
|
||||
MarshalByRefObject obj = (MarshalByRefObject) RemotingServices.Connect (
|
||||
typeof (IFactorial),
|
||||
$"http://localhost:{server.HttpPort}/MyEndPoint");
|
||||
$"http://127.0.0.1:{server.HttpPort}/MyEndPoint");
|
||||
IFactorial cal = (IFactorial) obj;
|
||||
Assert.AreEqual (cal.CalculateFactorial (4), 24);
|
||||
}
|
||||
@@ -216,7 +229,10 @@ namespace MonoTests.Remoting.Http
|
||||
public void Start ()
|
||||
{
|
||||
HttpPort = NetworkHelpers.FindFreePort ();
|
||||
c = new HttpChannel (HttpPort);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = HttpPort;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
c = new HttpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (c);
|
||||
|
||||
Type t = typeof(Calculator);
|
||||
|
||||
@@ -294,6 +294,7 @@ namespace MonoTests.Remoting
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["name"] = objMarshal.Uri;
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
|
||||
@@ -317,6 +318,7 @@ namespace MonoTests.Remoting
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["name"] = objMarshal.Uri;
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
|
||||
@@ -346,7 +348,10 @@ namespace MonoTests.Remoting
|
||||
public void ExecuteMessage ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
MarshalObject objMarshal = NewMarshalObject ();
|
||||
@@ -379,7 +384,10 @@ namespace MonoTests.Remoting
|
||||
public void IsOneWay ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MarshalObject.rem", WellKnownObjectMode.Singleton);
|
||||
@@ -403,7 +411,10 @@ namespace MonoTests.Remoting
|
||||
public void GetObjRefForProxy ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
// Register le factory as a SAO
|
||||
@@ -427,7 +438,10 @@ namespace MonoTests.Remoting
|
||||
public void GetRealProxy ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MonoTests.System.Runtime.Remoting.RemotingServicesTest.MarshalObject.soap", WellKnownObjectMode.Singleton);
|
||||
@@ -449,7 +463,10 @@ namespace MonoTests.Remoting
|
||||
public void SetObjectUriForMarshal ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
MarshalObject objRem = NewMarshalObject ();
|
||||
@@ -469,7 +486,10 @@ namespace MonoTests.Remoting
|
||||
public void GetServeurTypeForUri ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
Type type = typeof (MarshalObject);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
@@ -491,7 +511,10 @@ namespace MonoTests.Remoting
|
||||
public void IsObjectOutOf ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "MarshalObject2.rem", WellKnownObjectMode.Singleton);
|
||||
@@ -514,7 +537,10 @@ namespace MonoTests.Remoting
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
RemotingConfiguration.ApplicationName = "app";
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "obj3.rem", WellKnownObjectMode.Singleton);
|
||||
@@ -541,7 +567,10 @@ namespace MonoTests.Remoting
|
||||
public void GetObjectWithChannelDataTest ()
|
||||
{
|
||||
var port = NetworkHelpers.FindFreePort ();
|
||||
TcpChannel chn = new TcpChannel (port);
|
||||
IDictionary props = new Hashtable ();
|
||||
props ["port"] = port;
|
||||
props ["bindTo"] = "127.0.0.1";
|
||||
TcpChannel chn = new TcpChannel (props, null, null);
|
||||
ChannelServices.RegisterChannel (chn);
|
||||
try {
|
||||
RemotingConfiguration.RegisterWellKnownServiceType (typeof (MarshalObject), "getobjectwithchanneldata.rem", WellKnownObjectMode.Singleton);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Runtime.Remoting;
|
||||
using System.Runtime.Remoting.Channels;
|
||||
using System.Runtime.Remoting.Channels.Tcp;
|
||||
@@ -55,12 +56,18 @@ namespace MonoTests.Remoting
|
||||
{
|
||||
public override IChannelSender CreateClientChannel ()
|
||||
{
|
||||
return new TcpChannel (0);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = 0;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
return new TcpChannel (props, null, null);
|
||||
}
|
||||
|
||||
public override IChannelReceiver CreateServerChannel ()
|
||||
{
|
||||
return new TcpChannel (0);
|
||||
Hashtable props = new Hashtable ();
|
||||
props["port"] = 0;
|
||||
props["bindTo"] = "127.0.0.1";
|
||||
return new TcpChannel (props, null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Enables the creation of PKCS#12 PFX data values. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12Builder {
|
||||
/// <summary>Gets a value that indicates whether the PFX data has been sealed.</summary>
|
||||
/// <returns>A value that indicates whether the PFX data has been sealed.</returns>
|
||||
public bool IsSealed {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a byte-based password from a byte array.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="passwordBytes">The byte array to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
||||
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, byte[] passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a byte-based password from a span.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="passwordBytes">The byte span to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">
|
||||
/// <paramref name="pbeParameters" /> indicates that <see cref="F:System.Security.Cryptography.PbeEncryptionAlgorithm.TripleDes3KeyPkcs12" /> should be used, which requires <see cref="T:System.Char" />-based passwords.</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, ReadOnlySpan<byte> passwordBytes, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a char-based password from a span.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="password">The span to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, ReadOnlySpan<char> password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX in an bundle encrypted with a char-based password from a string.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <param name="password">The string to use as a password when encrypting the contents.</param>
|
||||
/// <param name="pbeParameters">The password-based encryption (PBE) parameters to use when encrypting the contents.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> or <paramref name="pbeParameters" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.ArgumentException">The <paramref name="safeContents" /> parameter value is already encrypted.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void AddSafeContentsEncrypted (Pkcs12SafeContents safeContents, string password, PbeParameters pbeParameters) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Add contents to the PFX without encrypting them.</summary>
|
||||
/// <param name="safeContents">The contents to add to the PFX.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="safeContents" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void AddSafeContentsUnencrypted (Pkcs12SafeContents safeContents) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Encodes the contents of a sealed PFX and returns it as a byte array.</summary>
|
||||
/// <returns>A byte array representing the encoded form of the PFX.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is not sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="false" />).</exception>
|
||||
public byte[] Encode () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Seals the PFX against further changes by applying a password-based Message Authentication Code (MAC) over the contents with a password from a span.</summary>
|
||||
/// <param name="password">The password to use as a key for computing the MAC.</param>
|
||||
/// <param name="hashAlgorithm">The hash algorithm to use when computing the MAC.</param>
|
||||
/// <param name="iterationCount">The iteration count for the Key Derivation Function (KDF) used in computing the MAC.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="iterationCount" /> parameter is less than or equal to 0.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void SealWithMac (ReadOnlySpan<char> password, HashAlgorithmName hashAlgorithm, int iterationCount) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Seals the PFX against further changes by applying a password-based Message Authentication Code (MAC) over the contents with a password from a string.</summary>
|
||||
/// <param name="password">The password to use as a key for computing the MAC.</param>
|
||||
/// <param name="hashAlgorithm">The hash algorithm to use when computing the MAC.</param>
|
||||
/// <param name="iterationCount">The iteration count for the Key Derivation Function (KDF) used in computing the MAC.</param>
|
||||
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="iterationCount" /> parameter is less than or equal to 0.</exception>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void SealWithMac (string password, HashAlgorithmName hashAlgorithm, int iterationCount) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Seals the PFX from further changes without applying tamper-protection.</summary>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is already sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="true" />).</exception>
|
||||
public void SealWithoutIntegrity () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to encode the contents of a sealed PFX into a provided buffer.</summary>
|
||||
/// <param name="destination">The byte span to receive the PKCS#12 PFX data.</param>
|
||||
/// <param name="bytesWritten">When this method returns, contains a value that indicates the number of bytes written to <paramref name="destination" />. This parameter is treated as uninitialized.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if <paramref name="destination" /> is big enough to receive the output; otherwise, <see langword="false" />.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The PFX is not sealed (<see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Builder.IsSealed" /> is <see langword="false" />).</exception>
|
||||
public bool TryEncode (Span<byte> destination, out int bytesWritten) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the PKCS#12 CertBag. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12CertBag : Pkcs12SafeBag {
|
||||
/// <summary>Gets the uninterpreted certificate contents of the CertSafeBag.</summary>
|
||||
/// <returns>The uninterpreted certificate contents of the CertSafeBag.</returns>
|
||||
public ReadOnlyMemory<byte> EncodedCertificate {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value indicating whether the content type of the encoded certificate value is the X.509 public key certificate content type.</summary>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the content type is the X.509 public key certificate content type (1.2.840.113549.1.9.22.1); otherwise, <see langword="false" />.</returns>
|
||||
public bool IsX509Certificate {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="T:System.Security.Cryptography.Pkcs.Pkcs12CertBag" /> class using the specified certificate type and encoding.</summary>
|
||||
/// <param name="certificateType">The Object Identifier (OID) for the certificate type.</param>
|
||||
/// <param name="encodedCertificate">The encoded certificate value.</param>
|
||||
/// <exception cref="T:System.ArgumentNullException">The <paramref name="certificateType" /> parameter is <see langword="null" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The <paramref name="encodedCertificate" /> parameter does not represent a single ASN.1 BER-encoded value.</exception>
|
||||
public Pkcs12CertBag (Oid certificateType, ReadOnlyMemory<byte> encodedCertificate)
|
||||
: base (null, default(ReadOnlyMemory<byte>)) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets the contents of the CertBag interpreted as an X.509 public key certificate.</summary>
|
||||
/// <returns>A certificate decoded from the contents of the CertBag.</returns>
|
||||
/// <exception cref="">The content type is not the X.509 public key certificate content type.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents were not valid for the X.509 certificate content type.</exception>
|
||||
public X509Certificate2 GetCertificate () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Gets the Object Identifier (OID) which identifies the content type of the encoded certificte value.</summary>
|
||||
/// <returns>The Object Identifier (OID) which identifies the content type of the encoded certificate value.</returns>
|
||||
public Oid GetCertificateType () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the kind of encryption associated with a PKCS#12 SafeContents value.</summary>
|
||||
public enum Pkcs12ConfidentialityMode {
|
||||
/// <summary>The SafeContents value is not encrypted.</summary>
|
||||
None = 1,
|
||||
/// <summary>The SafeContents value is encrypted with a password.</summary>
|
||||
Password = 2,
|
||||
/// <summary>The SafeContents value is encrypted using public key cryptography.</summary>
|
||||
PublicKey = 3,
|
||||
/// <summary>The kind of encryption applied to the SafeContents is unknown or could not be determined.</summary>
|
||||
Unknown = 0
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Security.Cryptography.Pkcs;
|
||||
|
||||
namespace System.Security.Cryptography.Pkcs {
|
||||
/// <summary>Represents the data from PKCS#12 PFX contents. This class cannot be inherited.</summary>
|
||||
public sealed class Pkcs12Info {
|
||||
/// <summary>Gets a read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</summary>
|
||||
/// <returns>A read-only collection of the SafeContents values present in the PFX AuthenticatedSafe.</returns>
|
||||
public ReadOnlyCollection<Pkcs12SafeContents> AuthenticatedSafe {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Gets a value that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</summary>
|
||||
/// <returns>One of the enumeration members that indicates the type of tamper protection provided for the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents.</returns>
|
||||
public Pkcs12IntegrityMode IntegrityMode {
|
||||
get {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
|
||||
internal Pkcs12Info () {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Reads the provided data as a PKCS#12 PFX and returns an object view of the contents.</summary>
|
||||
/// <param name="encodedBytes">The data to interpret as a PKCS#12 PFX.</param>
|
||||
/// <param name="bytesConsumed">When this method returns, contains a value that indicates the number of bytes from <paramref name="encodedBytes" /> which were read by this method. This parameter is treated as uninitialized.</param>
|
||||
/// <param name="skipCopy">
|
||||
/// <see langword="true" /> to store <paramref name="encodedBytes" /> without making a defensive copy; otherwise, <see langword="false" />. The default is <see langword="false" />.</param>
|
||||
/// <returns>An object view of the PKCS#12 PFX decoded from the input.</returns>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The contents of the <paramref name="encodedBytes" /> parameter were not successfully decoded as a PKCS#12 PFX.</exception>
|
||||
public static Pkcs12Info Decode (ReadOnlyMemory<byte> encodedBytes, out int bytesConsumed, bool skipCopy = false) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="System.ReadOnlySpan{System.Char}" />.</summary>
|
||||
/// <param name="password">The password to use to attempt to verify integrity.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
|
||||
public bool VerifyMac (ReadOnlySpan<char> password) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
|
||||
/// <summary>Attempts to verify the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents with a password represented by a <see cref="T:System.String" />.</summary>
|
||||
/// <param name="password">The password to use to attempt to verify integrity.</param>
|
||||
/// <returns>
|
||||
/// <see langword="true" /> if the password successfully verifies the integrity of the <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.AuthenticatedSafe" /> contents; <see langword="false" /> if the password is not correct or the contents have been altered.</returns>
|
||||
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Security.Cryptography.Pkcs.Pkcs12Info.IntegrityMode" /> value is not <see cref="F:System.Security.Cryptography.Pkcs.Pkcs12IntegrityMode.Password" />.</exception>
|
||||
/// <exception cref="T:System.Security.Cryptography.CryptographicException">The hash algorithm option specified by the PKCS#12 PFX contents could not be identified or is not supported by this platform.</exception>
|
||||
public bool VerifyMac (string password) {
|
||||
throw new PlatformNotSupportedException ();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 709 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user