|
|
@ -15,7 +15,7 @@ fi |
|
|
|
# First, build protobuf C# tests under x86_64 docker image |
|
|
|
# First, build protobuf C# tests under x86_64 docker image |
|
|
|
# Tests are built "dotnet publish" because we want all the dependencies to the copied to the destination directory |
|
|
|
# Tests are built "dotnet publish" because we want all the dependencies to the copied to the destination directory |
|
|
|
# (we want to avoid references to ~/.nuget that won't be available in the subsequent docker run) |
|
|
|
# (we want to avoid references to ~/.nuget that won't be available in the subsequent docker run) |
|
|
|
CSHARP_BUILD_COMMAND="dotnet publish -c Release -f net50 csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj" |
|
|
|
CSHARP_BUILD_COMMAND="dotnet publish -c Release -f net60 csharp/src/Google.Protobuf.Test/Google.Protobuf.Test.csproj" |
|
|
|
docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:5.0.202-buster-slim bash -c "$CSHARP_BUILD_COMMAND" |
|
|
|
docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:5.0.202-buster-slim bash -c "$CSHARP_BUILD_COMMAND" |
|
|
|
|
|
|
|
|
|
|
|
# Use an actual aarch64 docker image to run protobuf C# tests with an emulator. "dotnet vstest" allows |
|
|
|
# Use an actual aarch64 docker image to run protobuf C# tests with an emulator. "dotnet vstest" allows |
|
|
@ -25,5 +25,5 @@ docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake- |
|
|
|
# running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user |
|
|
|
# running under current user's UID and GID. To be able to do that, we need to provide a home directory for the user |
|
|
|
# otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity, |
|
|
|
# otherwise the UID would be homeless under the docker container and pip install wouldn't work. For simplicity, |
|
|
|
# we just run map the user's home to a throwaway temporary directory |
|
|
|
# we just run map the user's home to a throwaway temporary directory |
|
|
|
CSHARP_TEST_COMMAND="dotnet vstest csharp/src/Google.Protobuf.Test/bin/Release/net50/publish/Google.Protobuf.Test.dll" |
|
|
|
CSHARP_TEST_COMMAND="dotnet vstest csharp/src/Google.Protobuf.Test/bin/Release/net60/publish/Google.Protobuf.Test.dll" |
|
|
|
docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:5.0.202-buster-slim-arm64v8 bash -c "$CSHARP_TEST_COMMAND" |
|
|
|
docker run $DOCKER_TTY_ARGS --rm --user "$(id -u):$(id -g)" -e "HOME=/home/fake-user" -e "DOTNET_CLI_TELEMETRY_OPTOUT=true" -e "DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true" -v "$(mktemp -d):/home/fake-user" -v "$(pwd)":/work -w /work mcr.microsoft.com/dotnet/sdk:5.0.202-buster-slim-arm64v8 bash -c "$CSHARP_TEST_COMMAND" |
|
|
|