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