Browse Source

Merge remote-tracking branch 'origin/main' into feature/project-filter-for-dotnet-watch

pull/1568/head
Razvan Goga 3 years ago
parent
commit
99a5b7728c
  1. 20
      eng/Version.Details.xml
  2. 98
      eng/common/cross/build-rootfs.sh
  3. 49
      eng/common/cross/toolchain.cmake
  4. 2
      eng/common/native/init-compiler.sh
  5. 17
      eng/common/templates/job/job.yml
  6. 13
      eng/common/templates/steps/component-governance.yml
  7. 28
      eng/common/tools.ps1
  8. 35
      eng/common/tools.sh
  9. 4
      global.json
  10. 12
      samples/apps-with-core-angular/MoviesApp/package-lock.json

20
eng/Version.Details.xml

@ -3,25 +3,25 @@
<ProductDependencies> <ProductDependencies>
</ProductDependencies> </ProductDependencies>
<ToolsetDependencies> <ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23177.4"> <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="8.0.0-beta.23265.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>747f53d751983dd062f39f4654bff074536e0012</Sha> <Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.23177.4"> <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="8.0.0-beta.23265.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>747f53d751983dd062f39f4654bff074536e0012</Sha> <Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.23177.4"> <Dependency Name="Microsoft.DotNet.SignTool" Version="8.0.0-beta.23265.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>747f53d751983dd062f39f4654bff074536e0012</Sha> <Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23177.4"> <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="8.0.0-beta.23265.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>747f53d751983dd062f39f4654bff074536e0012</Sha> <Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.23177.4"> <Dependency Name="Microsoft.DotNet.SwaggerGenerator.MSBuild" Version="8.0.0-beta.23265.1">
<Uri>https://github.com/dotnet/arcade</Uri> <Uri>https://github.com/dotnet/arcade</Uri>
<Sha>747f53d751983dd062f39f4654bff074536e0012</Sha> <Sha>2d8d59065b5e090584a8e90c4371fc06ed60bdc5</Sha>
</Dependency> </Dependency>
<Dependency Name="Microsoft.DotNet.Maestro.Client" Version="1.1.0-beta.19556.4"> <Dependency Name="Microsoft.DotNet.Maestro.Client" Version="1.1.0-beta.19556.4">
<Uri>https://github.com/dotnet/arcade-services</Uri> <Uri>https://github.com/dotnet/arcade-services</Uri>

98
eng/common/cross/build-rootfs.sh

