@@ -39,106 +39,28 @@ jobs:
39
39
runs-on : ubuntu-18.04
40
40
41
41
steps :
42
- - name : Install uuid-dev
43
- run : sudo apt-get install -y uuid-dev
44
-
45
42
- name : Clone dd-trace-dotnet repository
46
43
uses : actions/checkout@v2
47
44
48
- - name : Build Managed Loader
49
- run : dotnet build -c Release shared/src/managed-lib/ManagedLoader/Datadog.AutoInstrumentation.ManagedLoader.csproj
50
-
51
- - name : Build Managed Profiler Engine
52
- run : dotnet build -c Release profiler/src/ProfilerEngine/Datadog.Profiler.Managed/Datadog.Profiler.Managed.csproj
53
-
54
- - name : Build Native Profiler Engine and Tests
55
- run : |
56
- CXX=clang++ CC=clang cmake -S profiler -B __build
57
- cmake --build __build --config Release --parallel
58
-
59
- - name : Run Managed Unit tests
60
- shell : bash
61
- run : ./.github/scripts/run-managed-unit-tests.sh profiler/test Release
45
+ - uses : ./.github/actions/run-in-docker
46
+ name : Build Monitoring Home in Docker
47
+ with :
48
+ command : " Clean BuildTracerHome BuildNativeLoader BuildProfilerHome ZipMonitoringHome --TracerHome /project/shared/bin/monitoring-home"
62
49
63
50
- name : Run Native Unit tests
64
51
shell : bash
65
52
run : |
66
53
sudo mkdir /var/log/datadog
67
54
sudo chmod 777 /var/log/datadog
68
- cd __build
69
- ctest --output-on-failure
70
-
71
- - name : Prepare environment to run the application
72
- run : |
73
- echo "PROFILER_OUTPUT_DIR=$(realpath ./profiler)/_build" >> $GITHUB_ENV
55
+ sudo chmod +x ./profiler/_build/bin/Datadog.Profiler.Native.Tests/Datadog.Profiler.Native.Tests
56
+ ./profiler/_build/bin/Datadog.Profiler.Native.Tests/Datadog.Profiler.Native.Tests --gtest_output=xml
74
57
75
58
- name : Publish artifact
76
59
uses : actions/upload-artifact@v2
77
60
with :
78
61
if-no-files-found : error
79
- name : DDProf-Deploy.Linux.Release.x64
80
- path : ' ${{ env.PROFILER_OUTPUT_DIR }}/DDProf-Deploy'
81
- retention-days : 7
82
-
83
- test_linux_profiler_x64 :
84
- name : STests Linux Profiler (x64, Release)
85
- runs-on : ubuntu-latest
86
- needs : build_linux_release_x64
87
-
88
- steps :
89
- - name : Clone dd-trace-dotnet repository
90
- uses : actions/checkout@v2
91
-
92
- - name : Download profiler artifact
93
- uses : actions/download-artifact@v2
94
- with :
95
- name : DDProf-Deploy.Linux.Release.x64
96
- path : DDProf-Deploy
97
-
98
- - name : Build sample applications
99
- run : dotnet build -c Release profiler/src/Demos/Datadog.Demos.sln -p:Platform=x64
100
-
101
- - name : Prepare environment to run the application
102
- run : |
103
- # download and setup dotnet-dump
104
- mkdir tools
105
- curl -o tools/dotnet-dump -L https://aka.ms/dotnet-dump/linux-x64
106
- chmod +x tools/dotnet-dump
107
-
108
- echo "$(realpath .)/tools" >> $GITHUB_PATH
109
-
110
- #
111
- # set profiler deployment and test output dir folder path for the test
112
- #
113
- echo "DD_TESTING_PROFILER_FOLDER=$(realpath .)/DDProf-Deploy" >> $GITHUB_ENV
114
- # create
115
- tests_output_dir=$(realpath .)/tests_output
116
- mkdir $tests_output_dir
117
- echo "DD_TESTING_OUPUT_DIR=$tests_output_dir" >> $GITHUB_ENV
118
-
119
- - name : Run Integration tests
120
- env :
121
- DD_API_KEY : ' ${{ secrets.DD_API_KEY }}'
122
- run : |
123
- cd profiler/test/Datadog.Profiler.IntegrationTests &&
124
- LD_PRELOAD=${DD_TESTING_PROFILER_FOLDER}/Datadog.Linux.ApiWrapper.x64.so dotnet test -c Release -p:Platform=x64 --logger "trx" -- RunConfiguration.TreatNoTestsAsError=true
125
-
126
- - name : Generate tests report
127
- uses : dorny/test-reporter@v1
128
- if : ' ${{ always() }}'
129
- with :
130
- name : STests Linux x64 report
131
- path : profiler/test/Datadog.Profiler.IntegrationTests/TestResults/*.trx
132
- reporter : dotnet-trx
133
-
134
- - name : ' Publish Tests result, Logs and PProf files'
135
- uses : actions/upload-artifact@v2
136
- if : ' ${{ always() }}'
137
- with :
138
- if-no-files-found : error
139
- name : Tests_result_logs_and_pprofs_files.Linux.Release.x64
140
- path : |
141
- ${{ env.DD_TESTING_OUPUT_DIR }}
62
+ name : monitoring-home.Linux.Release.x64
63
+ path : ' ${{ github.workspace }}/shared/bin/monitoring-home'
142
64
retention-days : 7
143
65
144
66
benchmark_linux_x64 :
169
91
- name : Download profiler artifact
170
92
uses : actions/download-artifact@v2
171
93
with :
172
- name : DDProf-Deploy .Linux.Release.x64
173
- path : DDProf-Deploy
94
+ name : monitoring-home .Linux.Release.x64
95
+ path : shared/bin/monitoring-home
174
96
175
97
- name : Setup Go 1.16.8
176
98
uses : actions/setup-go@v2
@@ -185,6 +107,8 @@ jobs:
185
107
go_tool_dir=$(realpath .)/tools
186
108
mkdir $go_tool_dir
187
109
echo "GOPATH=$go_tool_dir" >> $GITHUB_ENV
110
+ sudo mkdir -p /var/log/datadog/dotnet
111
+ sudo chmod 777 /var/log/datadog/dotnet
188
112
189
113
- name : Install timeit
190
114
run : go install github.com/tonyredondo/timeit@latest
@@ -200,6 +124,14 @@ jobs:
200
124
- name : Wait 20 seconds to agent flush before finishing pipeline
201
125
run : sleep 20
202
126
127
+ - name : Publish artifact
128
+ uses : actions/upload-artifact@v2
129
+ with :
130
+ if-no-files-found : error
131
+ name : Benchmark.tests.linux.${{ matrix.framework }}.logs
132
+ path : ' /var/log/datadog/dotnet'
133
+ retention-days : 7
134
+
203
135
build_linux_asan :
204
136
name : Build Linux Profiler ASAN
205
137
runs-on : ubuntu-latest
@@ -372,14 +304,6 @@ jobs:
372
304
path : ' shared\bin\monitoring-home'
373
305
retention-days : 7
374
306
375
- - name : Publish artifact profiler-home
376
- uses : actions/upload-artifact@v2
377
- with :
378
- if-no-files-found : error
379
- name : ' profiler-home.Windows.${{matrix.configuration}}'
380
- path : ' shared\bin\monitoring-home\continuousprofiler'
381
- retention-days : 7
382
-
383
307
384
308
test_windows_profiler :
385
309
name : STests Windows Profiler
@@ -406,7 +330,7 @@ jobs:
406
330
uses : actions/download-artifact@v2
407
331
with :
408
332
name : monitoring-home.Windows.${{matrix.configuration}}
409
- path : DDProf-Deploy
333
+ path : shared/bin/monitoring-home
410
334
411
335
- name : Build sample applications
412
336
run : dotnet build -c ${{matrix.configuration}} profiler/src/Demos/Datadog.Demos.sln -p:Platform=${{matrix.platform}}
@@ -422,14 +346,11 @@ jobs:
422
346
#
423
347
# set profiler deployment and test output dir folder path for the test
424
348
#
425
- echo "DD_TESTING_PROFILER_FOLDER =$(Join-Path -Path $(Resolve-Path .) -ChildPath DDProf-Deploy )" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
349
+ echo "MonitoringHomeDirectory =$(Join-Path -Path $(Resolve-Path .) -ChildPath shared/bin/monitoring-home )" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
426
350
echo "DD_TESTING_OUPUT_DIR=$(Join-Path -Path $(Resolve-Path .) -ChildPath tests_output)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
427
351
428
352
- name : Run Integration tests
429
353
shell : cmd
430
- env :
431
- DD_API_KEY : ' ${{ secrets.DD_API_KEY }}'
432
- USE_NATIVE_LOADER : ' true'
433
354
run : >
434
355
cd profiler/test/Datadog.Profiler.IntegrationTests &&
435
356
dotnet test -c ${{matrix.configuration}} -p:Platform=${{matrix.platform}} --logger "console;verbosity=detailed" --logger "trx" -- RunConfiguration.TreatNoTestsAsError=true
@@ -815,8 +736,8 @@ jobs:
815
736
- name : Download profiler artifact
816
737
uses : actions/download-artifact@v2
817
738
with :
818
- name : DDProf-Deploy .Linux.Release.x64
819
- path : profiler -home-linux
739
+ name : monitoring-home .Linux.Release.x64
740
+ path : monitoring -home-linux
820
741
821
742
- name : Run throughput tests
822
743
shell : bash
0 commit comments