Skip to content

Commit

Permalink
Upgrade OpenDDS and librdkafka (#41)
Browse files Browse the repository at this point in the history
* #40: update OpenDDS to version 3.25 and librdkafka to version 2.2.0

* Upgrade .NET Framework generation

* Workflow fix

* Copyright update
  • Loading branch information
masesdevelopers committed Aug 10, 2023
1 parent 83b9d73 commit 09e4a68
Show file tree
Hide file tree
Showing 163 changed files with 244 additions and 365 deletions.
85 changes: 39 additions & 46 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: 'true'

- name: Exists OpenDDS
id: existsOpenDDS
continue-on-error: true
run: |
python $GITHUB_WORKSPACE/third_party/CommonTools/scripts/utilsftp.py -c check -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Build_3.21.zip -l $GITHUB_WORKSPACE/OpenDDS_Build_3.21.zip
python $GITHUB_WORKSPACE/third_party/CommonTools/scripts/utilsftp.py -c check -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Build_3.25.zip -l $GITHUB_WORKSPACE/OpenDDS_Build_3.25.zip
- name: If failed we need to rebuild artifact
id: check_existsOpenDDS
if: ${{ steps.existsOpenDDS.outcome == 'failure' }}
run: echo '::set-output name=build_opendds::true'
run: echo "build_opendds=true" >> $GITHUB_OUTPUT

build_opendds_windows:
needs: check_opendds
Expand All @@ -48,12 +48,12 @@ jobs:
run: git config --system core.longpaths true

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'true'

- name: set up msvc env
uses: ilammy/msvc-dev-cmd@v1.10.0
uses: ilammy/msvc-dev-cmd@v1.12.1

- name: Configure OpenDDS
shell: cmd
Expand Down Expand Up @@ -124,21 +124,21 @@ jobs:
- name: Prepare for packaging OpenDDS Binaries and PDB
run: |
Compress-Archive -Path .\Output\* -DestinationPath .\OpenDDS_Build_3.21.zip
Compress-Archive -Path .\OutputPdb\* -DestinationPath .\OpenDDS_PDB_Build_3.21.zip
Compress-Archive -Path .\Output\* -DestinationPath .\OpenDDS_Build_3.25.zip
Compress-Archive -Path .\OutputPdb\* -DestinationPath .\OpenDDS_PDB_Build_3.25.zip
- name: Prepare for packaging OpenDDS Headers
shell: cmd
run: |
7z a .\OpenDDS_Headers_3.21.zip .\third_party\OpenDDS\*.h -r
7z u .\OpenDDS_Headers_3.21.zip .\third_party\OpenDDS\*.inl -r
7z a .\OpenDDS_Headers_3.25.zip .\third_party\OpenDDS\*.h -r
7z u .\OpenDDS_Headers_3.25.zip .\third_party\OpenDDS\*.inl -r
- name: Upload OpenDDS
shell: cmd
run: |
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c upload -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Build_3.21.zip -l %GITHUB_WORKSPACE%\OpenDDS_Build_3.21.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c upload -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_PDB_Build_3.21.zip -l %GITHUB_WORKSPACE%\OpenDDS_PDB_Build_3.21.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c upload -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Headers_3.21.zip -l %GITHUB_WORKSPACE%\OpenDDS_Headers_3.21.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c upload -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Build_3.25.zip -l %GITHUB_WORKSPACE%\OpenDDS_Build_3.25.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c upload -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_PDB_Build_3.25.zip -l %GITHUB_WORKSPACE%\OpenDDS_PDB_Build_3.25.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c upload -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Headers_3.25.zip -l %GITHUB_WORKSPACE%\OpenDDS_Headers_3.25.zip
env:
GITHUB_WORKSPACE: $GITHUB_WORKSPACE

Expand All @@ -152,7 +152,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: get_changed_files
uses: jitterbit/get-changed-files@v1
uses: masesgroup/retrieve-changed-files@v2
with:
format: 'csv'
- id: check_files
Expand All @@ -161,12 +161,12 @@ jobs:
for added_modified_file in "${added_modified_files[@]}"; do
if [[ $added_modified_file == ".github/workflows/build.yaml"* ]]; then
echo "$added_modified_file is myself."
echo "::set-output name=run_build_ddm_windows::true"
echo "run_build_ddm_windows=true" >> $GITHUB_OUTPUT
break
fi
if [[ $added_modified_file == "src/"* ]]; then
echo "$added_modified_file file is under the directory 'src/'."
echo "::set-output name=run_build_ddm_windows::true"
echo "run_build_ddm_windows=true" >> $GITHUB_OUTPUT
break
fi
done
Expand All @@ -188,12 +188,12 @@ jobs:
run: git config --system core.longpaths true

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'true'

- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v3.3.1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand All @@ -210,7 +210,7 @@ jobs:

- name: set up msvc env
if: ${{ github.repository_owner != 'masesgroup' || (github.repository_owner == 'masesgroup' && steps.installGPGKeyForMaven.outcome == 'success') }}
uses: ilammy/msvc-dev-cmd@v1.10.0
uses: ilammy/msvc-dev-cmd@v1.12.1

- name: Build Common Tools
shell: cmd
Expand Down Expand Up @@ -257,24 +257,24 @@ jobs:
- name: Download OpenDDS Binaries
shell: cmd
run: |
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c download -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Build_3.21.zip -l %GITHUB_WORKSPACE%\OpenDDS_Build_3.21.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c download -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Build_3.25.zip -l %GITHUB_WORKSPACE%\OpenDDS_Build_3.25.zip
env:
GITHUB_WORKSPACE: $GITHUB_WORKSPACE

- name: Download OpenDDS Headers
shell: cmd
run: |
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c download -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Headers_3.21.zip -l %GITHUB_WORKSPACE%\OpenDDS_Headers_3.21.zip
python %GITHUB_WORKSPACE%\third_party\CommonTools\scripts\utilsftp.py -c download -s ${{ secrets.FTP_STORE_SITE }} -u ${{ secrets.FTP_STORE_USER }} -p ${{ secrets.FTP_STORE_PASSWORD }} -r OpenDDS_Headers_3.25.zip -l %GITHUB_WORKSPACE%\OpenDDS_Headers_3.25.zip
env:
GITHUB_WORKSPACE: $GITHUB_WORKSPACE

- name: Prepare OpenDDS Binaries
run: |
Expand-Archive -LiteralPath '.\OpenDDS_Build_3.21.zip' -DestinationPath .\Output -Force
Expand-Archive -LiteralPath '.\OpenDDS_Build_3.25.zip' -DestinationPath .\Output -Force
- name: Prepare OpenDDS Headers
run: |
Expand-Archive -LiteralPath '.\OpenDDS_Headers_3.21.zip' -DestinationPath .\third_party\OpenDDS -Force
Expand-Archive -LiteralPath '.\OpenDDS_Headers_3.25.zip' -DestinationPath .\third_party\OpenDDS -Force
- name: Move OpenDDS x64
shell: cmd
Expand All @@ -293,7 +293,7 @@ jobs:
perl %ACE_ROOT%\bin\mwc.pl -type vs2022 DataDistributionManagerOpenDDS.mwc
cd ..\..
- uses: nuget/setup-nuget@v1
- uses: nuget/setup-nuget@v1.2.0
with:
nuget-version: '5.x'
- run: nuget restore src\DataDistributionManager.sln
Expand All @@ -314,20 +314,11 @@ jobs:
cd src
msbuild /m -p:Configuration=Release,Platform=Win32 DataDistributionManager.sln
# Install .NET SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Build DataDistributionManager net6.0, net5.0 and netcoreapp3.1
- name: Build DataDistributionManager net462, net6.0 and net7.0
run: |
dotnet build --no-incremental --configuration Release --framework netcoreapp3.1 -o Outputnetcoreapp3.1 src\DataDistributionManagerNet\DataDistributionManagerNet5.csproj
dotnet build --no-incremental --configuration Release --framework net6.0 -o Outputnet6.0 src\DataDistributionManagerNet\DataDistributionManagerNet5.csproj
dotnet build --no-incremental --configuration Release --framework net462 -o Output src\DataDistributionManagerNet\DataDistributionManagerNet.csproj
dotnet build --no-incremental --configuration Release --framework net6.0 -o Outputnet6.0 src\DataDistributionManagerNet\DataDistributionManagerNet.csproj
dotnet build --no-incremental --configuration Release --framework net7.0 -o Outputnet7.0 src\DataDistributionManagerNet\DataDistributionManagerNet.csproj
- name: Prepare for packaging
run: |
Expand Down Expand Up @@ -363,7 +354,7 @@ jobs:
Copy-Item .\Output\x64\*.pdb .\OutputPackage\pdb\x64\ -Force
Copy-Item .\Output\pdb64\*.pdb .\OutputPackage\pdb\x64\ -Force
Copy-Item .\LICENSE .\OutputPackage\licenses\LICENSE.datadistributionmanager -Force
Copy-Item .\src\packages\librdkafka.redist.1.9.0.1\LICENSES.txt .\OutputPackage\licenses\LICENSE.librdkafka -Force
Copy-Item .\src\packages\librdkafka.redist.2.2.0\LICENSES.txt .\OutputPackage\licenses\LICENSE.librdkafka -Force
Copy-Item .\third_party\OpenDDS\LICENSE .\OutputPackage\licenses\LICENSE.opendds -Force
Compress-Archive -Path .\OutputPackage\* -DestinationPath .\OutputPackage\DataDistributionManager.zip
Expand All @@ -376,9 +367,11 @@ jobs:
Compress-Archive -Path .\OutputPackage\runtime\x86\* -DestinationPath .\OutputJava\windows_x86\nativepackage.zip
- name: Set up Apache Maven Central
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with: # running setup-java again overwrites the settings.xml
java-version: 11
distribution: temurin
cache: 'maven'
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
server-username: MAVEN_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
Expand Down Expand Up @@ -408,10 +401,10 @@ jobs:
run: Remove-Item .\docs\* -Recurse -Force -Exclude _config.yml

- name: Download Doxygen tool
run: C:\msys64\usr\bin\wget.exe https://www.doxygen.nl/files/doxygen-1.9.3.windows.x64.bin.zip
run: C:\msys64\usr\bin\wget.exe https://www.doxygen.nl/files/doxygen-1.9.7.windows.x64.bin.zip

- name: Expand Doxygen package
run: Expand-Archive -LiteralPath '.\doxygen-1.9.3.windows.x64.bin.zip' -DestinationPath .\src\Documentation -Force
run: Expand-Archive -LiteralPath '.\doxygen-1.9.7.windows.x64.bin.zip' -DestinationPath .\src\Documentation -Force

- name: Create C/C++ documentation
shell: cmd
Expand All @@ -425,27 +418,27 @@ jobs:
cd src\Documentation
docfx
- uses: nuget/setup-nuget@v1
- uses: nuget/setup-nuget@v1.2.0
with:
nuget-version: '5.x'
- run: nuget pack packaging\nuget\datadistributionmanager.nuspec

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: MASES.DataDistributionManager.${{ env.NUGET_PACKAGE_VERSION }}.nupkg
path: .\MASES.DataDistributionManager.${{ env.NUGET_PACKAGE_VERSION }}.nupkg

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: MavenDeploy
path: .\packaging\maven\target\*.jar

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: DataDistributionManager.jar
path: .\Output\datadistributionmanager.jar

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: DataDistributionManager.zip
path: .\OutputPackage\DataDistributionManager.zip
Expand All @@ -456,7 +449,7 @@ jobs:
shell: bash

- name: Commit changes
uses: EndBug/add-and-commit@v5
uses: EndBug/add-and-commit@v9
if: ${{ github.repository_owner == 'masesgroup'}} #do not push any changes outside main repo
with:
author_name: github-actions
Expand Down
27 changes: 9 additions & 18 deletions .github/workflows/pullrequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
run: git config --system core.longpaths true

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: 'true'

- name: set up msvc env
uses: ilammy/msvc-dev-cmd@v1.10.0
uses: ilammy/msvc-dev-cmd@v1.12.1

- name: Build Common Tools
shell: cmd
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
perl %ACE_ROOT%\bin\mwc.pl -type vs2022 DataDistributionManagerOpenDDS.mwc
cd ..\..
- uses: nuget/setup-nuget@v1
- uses: nuget/setup-nuget@v1.2.0
with:
nuget-version: '5.x'
- run: nuget restore src\DataDistributionManager.sln
Expand All @@ -143,20 +143,11 @@ jobs:
cd src
msbuild /m -p:Configuration=Release,Platform=Win32 DataDistributionManager.sln
# Install .NET SDKs
- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x

- name: Build DataDistributionManager net6.0, net5.0 and netcoreapp3.1
- name: Build DataDistributionManager net462, net6.0 and net7.0
run: |
dotnet build --no-incremental --configuration Release --framework netcoreapp3.1 -o Outputnetcoreapp3.1 src\DataDistributionManagerNet\DataDistributionManagerNet5.csproj
dotnet build --no-incremental --configuration Release --framework net6.0 -o Outputnet6.0 src\DataDistributionManagerNet\DataDistributionManagerNet5.csproj
dotnet build --no-incremental --configuration Release --framework net462 -o Output src\DataDistributionManagerNet\DataDistributionManagerNet.csproj
dotnet build --no-incremental --configuration Release --framework net6.0 -o Outputnet6.0 src\DataDistributionManagerNet\DataDistributionManagerNet.csproj
dotnet build --no-incremental --configuration Release --framework net7.0 -o Outputnet7.0 src\DataDistributionManagerNet\DataDistributionManagerNet.csproj
- name: Prepare for packaging
run: |
Expand Down Expand Up @@ -192,7 +183,7 @@ jobs:
Copy-Item .\Output\x64\*.pdb .\OutputPackage\pdb\x64\ -Force
Copy-Item .\Output\pdb64\*.pdb .\OutputPackage\pdb\x64\ -Force
Copy-Item .\LICENSE .\OutputPackage\licenses\LICENSE.datadistributionmanager -Force
Copy-Item .\src\packages\librdkafka.redist.1.9.0.1\LICENSES.txt .\OutputPackage\licenses\LICENSE.librdkafka -Force
Copy-Item .\src\packages\librdkafka.redist.2.2.0\LICENSES.txt .\OutputPackage\licenses\LICENSE.librdkafka -Force
Copy-Item .\third_party\OpenDDS\LICENSE .\OutputPackage\licenses\LICENSE.opendds -Force
Compress-Archive -Path .\OutputPackage\* -DestinationPath .\OutputPackage\DataDistributionManager.zip
Expand All @@ -212,7 +203,7 @@ jobs:
CreateJar.bat
cd ..\..
- uses: nuget/setup-nuget@v1
- uses: nuget/setup-nuget@v1.2.0
with:
nuget-version: '5.x'
- run: nuget pack packaging\nuget\datadistributionmanager.nuspec
Loading

0 comments on commit 09e4a68

Please sign in to comment.