Continuous Integration #1444
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
env: | |
_NO_DEBUG_HEAP: 1 | |
- 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 | |
env: | |
_NO_DEBUG_HEAP: 1 | |
- 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 |