@ -27,6 +27,7 @@ __AlpineArch=armv7
__FreeBSDArch=arm __FreeBSDArch=arm
__FreeBSDMachineArch=armv7 __FreeBSDMachineArch=armv7
__IllumosArch=arm7 __IllumosArch=arm7
__HaikuArch=arm
__QEMUArch=arm __QEMUArch=arm
__UbuntuArch=armhf __UbuntuArch=armhf
__UbuntuRepo="http://ports.ubuntu.com/" __UbuntuRepo="http://ports.ubuntu.com/"
@ -70,7 +71,7 @@ __AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev" __AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev" __AlpinePackages+=" zlib-dev"
__FreeBSDBase="12.3-RELEASE" __FreeBSDBase="12.4-RELEASE"
__FreeBSDPkg="1.17.0" __FreeBSDPkg="1.17.0"
__FreeBSDABI="12" __FreeBSDABI="12"
__FreeBSDPackages="libunwind" __FreeBSDPackages="libunwind"
@ -85,8 +86,12 @@ __IllumosPackages+=" mit-krb5"
__IllumosPackages+=" openssl" __IllumosPackages+=" openssl"
__IllumosPackages+=" zlib" __IllumosPackages+=" zlib"
__HaikuPackages="gmp" __HaikuPackages="gcc_syslibs"
__HaikuPackages+=" gcc_syslibs_devel"
__HaikuPackages+=" gmp"
__HaikuPackages+=" gmp_devel" __HaikuPackages+=" gmp_devel"
__HaikuPackages+=" icu66"
__HaikuPackages+=" icu66_devel"
__HaikuPackages+=" krb5" __HaikuPackages+=" krb5"
__HaikuPackages+=" krb5_devel" __HaikuPackages+=" krb5_devel"
__HaikuPackages+=" libiconv" __HaikuPackages+=" libiconv"
@ -95,6 +100,10 @@ __HaikuPackages+=" llvm12_libunwind"
__HaikuPackages+=" llvm12_libunwind_devel" __HaikuPackages+=" llvm12_libunwind_devel"
__HaikuPackages+=" mpfr" __HaikuPackages+=" mpfr"
__HaikuPackages+=" mpfr_devel" __HaikuPackages+=" mpfr_devel"
__HaikuPackages+=" openssl"
__HaikuPackages+=" openssl_devel"
__HaikuPackages+=" zlib"
__HaikuPackages+=" zlib_devel"
# ML.NET dependencies # ML.NET dependencies
__UbuntuPackages+=" libomp5" __UbuntuPackages+=" libomp5"
@ -210,6 +219,7 @@ while :; do
__FreeBSDArch=amd64 __FreeBSDArch=amd64
__FreeBSDMachineArch=amd64 __FreeBSDMachineArch=amd64
__illumosArch=x86_64 __illumosArch=x86_64
__HaikuArch=x86_64
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/" __UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
;; ;;
x86) x86)
@ -330,7 +340,7 @@ while :; do
;; ;;
freebsd13) freebsd13)
__CodeName=freebsd __CodeName=freebsd
__FreeBSDBase="13.0-RELEASE" __FreeBSDBase="13.2-RELEASE"
__FreeBSDABI="13" __FreeBSDABI="13"
__SkipUnmount=1 __SkipUnmount=1
;; ;;
@ -340,7 +350,6 @@ while :; do
;; ;;
haiku) haiku)
__CodeName=haiku __CodeName=haiku
__BuildArch=x64
__SkipUnmount=1 __SkipUnmount=1
;; ;;
--skipunmount) --skipunmount)
@ -559,67 +568,54 @@ elif [[ "$__CodeName" == "illumos" ]]; then
elif [[ "$__CodeName" == "haiku" ]]; then elif [[ "$__CodeName" == "haiku" ]]; then
JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"} JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
echo "Building Haiku sysroot for x86_64" echo "Building Haiku sysroot for $__HaikuArch"
mkdir -p "$__RootfsDir/tmp" mkdir -p "$__RootfsDir/tmp"
cd "$__RootfsDir/tmp" pushd "$__RootfsDir/tmp"
git clone -b hrev56235 https://review.haiku-os.org/haiku
git clone -b btrev43195 https://review.haiku-os.org/buildtools mkdir "$__RootfsDir/tmp/download"
cd "$__RootfsDir/tmp/buildtools" && git checkout 7487388f5110021d400b9f3b88e1a7f310dc066d
echo "Downloading Haiku package tool"
# Fetch some unmerged patches git clone https://github.com/haiku/haiku-toolchains-ubuntu --depth 1 $__RootfsDir/tmp/script
cd "$__RootfsDir/tmp/haiku" wget -O "$__RootfsDir/tmp/download/hosttools.zip" $($__RootfsDir/tmp/script/fetch.sh --hosttools)
## Add development build profile (slimmer than nightly) unzip -o "$__RootfsDir/tmp/download/hosttools.zip" -d "$__RootfsDir/tmp/bin"
git fetch origin refs/changes/64/4164/1 && git -c commit.gpgsign=false cherry-pick FETCH_HEAD
DepotBaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg"
# Build jam HpkgBaseUrl="https://eu.hpkg.haiku-os.org/haiku/master/$__HaikuArch/current"
cd "$__RootfsDir/tmp/buildtools/jam"
make # Download Haiku packages
echo "Downloading Haiku packages"
# Configure cross tools
echo "Building cross-compiler"
mkdir -p "$__RootfsDir/generated"
cd "$__RootfsDir/generated"
"$__RootfsDir/tmp/haiku/configure" -j"$JOBS" --sysroot "$__RootfsDir" --cross-tools-source "$__RootfsDir/tmp/buildtools" --build-cross-tools x86_64
# Build Haiku packages
echo "Building Haiku"
echo 'HAIKU_BUILD_PROFILE = "development-raw" ;' > UserProfileConfig
"$__RootfsDir/tmp/buildtools/jam/jam0" -j"$JOBS" -q '<build>package' '<repository>Haiku'
BaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg"
# Download additional packages
echo "Downloading additional required packages"
read -ra array <<<"$__HaikuPackages" read -ra array <<<"$__HaikuPackages"
for package in "${array[@]}"; do for package in "${array[@]}"; do
echo "Downloading $package..." echo "Downloading $package..."
# API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60 # API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60
# The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598 # The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598
hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_x86_64","versionType":"LATEST","naturalLanguageCode":"en"}' \ hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_'$__HaikuArch'","versionType":"LATEST","naturalLanguageCode":"en"}' \
--header='Content-Type:application/json' "$BaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')" --header='Content-Type:application/json' "$DepotBaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')"
wget -P "$__RootfsDir/generated/download" "$hpkgDownloadUrl" wget -P "$__RootfsDir/tmp/download" "$hpkgDownloadUrl"
done
for package in haiku haiku_devel; do
echo "Downloading $package..."
hpkgVersion="$(wget -qO- $HpkgBaseUrl | sed -n 's/^.*version: "\([^"]*\)".*$/\1/p')"
wget -P "$__RootfsDir/tmp/download" "$HpkgBaseUrl/packages/$package-$hpkgVersion-1-$__HaikuArch.hpkg"
done done
# Setup the sysroot # Set up the sysroot
echo "Setting up sysroot and extracting needed packages" echo "Setting up sysroot and extracting required packages"
mkdir -p "$__RootfsDir/boot/system" mkdir -p "$__RootfsDir/boot/system"
for file in "$__RootfsDir/generated/objects/haiku/x86_64/packaging/packages/"*.hpkg; do for file in "$__RootfsDir/tmp/download/"*.hpkg; do
"$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file" echo "Extracting $file..."
done LD_LIBRARY_PATH="$__RootfsDir/tmp/bin" "$__RootfsDir/tmp/bin/package" extract -C "$__RootfsDir/boot/system" "$file"
for file in "$__RootfsDir/generated/download/"*.hpkg; do
"$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file"
done done
# Download buildtools
echo "Downloading Haiku buildtools"
wget -O "$__RootfsDir/tmp/download/buildtools.zip" $($__RootfsDir/tmp/script/fetch.sh --buildtools --arch=$__HaikuArch)
unzip -o "$__RootfsDir/tmp/download/buildtools.zip" -d "$__RootfsDir"
# Cleaning up temporary files # Cleaning up temporary files
echo "Cleaning up temporary files" echo "Cleaning up temporary files"
popd
rm -rf "$__RootfsDir/tmp" rm -rf "$__RootfsDir/tmp"
for name in "$__RootfsDir/generated/"*; do
if [[ "$name" =~ "cross-tools-" ]]; then
: # Keep the cross-compiler
else
rm -rf "$name"
fi
done
elif [[ -n "$__CodeName" ]]; then elif [[ -n "$__CodeName" ]]; then
if [[ "$__SkipSigCheck" == "0" ]]; then if [[ "$__SkipSigCheck" == "0" ]]; then

49
eng/common/cross/toolchain.cmake

@ -6,6 +6,7 @@ unset(FREEBSD)
unset(ILLUMOS) unset(ILLUMOS)
unset(ANDROID) unset(ANDROID)
unset(TIZEN) unset(TIZEN)
unset(HAIKU)
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}) set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
@ -16,6 +17,7 @@ elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc)
set(ILLUMOS 1) set(ILLUMOS 1)
elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h) elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h)
set(CMAKE_SYSTEM_NAME Haiku) set(CMAKE_SYSTEM_NAME Haiku)
set(HAIKU 1)
else() else()
set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_NAME Linux)
set(LINUX 1) set(LINUX 1)
@ -67,16 +69,30 @@ elseif(TARGET_ARCH_NAME STREQUAL "armv6")
endif() endif()
elseif(TARGET_ARCH_NAME STREQUAL "ppc64le") elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
set(CMAKE_SYSTEM_PROCESSOR ppc64le) set(CMAKE_SYSTEM_PROCESSOR ppc64le)
set(TOOLCHAIN "powerpc64le-linux-gnu") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/powerpc64le-alpine-linux-musl)
set(TOOLCHAIN "powerpc64le-alpine-linux-musl")
else()
set(TOOLCHAIN "powerpc64le-linux-gnu")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "riscv64") elseif(TARGET_ARCH_NAME STREQUAL "riscv64")
set(CMAKE_SYSTEM_PROCESSOR riscv64) set(CMAKE_SYSTEM_PROCESSOR riscv64)
set(TOOLCHAIN "riscv64-linux-gnu") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/riscv64-alpine-linux-musl)
set(TOOLCHAIN "riscv64-alpine-linux-musl")
else()
set(TOOLCHAIN "riscv64-linux-gnu")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "s390x") elseif(TARGET_ARCH_NAME STREQUAL "s390x")
set(CMAKE_SYSTEM_PROCESSOR s390x) set(CMAKE_SYSTEM_PROCESSOR s390x)
set(TOOLCHAIN "s390x-linux-gnu") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/s390x-alpine-linux-musl)
set(TOOLCHAIN "s390x-alpine-linux-musl")
else()
set(TOOLCHAIN "s390x-linux-gnu")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "x64") elseif(TARGET_ARCH_NAME STREQUAL "x64")
set(CMAKE_SYSTEM_PROCESSOR x86_64) set(CMAKE_SYSTEM_PROCESSOR x86_64)
if(LINUX) if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/x86_64-alpine-linux-musl)
set(TOOLCHAIN "x86_64-alpine-linux-musl")
elseif(LINUX)
set(TOOLCHAIN "x86_64-linux-gnu") set(TOOLCHAIN "x86_64-linux-gnu")
if(TIZEN) if(TIZEN)
set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0")
@ -86,11 +102,15 @@ elseif(TARGET_ARCH_NAME STREQUAL "x64")
elseif(ILLUMOS) elseif(ILLUMOS)
set(TOOLCHAIN "x86_64-illumos") set(TOOLCHAIN "x86_64-illumos")
elseif(HAIKU) elseif(HAIKU)
set(TOOLCHAIN "x64_64-unknown-haiku") set(TOOLCHAIN "x86_64-unknown-haiku")
endif() endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86") elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(CMAKE_SYSTEM_PROCESSOR i686) set(CMAKE_SYSTEM_PROCESSOR i686)
set(TOOLCHAIN "i686-linux-gnu") if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
set(TOOLCHAIN "i586-alpine-linux-musl")
else()
set(TOOLCHAIN "i686-linux-gnu")
endif()
if(TIZEN) if(TIZEN)
set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0")
endif() endif()
@ -196,10 +216,8 @@ elseif(HAIKU)
return() return()
endif() endif()
set(SEARCH_PATH "${CROSS_ROOTFS}/generated/cross-tools-x86_64/bin")
find_program(EXEC_LOCATION_${exec} find_program(EXEC_LOCATION_${exec}
PATHS ${SEARCH_PATH} PATHS "${CROSS_ROOTFS}/cross-tools-x86_64/bin"
NAMES NAMES
"${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}" "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
"${TOOLSET_PREFIX}${exec}") "${TOOLSET_PREFIX}${exec}")
@ -264,8 +282,11 @@ elseif(TARGET_ARCH_NAME MATCHES "^(arm64|x64)$")
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}") add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
endif() endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86") elseif(TARGET_ARCH_NAME STREQUAL "x86")
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
add_toolchain_linker_flag("--target=${TOOLCHAIN}")
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/gcc/${TOOLCHAIN}")
endif()
add_toolchain_linker_flag(-m32) add_toolchain_linker_flag(-m32)
if(TIZEN) if(TIZEN)
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}") add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
@ -275,11 +296,14 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
elseif(ILLUMOS) elseif(ILLUMOS)
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib") add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib")
elseif(HAIKU)
add_toolchain_linker_flag("-lnetwork")
add_toolchain_linker_flag("-lroot")
endif() endif()
# Specify compile options # Specify compile options
if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU) if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x|x64|x86)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU)
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
@ -305,6 +329,9 @@ if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
add_compile_options(-mfloat-abi=softfp) add_compile_options(-mfloat-abi=softfp)
endif() endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86") elseif(TARGET_ARCH_NAME STREQUAL "x86")
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/i586-alpine-linux-musl)
add_compile_options(--target=${TOOLCHAIN})
endif()
add_compile_options(-m32) add_compile_options(-m32)
add_compile_options(-Wno-error=unused-command-line-argument) add_compile_options(-Wno-error=unused-command-line-argument)
endif() endif()

