-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix helix matrix with built in sdk support #24287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f905c18
68f4fa3
0fa13e5
6635bf3
4609539
05b7268
1f1f00b
e3aa0bf
feb0316
cf5a374
35bdad3
f61a254
837dcfe
1861c56
bd1377f
ced0001
320566a
61f6773
6e1e7ae
aa10af4
594789b
f99dd84
b7374cf
c9d029b
4a9373f
d908f12
47aff8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,25 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| dotnet_sdk_version="$2" | ||
| dotnet_runtime_version="$3" | ||
| dotnet_runtime_version="$2" | ||
|
|
||
| RESET="\033[0m" | ||
| RED="\033[0;31m" | ||
| YELLOW="\033[0;33m" | ||
| MAGENTA="\033[0;95m" | ||
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
|
||
| # Ensures every invocation of dotnet apps uses the same dotnet.exe | ||
| # Add $random to path to ensure tests don't expect dotnet to be in a particular path | ||
| export DOTNET_ROOT="$DIR/.dotnet$RANDOM" | ||
| export DOTNET_ROOT="$HELIX_WORKITEM_ROOT/.dotnet$RANDOM" | ||
|
|
||
| # Ensure dotnet comes first on PATH | ||
| export PATH="$DOTNET_ROOT:$PATH:$DIR/node/bin" | ||
| export PATH="$DOTNET_ROOT:$PATH:$HELIX_WORKITEM_ROOT/node/bin" | ||
|
|
||
| # Prevent fallback to global .NET locations. This ensures our tests use the shared frameworks we specify and don't rollforward to something else that might be installed on the machine | ||
| export DOTNET_MULTILEVEL_LOOKUP=0 | ||
|
|
||
| # Avoid contaminating userprofiles | ||
| # Add $random to path to ensure tests don't expect home to be in a particular path | ||
| export DOTNET_CLI_HOME="$DIR/.home$RANDOM" | ||
| export DOTNET_CLI_HOME="$HELIX_WORKITEM_ROOT/.home$RANDOM" | ||
|
|
||
| export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
|
|
||
|
|
@@ -30,6 +28,17 @@ RED="\033[0;31m" | |
| YELLOW="\033[0;33m" | ||
| MAGENTA="\033[0;95m" | ||
|
|
||
| echo "Ensure $DOTNET_ROOT/shared directories exist..." | ||
| mkdir -p $DOTNET_ROOT/shared/Microsoft.AspNetCore.App | ||
| mkdir -p $DOTNET_ROOT/shared/Microsoft.NETCore.App | ||
|
|
||
| echo "Symlink sdk: ln -s $HELIX_CORRELATION_PAYLOAD/dotnet/sdk $DOTNET_ROOT/sdk" | ||
| ln -s $HELIX_CORRELATION_PAYLOAD/dotnet/sdk $DOTNET_ROOT/sdk | ||
| echo "Symlink : ln -s $HELIX_CORRELATION_PAYLOAD/dotnet/shared/Microsoft.AspNetCore.App/* $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/" | ||
| ln -s $HELIX_CORRELATION_PAYLOAD/dotnet/shared/Microsoft.AspNetCore.App/* $DOTNET_ROOT/shared/Microsoft.AspNetCore.App/ | ||
| echo "Symlink : ln -s $HELIX_CORRELATION_PAYLOAD/dotnet/shared/Microsoft.NETCore.App/* $DOTNET_ROOT/shared/Microsoft.NETCore.App/" | ||
| ln -s $HELIX_CORRELATION_PAYLOAD/dotnet/shared/Microsoft.NETCore.App/* $DOTNET_ROOT/shared/Microsoft.NETCore.App/ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curious: What about dotnet/host/, dotnet/packs/, and dotnet/templates/❔ Did tests work because they're not found using
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I started with symlinking everything, but it didn't look like we needed all of the other stuff, so I got rid of it... I figure its better to be explicit so we know exactly what we depend on |
||
|
|
||
| curl -o dotnet-install.sh -sSL https://dot.net/v1/dotnet-install.sh | ||
| if [ $? -ne 0 ]; then | ||
| download_retries=3 | ||
|
|
@@ -47,20 +56,6 @@ fi | |
| # Call "sync" between "chmod" and execution to prevent "text file busy" error in Docker (aufs) | ||
| chmod +x "dotnet-install.sh"; sync | ||
|
|
||
| ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" | ||
| if [ $? -ne 0 ]; then | ||
| sdk_retries=3 | ||
| while [ $sdk_retries -gt 0 ]; do | ||
| ./dotnet-install.sh --version $dotnet_sdk_version --install-dir "$DOTNET_ROOT" | ||
| if [ $? -ne 0 ]; then | ||
| let sdk_retries=sdk_retries-1 | ||
| echo -e "${YELLOW}Failed to install .NET Core SDK $version. Retries left: $sdk_retries.${RESET}" | ||
| else | ||
| sdk_retries=0 | ||
| fi | ||
| done | ||
| fi | ||
|
|
||
| ./dotnet-install.sh --runtime dotnet --version $dotnet_runtime_version --install-dir "$DOTNET_ROOT" | ||
| if [ $? -ne 0 ]; then | ||
| runtime_retries=3 | ||
|
|
@@ -85,11 +80,16 @@ fi | |
| # dontet-install.sh seems to affect the Linux filesystem and causes test flakiness unless we sync the filesystem before running tests | ||
| sync | ||
|
|
||
| ls -la $DOTNET_ROOT | ||
|
|
||
| $DOTNET_ROOT/dotnet --list-sdks | ||
| $DOTNET_ROOT/dotnet --list-runtimes | ||
|
|
||
| exit_code=0 | ||
| echo "Restore: $DOTNET_ROOT/dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources..." | ||
| $DOTNET_ROOT/dotnet restore RunTests/RunTests.csproj --source https://api.nuget.org/v3/index.json --ignore-failed-sources | ||
| echo "Running tests: $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 --helixTimeout ${10}..." | ||
| $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --sdk $2 --runtime $3 --queue $4 --arch $5 --quarantined $6 --ef $7 --aspnetruntime $8 --aspnetref $9 --helixTimeout ${10} | ||
| echo "Running tests: $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --runtime $2 --queue $3 --arch $4 --quarantined $5 --ef $6 --aspnetruntime $7 --aspnetref $8 --helixTimeout $9..." | ||
| $DOTNET_ROOT/dotnet run --project RunTests/RunTests.csproj -- --target $1 --runtime $2 --queue $3 --arch $4 --quarantined $5 --ef $6 --aspnetruntime $7 --aspnetref $8 --helixTimeout $9 | ||
| exit_code=$? | ||
| echo "Finished tests...exit_code=$exit_code" | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert