Skip to content

Commit

Permalink
Revert "Delete old unused pipelines and files (#1513)" (#1588)
Browse files Browse the repository at this point in the history
This reverts commit 3d3269c.
  • Loading branch information
kevingosse authored Jul 9, 2021
1 parent c857ed5 commit 9bdd9d7
Show file tree
Hide file tree
Showing 36 changed files with 3,184 additions and 32 deletions.
79 changes: 79 additions & 0 deletions .azure-pipelines/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
trigger: none
pr: none

variables:
buildConfiguration: release
dotnetCoreSdkVersion: 5.0.103
ddApiKey: $(DD_API_KEY)
publishOutput: $(Build.SourcesDirectory)/src/bin/managed-publish

# Declare the datadog agent as a resource to be used as a pipeline service
resources:
containers:
- container: dd_agent
image: datadog/agent
ports:
- 8126:8126
env:
DD_API_KEY: $(ddApiKey)
DD_INSIDE_CI: true

stages:
- stage: build
jobs:

#### Windows

- job: Windows
pool: Benchmarks

workspace:
clean: all

# Enable the Datadog Agent service for this job
services:
dd_agent: dd_agent
variables:
tracerHomeName: windows-tracer-home
tracerHome: $(System.DefaultWorkingDirectory)/src/bin/$(tracerHomeName)
msiHome: $(System.DefaultWorkingDirectory)/src/bin/msi
nuget_packages: $(Pipeline.Workspace)/.nuget/packages

steps:

- task: UseDotNet@2
displayName: install dotnet core sdk
inputs:
packageType: sdk
version: $(dotnetCoreSdkVersion)

- task: NuGetToolInstaller@1
displayName: install nuget

- task: DotNetCoreCLI@2
displayName: dotnet restore
inputs:
command: restore
projects: src/**/*.csproj

# native projects must be restored with nuget.exe
- task: NuGetCommand@2
displayName: nuget restore native
inputs:
restoreSolution: Datadog.Trace.Native.sln
verbosityRestore: Normal

- task: DotNetCoreCLI@2
displayName: Benchmarks
inputs:
command: 'run'
projects: '$(System.DefaultWorkingDirectory)/test/benchmarks/Benchmarks.Trace/Benchmarks.Trace.csproj'
arguments: '-c Release -f netcoreapp3.1 -- -r net472 netcoreapp3.1 -m -f * --iterationTime 2000'
env:
DD_ENV: CI
DD_SERVICE: dd-trace-dotnet

- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'Start-Sleep -s 120'
190 changes: 190 additions & 0 deletions .azure-pipelines/crank.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
trigger: none
pr: none

jobs:

- job: windows_profiler
pool:
vmImage: windows-2019

steps:

- task: UseDotNet@2
displayName: install dotnet core runtime 3.1
inputs:
packageType: runtime
version: 3.1.x

- task: UseDotNet@2
displayName: install dotnet core sdk 5.0.103
inputs:
packageType: sdk
version: 5.0.103

- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
command: build
configuration: Release
arguments: /nowarn:netsdk1138
projects: |
src/Datadog.Trace.ClrProfiler.Managed.Loader/Datadog.Trace.ClrProfiler.Managed.Loader.csproj
sample-libs/**/Samples.ExampleLibrary*.csproj
- task: NuGetToolInstaller@1
displayName: install nuget

- task: NuGetCommand@2
displayName: nuget restore
inputs:
restoreSolution: Datadog.Trace.Native.sln
verbosityRestore: Normal

- task: MSBuild@1
displayName: msbuild
inputs:
solution: Datadog.Trace.proj
platform: x64
configuration: Release
msbuildArguments: /t:BuildCpp
maximumCpuCount: true

- publish: $(System.DefaultWorkingDirectory)/src/Datadog.Trace.ClrProfiler.Native/bin/Release/x64
artifact: windows-native


- job: linux_profiler
pool:
vmImage: ubuntu-20.04
steps:

- task: UseDotNet@2
displayName: install dotnet core runtime 3.1
inputs:
packageType: runtime
version: 3.1.x

- task: UseDotNet@2
displayName: install dotnet core sdk 5.0
inputs:
packageType: sdk
version: 5.0.x

- task: DotNetCoreCLI@2
displayName: dotnet build
inputs:
command: build
configuration: Release
arguments: /nowarn:netsdk1138
projects: |
src/Datadog.Trace.ClrProfiler.Managed.Loader/Datadog.Trace.ClrProfiler.Managed.Loader.csproj
- script: |
sudo apt-get update
sudo apt-get install -y llvm clang
sudo apt-get remove -y cmake
curl -L -o /tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v3.19.8/cmake-3.19.8-Linux-x86_64.sh
sudo sh /tmp/cmake.sh --prefix=/usr/local --exclude-subdir --skip-license
displayName: install_dependencies
- script: |
cd ./src/Datadog.Trace.ClrProfiler.Native
CXX=clang++ CC=clang cmake . -DCMAKE_BUILD_TYPE=Release
make
displayName: build_profiler
- publish: $(System.DefaultWorkingDirectory)/src/Datadog.Trace.ClrProfiler.Native/bin
artifact: linux-native


- job: linux_arm64_profiler
pool: Arm64
workspace:
clean: all

steps:

- task: DotNetCoreCLI@2
displayName: dotnet build Datadog.Trace.ClrProfiler.Managed.Loader
inputs:
command: build
configuration: Release
arguments: /nowarn:netsdk1138
projects: |
src/Datadog.Trace.ClrProfiler.Managed.Loader/Datadog.Trace.ClrProfiler.Managed.Loader.csproj
- task: DotNetCoreCLI@2
displayName: dotnet publish Datadog.Trace.ClrProfiler.Managed 2.0
inputs:
command: publish
publishWebProjects: false
modifyOutputPath: false
zipAfterPublish: false
projects: src/Datadog.Trace.ClrProfiler.Managed/Datadog.Trace.ClrProfiler.Managed.csproj
arguments: --configuration Release --framework netstandard2.0 --output $(System.DefaultWorkingDirectory)/src/bin/managed-publish/netstandard2.0

- task: DotNetCoreCLI@2
displayName: dotnet publish Datadog.Trace.ClrProfiler.Managed 3.1
inputs:
command: publish
publishWebProjects: false
modifyOutputPath: false
zipAfterPublish: false
projects: src/Datadog.Trace.ClrProfiler.Managed/Datadog.Trace.ClrProfiler.Managed.csproj
arguments: --configuration Release --framework netcoreapp3.1 --output $(System.DefaultWorkingDirectory)/src/bin/managed-publish/netcoreapp3.1

- task: DockerCompose@0
displayName: docker-compose run Profiler
inputs:
containerregistrytype: Container Registry
dockerComposeCommand: run -e buildConfiguration=Release Profiler

- publish: $(System.DefaultWorkingDirectory)/src/Datadog.Trace.ClrProfiler.Native/bin/Release/x64
artifact: linux-native-arm64



- job: crank
pool: Throughput
workspace:
clean: all
dependsOn:
- linux_arm64_profiler
- linux_profiler
- windows_profiler
condition: succeeded()

steps:
- download: current
artifact: linux-native

- task: CopyFiles@2
inputs:
sourceFolder: $(Pipeline.Workspace)/linux-native
targetFolder: $(System.DefaultWorkingDirectory)/


- download: current
artifact: windows-native

- task: CopyFiles@2
inputs:
sourceFolder: $(Pipeline.Workspace)/windows-native
targetFolder: $(System.DefaultWorkingDirectory)/


- download: current
artifact: linux-native-arm64

- task: CopyFiles@2
inputs:
sourceFolder: $(Pipeline.Workspace)/linux-native-arm64
targetFolder: $(System.DefaultWorkingDirectory)/arm64


- script: |
cd ./build/crank
chmod +x ./run.sh
./run.sh
env:
DD_SERVICE: dd-trace-dotnet
Loading

0 comments on commit 9bdd9d7

Please sign in to comment.