2
eng/common/native/init-compiler.sh

@ -64,7 +64,7 @@ if [ -z "$CLR_CC" ]; then
if [ -z "$majorVersion" ]; then if [ -z "$majorVersion" ]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero. # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5" if [ "$compiler" = "clang" ]; then versions="16 15 14 13 12 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5"
elif [ "$compiler" = "gcc" ]; then versions="12 11 10 9 8 7 6 5 4.9"; fi elif [ "$compiler" = "gcc" ]; then versions="13 12 11 10 9 8 7 6 5 4.9"; fi
for version in $versions; do for version in $versions; do
_major="${version%%.*}" _major="${version%%.*}"

17
eng/common/templates/job/job.yml

@ -25,7 +25,7 @@ parameters:
enablePublishTestResults: false enablePublishTestResults: false
enablePublishUsingPipelines: false enablePublishUsingPipelines: false
enableBuildRetry: false enableBuildRetry: false
disableComponentGovernance: false disableComponentGovernance: ''
componentGovernanceIgnoreDirectories: '' componentGovernanceIgnoreDirectories: ''
mergeTestResults: false mergeTestResults: false
testRunTitle: '' testRunTitle: ''
@ -155,11 +155,16 @@ jobs:
uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }} uploadRichNavArtifacts: ${{ coalesce(parameters.richCodeNavigationUploadArtifacts, false) }}
continueOnError: true continueOnError: true
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), ne(parameters.disableComponentGovernance, 'true')) }}: - template: /eng/common/templates/steps/component-governance.yml
- task: ComponentGovernanceComponentDetection@0 parameters:
continueOnError: true ${{ if eq(parameters.disableComponentGovernance, '') }}:
inputs: ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(parameters.runAsPublic, 'false'), or(startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/dotnet/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/microsoft/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))) }}:
ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }} disableComponentGovernance: false
${{ else }}:
disableComponentGovernance: true
${{ else }}:
disableComponentGovernance: ${{ parameters.disableComponentGovernance }}
componentGovernanceIgnoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}
- ${{ if eq(parameters.enableMicrobuild, 'true') }}: - ${{ if eq(parameters.enableMicrobuild, 'true') }}:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: - ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:

