version: 0.2 env: variables: DOTNET_CLI_TELEMETRY_OPTOUT: 1 phases: install: runtime-versions: dotnet: 6 commands: # Fixes for cloning aws net sdk and getting 'filename too long' errors # LongPathsEnabled Reference: # https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#enable-long-paths-in-windows-10-version-1607-and-later - '& Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name LongPathsEnabled -Value 1' - git config --system core.longpaths true build: commands: ############################################################################################################ # Telemetry Events Generator ############################################################################################################ # Explicitly restore the .NET Framework projects or CodeBuild produces errors running dotnet build on the .sln :( - dotnet -d restore .\telemetry\csharp\AwsToolkit.Telemetry.Events\AwsToolkit.Telemetry.Events.csproj - dotnet -d restore .\telemetry\csharp\AwsToolkit.Telemetry.Events.Tests\AwsToolkit.Telemetry.Events.Tests.csproj # Restore everything (else) - dotnet -d restore ./telemetry/csharp/AwsToolkit.Telemetry.sln # Build - dotnet build -c Release ./telemetry/csharp/AwsToolkit.Telemetry.sln # Test - dotnet test -c Release ./telemetry/csharp/AwsToolkit.Telemetry.sln --logger trx --results-directory ./.testresults ############################################################################################################ # SDK Telemetry Client ############################################################################################################ # Generate the SDK Telemetry Client Source - dotnet msbuild .\telemetry\csharp\TelemetryClient.proj # Restore and Build the SDK Telemetry Client - dotnet -d restore ./telemetry/csharp/AwsToolkit.Telemetry.SDK/AwsToolkit.Telemetry.SDK.csproj - dotnet -d restore ./telemetry/csharp/AwsToolkit.Telemetry.SDK.sln - dotnet build -c Release ./telemetry/csharp/AwsToolkit.Telemetry.SDK.sln ############################################################################################################ # Telemetry Events Datatypes ############################################################################################################ # Generate the NuGet package for supported datatypes - dotnet msbuild -property:Configuration=Release ./telemetry/csharp/TelemetryPackage.proj reports: DotnetTestExamples: file-format: VisualStudioTrx files: - '**/*' base-directory: './.testresults'