-
-
Notifications
You must be signed in to change notification settings - Fork 12
575 lines (506 loc) · 32.2 KB
/
ci_standard.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
name: Continuous Integration
on:
push:
branches:
- main
- develop
schedule:
- cron: '0 1 * * SUN'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
BuildPlatform: [x64, x86]
BuildConfiguration: [Release]
env:
OpenDdsVersion: "3.29.1"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet 6.0
shell: pwsh
run: |
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1';
./dotnet-install.ps1 -Architecture '${{ matrix.BuildPlatform }}' -Channel 6.0;
echo "PATH=$Env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup dotnet 7.0
shell: pwsh
run: |
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1';
./dotnet-install.ps1 -Architecture '${{ matrix.BuildPlatform }}' -Channel 7.0;
echo "PATH=$Env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Setup dotnet 8.0
shell: pwsh
run: |
Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1';
./dotnet-install.ps1 -Architecture '${{ matrix.BuildPlatform }}' -Channel 8.0;
echo "PATH=$Env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache OpenDDS libraries
id: opendds-libraries-windows
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/cmake/**/*
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.pl
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.dll
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.lib
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.exe
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/dds/idl/IDLTemplate.txt
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.h
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.hpp
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.cpp
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.inl
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.idl
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/**/*.pidl
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/ACE_wrappers/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_${{ matrix.BuildPlatform }}/ACE_wrappers/TAO/VERSION.txt
key: opendds-cache-${{ env.OpenDdsVersion }}-${{ matrix.BuildConfiguration }}-win-${{ matrix.BuildPlatform }}-ci
- name: Build & Test with Cake (No cached)
shell: pwsh
if: steps.opendds-libraries-windows.outputs.cache-hit != 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --BuildConfiguration=${{ matrix.BuildConfiguration }} --BuildPlatform=${{ matrix.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=False --IgnoreThirdPartyBuild=False --VisualStudioVersion=VS2022
working-directory: ${{ github.workspace }}/Build
- name: Build & Test with Cake (Cached)
shell: pwsh
if: steps.opendds-libraries-windows.outputs.cache-hit == 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --BuildConfiguration=${{ matrix.BuildConfiguration }} --BuildPlatform=${{ matrix.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=True --IgnoreThirdPartyBuild=True --VisualStudioVersion=VS2022
working-directory: ${{ github.workspace }}/Build
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: "Test Report: win-${{ matrix.BuildPlatform }} ${{ matrix.BuildConfiguration }}"
path: TestResults/net6.0/test-results.trx,TestResults/net7.0/test-results.trx,TestResults/net8.0/test-results.trx,TestResults/net462/test-results.trx,TestResults/net47/test-results.trx,TestResults/net471/test-results.trx,TestResults/net472/test-results.trx,TestResults/net48/test-results.trx
reporter: dotnet-trx
- name: Get path to lcov file
id: get_lcov_path
shell: bash
run: printf 'lcov_path=%s\n' ./TestResults/net6.0/*/coverage.info >> $GITHUB_OUTPUT
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: "${{ steps.get_lcov_path.outputs.lcov_path }}"
format: lcov
parallel: true
flag-name: coverage-windows-${{ join(matrix.*, '-') }}
fail-on-error: false
- name: Add OpenDDS lib folders to path
shell: pwsh
run: |
$env:PATH = "${{ github.workspace }}\ext\OpenDDS_${{ matrix.BuildPlatform }}\lib;${{ github.workspace }}\ext\OpenDDS_${{ matrix.BuildPlatform }}\ACE_wrappers\lib;$env:PATH"
echo "PATH=$env:PATH" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Latency Performance Test
shell: cmd
run: |
dotnet clean ${{ github.workspace }}\Tests\TestIdlCdr\TestIdlCdr.csproj
dotnet clean ${{ github.workspace }}\Tests\BenchmarkPerformance\BenchmarkPerformance.csproj
dotnet restore ${{ github.workspace }}\Tests\TestIdlCdr\TestIdlCdr.csproj
dotnet restore ${{ github.workspace }}\Tests\BenchmarkPerformance\BenchmarkPerformance.csproj
dotnet build -m:1 ${{ github.workspace }}\Tests\TestIdlCdr\TestIdlCdr.csproj --configuration Release --runtime win-${{ matrix.BuildPlatform }}
dotnet build -m:1 ${{ github.workspace }}\Tests\BenchmarkPerformance\BenchmarkPerformance.csproj --configuration Release --runtime win-${{ matrix.BuildPlatform }}
dotnet run --project ${{ github.workspace }}\Tests\BenchmarkPerformance\BenchmarkPerformance.csproj "-1" --configuration Release --runtime win-${{ matrix.BuildPlatform }}
env:
DDS_ROOT: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}"
ACE_ROOT: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}\\ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}\\ext\\OpenDDS_${{ matrix.BuildPlatform }}\\ACE_wrappers\\TAO"
continue-on-error: true
build_linux:
runs-on: ubuntu-20.04
env:
OpenDdsVersion: "3.29.1"
BuildPlatform: "x64"
BuildConfiguration: "Release"
LD_RPATH_FLAGS: "-Wl,-rpath='$ORIGIN'"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup dotnet 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache OpenDDS libraries
id: opendds-libraries-linux
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/ext/OpenDDS_Linux/cmake/**/*
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.pl
${{ github.workspace }}/ext/OpenDDS_Linux/**/lib*.so*
${{ github.workspace }}/ext/OpenDDS_Linux/bin/
${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/bin/
${{ github.workspace }}/ext/OpenDDS_Linux/dds/idl/IDLTemplate.txt
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.h
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.hpp
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.cpp
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.inl
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.idl
${{ github.workspace }}/ext/OpenDDS_Linux/**/*.pidl
${{ github.workspace }}/ext/OpenDDS_Linux/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_Linux/tools/
${{ github.workspace }}/ext/OpenDDS_Linux/dds/InfoRepo/DCPSInfoRepo
${{ github.workspace }}/ext/OpenDDS_Linux/dds/idl/opendds_idl
${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/apps/gperf/src/ace_gperf
${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/TAO/TAO_IDL/tao_idl
${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/TAO/VERSION.txt
key: opendds-cache-${{ env.OpenDdsVersion }}-linux-${{ env.BuildPlatform }}-ci
- name: Build Native (No cached)
shell: pwsh
if: steps.opendds-libraries-linux.outputs.cache-hit != 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --target=BuildOpenDDSharpNativeTask --BuildConfiguration=${{ env.BuildConfiguration }} --BuildPlatform=${{ env.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=False --IgnoreThirdPartyBuild=False
working-directory: ${{ github.workspace }}/Build
- name: Build Native (Cached)
shell: pwsh
if: steps.opendds-libraries-linux.outputs.cache-hit == 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --target=BuildOpenDDSharpNativeTask --exclusive --BuildConfiguration=${{ env.BuildConfiguration }} --BuildPlatform=${{ env.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=True --IgnoreThirdPartyBuild=True
working-directory: ${{ github.workspace }}/Build
- name: Dotnet restore
shell: bash
run: |
dotnet restore ${{ github.workspace }}/OpenDDSharp.sln --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Examples/ConsoleDemoCore/ConsoleDemoCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestIdlCdr/TestIdlCdr.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
working-directory: ${{ github.workspace }}
- name: Build OpenDDSharp.BuildTasks project
shell: bash
run: dotnet build ${{ github.workspace }}/Sources/OpenDDSharp.BuildTasks/OpenDDSharp.BuildTasks.csproj --configuration ${{ env.BuildConfiguration }}
working-directory: ${{ github.workspace }}
- name: Build OpenDDSharp TestSupportProcessCore project
shell: bash
run: dotnet build ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --configuration ${{ env.BuildConfiguration }} --runtime linux-x64
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/TAO"
- name: Build OpenDDSharp UnitTest project
shell: bash
run: dotnet build ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --configuration ${{ env.BuildConfiguration }} --runtime linux-x64
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/TAO"
- name: Test OpenDDSharp
shell: bash
run: dotnet test ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --no-build --no-restore --verbosity detailed --configuration ${{ env.BuildConfiguration }} --runtime linux-x64 --collect "XPlat code coverage" --logger "trx;LogFileName=test-results.trx" --logger "console;verbosity=detailed""console;verbosity=detailed" --settings ${{ github.workspace }}/Tests.runsettings --test-adapter-path "${{ github.workspace }}/packages/coverlet.collector/6.0.2/build/netstandard2.0/"
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/TAO"
LD_LIBRARY_PATH: "${{ github.workspace }}/ext/OpenDDS_Linux/lib:${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/lib:."
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: "Test Report: linux-x64"
path: TestResults/net6.0/test-results.trx,TestResults/net7.0/test-results.trx,TestResults/net8.0/test-results.trx,TestResults/net462/test-results.trx,TestResults/net47/test-results.trx,TestResults/net471/test-results.trx,TestResults/net472/test-results.trx,TestResults/net48/test-results.trx
reporter: dotnet-trx
- name: Get path to lcov file
id: get_lcov_path
shell: bash
run: printf 'lcov_path=%s\n' ${{ github.workspace }}/TestResults/net6.0/*/coverage.info >> $GITHUB_OUTPUT
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.get_lcov_path.outputs.lcov_path }}
format: lcov
parallel: true
flag-name: coverage-linux-x64-Release
fail-on-error: false
- name: Latency Performance Test
shell: bash
run: |
dotnet build ${{ github.workspace }}/Tests/TestIdlCdr/TestIdlCdr.csproj --configuration Release --runtime linux-x64
dotnet build ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --configuration Release --runtime linux-x64
dotnet publish ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --configuration Release --runtime linux-x64
cd ${{ github.workspace }}/Tests/BenchmarkPerformance/bin/Release/net8.0/linux-x64/publish
sudo LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" ${{ github.workspace }}/Tests/BenchmarkPerformance/bin/Release/net8.0/linux-x64/publish/BenchmarkPerformance -1
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_Linux/ACE_wrappers/TAO"
continue-on-error: true
build_macos_x64:
runs-on: macos-13
env:
OpenDdsVersion: "3.29.1"
BuildPlatform: "x64"
BuildConfiguration: "Release"
LD_RPATH_FLAGS: "-Wl,-rpath,@executable_path -Wl,-rpath,@loader_path"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup dotnet 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache OpenDDS libraries
id: opendds-libraries-macos-x64
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/ext/OpenDDS_osx-x64/cmake/**/*
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.pl
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/lib*.dylib
${{ github.workspace }}/ext/OpenDDS_osx-x64/bin/
${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/bin
${{ github.workspace }}/ext/OpenDDS_osx-x64/dds/idl/IDLTemplate.txt
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.h
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.hpp
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.cpp
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.inl
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.idl
${{ github.workspace }}/ext/OpenDDS_osx-x64/**/*.pidl
${{ github.workspace }}/ext/OpenDDS_osx-x64/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_osx-x64/tools/
${{ github.workspace }}/ext/OpenDDS_osx-x64/dds/InfoRepo/DCPSInfoRepo
${{ github.workspace }}/ext/OpenDDS_osx-x64/dds/idl/opendds_idl
${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/apps/gperf/src/ace_gperf
${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/TAO/TAO_IDL/tao_idl
${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/TAO/VERSION.txt
key: opendds-cache-${{ env.OpenDdsVersion }}-osx-${{ env.BuildPlatform }}-ci
- name: Build Native (No cached)
shell: pwsh
if: steps.opendds-libraries-macos-x64.outputs.cache-hit != 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --target=BuildOpenDDSharpNativeTask --BuildConfiguration=${{ env.BuildConfiguration }} --BuildPlatform=${{ env.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=False --IgnoreThirdPartyBuild=False
working-directory: ${{ github.workspace }}/Build
- name: Build Native (Cached)
shell: pwsh
if: steps.opendds-libraries-macos-x64.outputs.cache-hit == 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --target=BuildOpenDDSharpNativeTask --exclusive --BuildConfiguration=${{ env.BuildConfiguration }} --BuildPlatform=${{ env.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=True --IgnoreThirdPartyBuild=True
working-directory: ${{ github.workspace }}/Build
- name: Dotnet restore
shell: bash
run: |
dotnet restore ${{ github.workspace }}/OpenDDSharp.sln --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Examples/ConsoleDemoCore/ConsoleDemoCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
working-directory: ${{ github.workspace }}
- name: Build OpenDDSharp.BuildTasks project
shell: bash
run: dotnet build ${{ github.workspace }}/Sources/OpenDDSharp.BuildTasks/OpenDDSharp.BuildTasks.csproj --configuration ${{ env.BuildConfiguration }}
working-directory: ${{ github.workspace }}
- name: Build OpenDDSharp TestSupportProcessCore Project
shell: bash
run: dotnet build ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --configuration ${{ env.BuildConfiguration }} --runtime osx-x64
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/TAO"
- name: Build OpenDDSharp UnitTest Project
shell: bash
run: dotnet build ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --configuration ${{ env.BuildConfiguration }} --runtime osx-x64
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/TAO"
- name: Test OpenDDSharp
shell: bash
run: sudo dotnet test ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --no-build --no-restore --verbosity diagnostic --configuration ${{ env.BuildConfiguration }} --runtime osx-x64 --collect "XPlat code coverage" --settings ${{ github.workspace }}/Tests.runsettings --logger "trx;LogFileName=test-results.trx" --logger "console;verbosity=detailed" --test-adapter-path "${{ github.workspace }}/packages/coverlet.collector/6.0.2/build/netstandard2.0/"
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/TAO"
DYLD_FALLBACK_LIBRARY_PATH: "${{ github.workspace }}/ext/OpenDDS_osx-x64/lib:${{ github.workspace }}/ext/OpenDDS_osx-x64/ACE_wrappers/lib:."
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: "Test Report: osx-x64"
path: TestResults/net6.0/test-results.trx,TestResults/net7.0/test-results.trx,TestResults/net8.0/test-results.trx,TestResults/net462/test-results.trx,TestResults/net47/test-results.trx,TestResults/net471/test-results.trx,TestResults/net472/test-results.trx,TestResults/net48/test-results.trx
reporter: dotnet-trx
- name: Get path to lcov file
id: get_lcov_path
shell: bash
run: printf 'lcov_path=%s\n' ${{ github.workspace }}/TestResults/net6.0/*/coverage.info >> $GITHUB_OUTPUT
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.get_lcov_path.outputs.lcov_path }}
format: lcov
parallel: true
flag-name: coverage-macos-x64-Release
fail-on-error: false
- name: Latency Performance Test
shell: bash
run: |
dotnet build ${{ github.workspace }}/Tests/TestIdlCdr/TestIdlCdr.csproj --configuration Release --runtime osx-x64
dotnet build ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --configuration Release --runtime osx-x64
dotnet publish ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --configuration Release --runtime osx-x64
sudo env DYLD_LIBRARY_PATH="./:$DYLD_LIBRARY_PATH"
sudo env DYLD_FALLBACK_LIBRARY_PATH="./:$DYLD_FALLBACK_LIBRARY_PATH"
cd ${{ github.workspace }}/Tests/BenchmarkPerformance/bin/Release/net8.0/osx-x64/publish
sudo -E ${{ github.workspace }}/Tests/BenchmarkPerformance/bin/Release/net8.0/osx-x64/publish/BenchmarkPerformance -1
working-directory: ${{ github.workspace }}
continue-on-error: true
build_macos_arm64:
runs-on: macos-14
env:
OpenDdsVersion: "3.29.1"
BuildPlatform: "ARM64"
BuildConfiguration: "Release"
LD_RPATH_FLAGS: "-Wl,-rpath,@executable_path -Wl,-rpath,@loader_path"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup dotnet 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- name: Setup dotnet 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Cache OpenDDS libraries
id: opendds-libraries-macos-arm64
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/ext/OpenDDS_osx-arm64/cmake/**/*
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.pl
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/lib*.dylib
${{ github.workspace }}/ext/OpenDDS_osx-arm64/bin/
${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/bin
${{ github.workspace }}/ext/OpenDDS_osx-arm64/dds/idl/IDLTemplate.txt
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.h
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.hpp
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.cpp
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.inl
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.idl
${{ github.workspace }}/ext/OpenDDS_osx-arm64/**/*.pidl
${{ github.workspace }}/ext/OpenDDS_osx-arm64/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_osx-arm64/tools/
${{ github.workspace }}/ext/OpenDDS_osx-arm64/dds/InfoRepo/DCPSInfoRepo
${{ github.workspace }}/ext/OpenDDS_osx-arm64/dds/idl/opendds_idl
${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/apps/gperf/src/ace_gperf
${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/TAO/TAO_IDL/tao_idl
${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/VERSION.txt
${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/TAO/VERSION.txt
key: opendds-cache-${{ env.OpenDdsVersion }}-osx-${{ env.BuildPlatform }}-ci
- name: Build Native (No cached)
shell: pwsh
if: steps.opendds-libraries-macos-ARM64.outputs.cache-hit != 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --target=BuildOpenDDSharpNativeTask --BuildConfiguration=${{ env.BuildConfiguration }} --BuildPlatform=${{ env.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=False --IgnoreThirdPartyBuild=False
working-directory: ${{ github.workspace }}/Build
- name: Build Native (Cached)
shell: pwsh
if: steps.opendds-libraries-macos-ARM64.outputs.cache-hit == 'true'
run: ${{ github.workspace }}/Build/OpenDDSharp.Build.ps1 --target=BuildOpenDDSharpNativeTask --exclusive --BuildConfiguration=${{ env.BuildConfiguration }} --BuildPlatform=${{ env.BuildPlatform }} --OpenDdsVersion=${{ env.OpenDdsVersion }} --IgnoreThirdPartySetup=True --IgnoreThirdPartyBuild=True
working-directory: ${{ github.workspace }}/Build
- name: Dotnet restore
shell: bash
run: |
dotnet restore ${{ github.workspace }}/OpenDDSharp.sln --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Examples/ConsoleDemoCore/ConsoleDemoCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
dotnet restore ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --packages "${{ github.workspace }}/packages" --no-cache --configfile ${{ github.workspace }}/nuget.config
working-directory: ${{ github.workspace }}
- name: Build OpenDDSharp.BuildTasks project
shell: bash
run: dotnet build ${{ github.workspace }}/Sources/OpenDDSharp.BuildTasks/OpenDDSharp.BuildTasks.csproj --configuration ${{ env.BuildConfiguration }}
working-directory: ${{ github.workspace }}
- name: Build OpenDDSharp TestSupportProcessCore Project
shell: bash
run: dotnet build ${{ github.workspace }}/Tests/TestSupportProcessCore/TestSupportProcessCore.csproj --configuration ${{ env.BuildConfiguration }} --runtime osx-arm64
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/TAO"
- name: Build OpenDDSharp UnitTest Project
shell: bash
run: dotnet build ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --configuration ${{ env.BuildConfiguration }} --runtime osx-arm64
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/TAO"
- name: Test OpenDDSharp
shell: bash
run: sudo dotnet test ${{ github.workspace }}/Tests/OpenDDSharp.UnitTest/OpenDDSharp.UnitTest.csproj --no-build --no-restore --verbosity diagnostic --configuration ${{ env.BuildConfiguration }} --runtime osx-arm64 --collect "XPlat code coverage" --settings ${{ github.workspace }}/Tests.runsettings --logger "trx;LogFileName=test-results.trx" --logger "console;verbosity=detailed" --test-adapter-path "${{ github.workspace }}/packages/coverlet.collector/6.0.2/build/netstandard2.0/"
working-directory: ${{ github.workspace }}
env:
DDS_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64"
ACE_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers"
TAO_ROOT: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/TAO"
DYLD_FALLBACK_LIBRARY_PATH: "${{ github.workspace }}/ext/OpenDDS_osx-arm64/lib:${{ github.workspace }}/ext/OpenDDS_osx-arm64/ACE_wrappers/lib:."
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: "Test Report: osx-arm64"
path: TestResults/net6.0/test-results.trx,TestResults/net7.0/test-results.trx,TestResults/net8.0/test-results.trx
reporter: dotnet-trx
- name: Get path to lcov file
id: get_lcov_path
shell: bash
run: printf 'lcov_path=%s\n' ${{ github.workspace }}/TestResults/net6.0/*/coverage.info >> $GITHUB_OUTPUT
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.get_lcov_path.outputs.lcov_path }}
format: lcov
parallel: true
flag-name: coverage-macos-arm64-Release
fail-on-error: false
- name: Latency Performance Test
shell: bash
run: |
dotnet build ${{ github.workspace }}/Tests/TestIdlCdr/TestIdlCdr.csproj --configuration Release --runtime osx-arm64
dotnet build ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --configuration Release --runtime osx-arm64
dotnet publish ${{ github.workspace }}/Tests/BenchmarkPerformance/BenchmarkPerformance.csproj --configuration Release --runtime osx-arm64
sudo env DYLD_LIBRARY_PATH="./:$DYLD_LIBRARY_PATH"
sudo env DYLD_FALLBACK_LIBRARY_PATH="./:$DYLD_FALLBACK_LIBRARY_PATH"
cd ${{ github.workspace }}/Tests/BenchmarkPerformance/bin/Release/net8.0/osx-arm64/publish
sudo -E ${{ github.workspace }}/Tests/BenchmarkPerformance/bin/Release/net8.0/osx-arm64/publish/BenchmarkPerformance -1
working-directory: ${{ github.workspace }}
continue-on-error: true
publish_coveralls:
runs-on: ubuntu-latest
needs: [build_windows, build_linux, build_macos_x64, build_macos_arm64]
steps:
- name: Publish coverage on Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: coverage-windows-x64-Release,coverage-windows-x86-Release,coverage-linux-x64-Release,coverage-macos-x64-Release,coverage-macos-arm64-Release
fail-on-error: false