13
eng/common/templates/steps/component-governance.yml

@ -0,0 +1,13 @@
parameters:
disableComponentGovernance: false
componentGovernanceIgnoreDirectories: ''
steps:
- ${{ if eq(parameters.disableComponentGovernance, 'true') }}:
- script: "echo ##vso[task.setvariable variable=skipComponentGovernanceDetection]true"
displayName: Set skipComponentGovernanceDetection variable
- ${{ if ne(parameters.disableComponentGovernance, 'true') }}:
- task: ComponentGovernanceComponentDetection@0
continueOnError: true
inputs:
ignoreDirectories: ${{ parameters.componentGovernanceIgnoreDirectories }}

28
eng/common/tools.ps1

@ -287,6 +287,25 @@ function InstallDotNet([string] $dotnetRoot,
[string] $runtimeSourceFeedKey = '', [string] $runtimeSourceFeedKey = '',
[switch] $noPath) { [switch] $noPath) {
$dotnetVersionLabel = "'sdk v$version'"
if ($runtime -ne '' -and $runtime -ne 'sdk') {
$runtimePath = $dotnetRoot
$runtimePath = $runtimePath + "\shared"
if ($runtime -eq "dotnet") { $runtimePath = $runtimePath + "\Microsoft.NETCore.App" }
if ($runtime -eq "aspnetcore") { $runtimePath = $runtimePath + "\Microsoft.AspNetCore.App" }
if ($runtime -eq "windowsdesktop") { $runtimePath = $runtimePath + "\Microsoft.WindowsDesktop.App" }
$runtimePath = $runtimePath + "\" + $version
$dotnetVersionLabel = "runtime toolset '$runtime/$architecture v$version'"
if (Test-Path $runtimePath) {
Write-Host " Runtime toolset '$runtime/$architecture v$version' already installed."
$installSuccess = $true
Exit
}
}
$installScript = GetDotNetInstallScript $dotnetRoot $installScript = GetDotNetInstallScript $dotnetRoot
$installParameters = @{ $installParameters = @{
Version = $version Version = $version
@ -323,18 +342,18 @@ function InstallDotNet([string] $dotnetRoot,
} else { } else {
$location = "public location"; $location = "public location";
} }
Write-Host "Attempting to install dotnet from $location." Write-Host " Attempting to install $dotnetVersionLabel from $location."
try { try {
& $installScript @variation & $installScript @variation
$installSuccess = $true $installSuccess = $true
break break
} }
catch { catch {
Write-Host "Failed to install dotnet from $location." Write-Host " Failed to install $dotnetVersionLabel from $location."
} }
} }
if (-not $installSuccess) { if (-not $installSuccess) {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet from any of the specified locations." Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install $dotnetVersionLabel from any of the specified locations."
ExitWithExitCode 1 ExitWithExitCode 1
} }
} }
@ -399,7 +418,8 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
# Locate Visual Studio installation or download x-copy msbuild. # Locate Visual Studio installation or download x-copy msbuild.
$vsInfo = LocateVisualStudio $vsRequirements $vsInfo = LocateVisualStudio $vsRequirements
if ($vsInfo -ne $null) { if ($vsInfo -ne $null) {
$vsInstallDir = $vsInfo.installationPath # Ensure vsInstallDir has a trailing slash
$vsInstallDir = Join-Path $vsInfo.installationPath "\"
$vsMajorVersion = $vsInfo.installationVersion.Split('.')[0] $vsMajorVersion = $vsInfo.installationVersion.Split('.')[0]
InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion InitializeVisualStudioEnvironmentVariables $vsInstallDir $vsMajorVersion

35
eng/common/tools.sh

@ -184,6 +184,35 @@ function InstallDotNetSdk {
function InstallDotNet { function InstallDotNet {
local root=$1 local root=$1
local version=$2 local version=$2
local runtime=$4
local dotnetVersionLabel="'$runtime v$version'"
if [[ -n "${4:-}" ]] && [ "$4" != 'sdk' ]; then
runtimePath="$root"
runtimePath="$runtimePath/shared"
case "$runtime" in
dotnet)
runtimePath="$runtimePath/Microsoft.NETCore.App"
;;
aspnetcore)
runtimePath="$runtimePath/Microsoft.AspNetCore.App"
;;
windowsdesktop)
runtimePath="$runtimePath/Microsoft.WindowsDesktop.App"
;;
*)
;;
esac
runtimePath="$runtimePath/$version"
dotnetVersionLabel="runtime toolset '$runtime/$architecture v$version'"
if [ -d "$runtimePath" ]; then
echo " Runtime toolset '$runtime/$architecture v$version' already installed."
local installSuccess=1
return
fi
fi
GetDotNetInstallScript "$root" GetDotNetInstallScript "$root"
local install_script=$_GetDotNetInstallScript local install_script=$_GetDotNetInstallScript
@ -228,17 +257,17 @@ function InstallDotNet {
for variationName in "${variations[@]}"; do for variationName in "${variations[@]}"; do
local name="$variationName[@]" local name="$variationName[@]"
local variation=("${!name}") local variation=("${!name}")
echo "Attempting to install dotnet from $variationName." echo " Attempting to install $dotnetVersionLabel from $variationName."
bash "$install_script" "${variation[@]}" && installSuccess=1 bash "$install_script" "${variation[@]}" && installSuccess=1
if [[ "$installSuccess" -eq 1 ]]; then if [[ "$installSuccess" -eq 1 ]]; then
break break
fi fi
echo "Failed to install dotnet from $variationName." echo " Failed to install $dotnetVersionLabel from $variationName."
done done
if [[ "$installSuccess" -eq 0 ]]; then if [[ "$installSuccess" -eq 0 ]]; then
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from any of the specified locations." Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install $dotnetVersionLabel from any of the specified locations."
ExitWithExitCode 1 ExitWithExitCode 1
fi fi
} }

