xref: /aosp_15_r20/external/cronet/third_party/protobuf/csharp/buildall.sh (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker#!/bin/bash
2*6777b538SAndroid Build Coastguard Worker
3*6777b538SAndroid Build Coastguard WorkerCONFIG=Release
4*6777b538SAndroid Build Coastguard WorkerSRC=$(dirname $0)/src
5*6777b538SAndroid Build Coastguard Worker
6*6777b538SAndroid Build Coastguard Workerset -ex
7*6777b538SAndroid Build Coastguard Worker
8*6777b538SAndroid Build Coastguard Workerecho Building relevant projects.
9*6777b538SAndroid Build Coastguard Workerdotnet restore $SRC/Google.Protobuf.sln
10*6777b538SAndroid Build Coastguard Workerdotnet build -c $CONFIG $SRC/Google.Protobuf.sln
11*6777b538SAndroid Build Coastguard Worker
12*6777b538SAndroid Build Coastguard Workerecho Running tests.
13*6777b538SAndroid Build Coastguard Worker# Only test netcoreapp3.1, which uses the .NET Core runtime.
14*6777b538SAndroid Build Coastguard Worker# If we want to test the .NET 4.5 version separately, we could
15*6777b538SAndroid Build Coastguard Worker# run Mono explicitly. However, we don't have any differences between
16*6777b538SAndroid Build Coastguard Worker# the .NET 4.5 and netstandard2.1 assemblies.
17*6777b538SAndroid Build Coastguard Workerdotnet test -c $CONFIG -f netcoreapp3.1 $SRC/Google.Protobuf.Test/Google.Protobuf.Test.csproj
18