4
global.json

@ -3,7 +3,7 @@
"allowPrerelease": true "allowPrerelease": true
}, },
"tools": { "tools": {
"dotnet": "8.0.100-preview.1.23115.2", "dotnet": "8.0.100-preview.3.23178.7",
"runtimes": { "runtimes": {
"dotnet": [ "dotnet": [
"6.0.0" "6.0.0"
@ -14,6 +14,6 @@
} }
}, },
"msbuild-sdks": { "msbuild-sdks": {
"Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23177.4" "Microsoft.DotNet.Arcade.Sdk": "8.0.0-beta.23265.1"
} }
} }

12
samples/apps-with-core-angular/MoviesApp/package-lock.json

@ -12366,9 +12366,9 @@
"dev": true "dev": true
}, },
"node_modules/socket.io-parser": { "node_modules/socket.io-parser": {
"version": "4.2.1", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz",
"integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@socket.io/component-emitter": "~3.1.0", "@socket.io/component-emitter": "~3.1.0",
@ -23025,9 +23025,9 @@
"dev": true "dev": true
}, },
"socket.io-parser": { "socket.io-parser": {
"version": "4.2.1", "version": "4.2.3",
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz", "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.3.tgz",
"integrity": "sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g==", "integrity": "sha512-JMafRntWVO2DCJimKsRTh/wnqVvO4hrfwOqtO7f+uzwsQMuxO6VwImtYxaQ+ieoyshWOTJyV0fA21lccEXRPpQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@socket.io/component-emitter": "~3.1.0", "@socket.io/component-emitter": "~3.1.0",

Loading…
Cancel
Save