Skip to content

Commit

Permalink
Remove -cdr argument and support of Fast CDR v1 (#265)
Browse files Browse the repository at this point in the history
* Refs #19971. Remove -cdr argument

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

* Refs #19971. Update submodule

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>

---------

Signed-off-by: Ricardo González Moreno <ricardo@richiware.dev>
  • Loading branch information
richiware committed Apr 8, 2024
1 parent 2e9279b commit 6381c84
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 3,436 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/reusable-ubuntu-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,7 @@ jobs:
cmake --version
colcon build --event-handlers=console_direct+ --mixin rel-with-deb-info ccache --metas src/fastddsgen/.github/fastddsgen.meta
- name: Test fastddsgen with fastcdr v1
if: startsWith(inputs.fastcdr_branch, '1')
run: |
source install/local_setup.bash
cd src/fastddsgen
./gradlew test -Dcdr_version=v1 -Dblacklist_tests=external,optional
- name: Test fastddsgen with fastcdr v2
if: ${{ ! startsWith(inputs.fastcdr_branch, '1') }}
- name: Test fastddsgen
run: |
source install/local_setup.bash
cd src/fastddsgen
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/ubuntu-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
description: 'foonathan_memory_vendor branch to be used'
required: true
type: string
fastcdr_version:
description: 'Fast CDR branches to be used. Enclose the branch names like ["1.1.x", "master"], then in single quotes'
fastcdr_branch:
description: 'Fast CDR branches to be used'
required: true
type: string
fastdds_branch:
Expand Down Expand Up @@ -40,14 +40,13 @@ jobs:
java_version:
- 'openjdk-11-jdk'
- 'openjdk-19-jdk'
fastcdr_version: ${{ fromJson(inputs.fastcdr_version || '["master"]') }}

uses: ./.github/workflows/reusable-ubuntu-ci.yaml
with:
os_image: ${{ matrix.os_image }}
java_version: ${{ matrix.java_version }}
foonathan_memory_vendor_branch: ${{ inputs.foonathan_memory_vendor_branch || 'master' }}
fastcdr_branch: ${{ matrix.fastcdr_version }}
fastcdr_branch: ${{ inputs.fastcdr_branch || 'master' }}
fastdds_branch: ${{ inputs.fastdds_branch || github.head_ref }}
fastdds_python_branch: ${{ inputs.fastdds_python_branch || '3.0.x-devel' }}
fastddsgen_branch: ${{ inputs.fastddsgen_branch || github.ref || '4.0.x-devel' }}
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/com/eprosima/fastcdr/idl/context/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,5 @@ public interface Context

public boolean isFastcdr();

public boolean isCdr_v1();

public boolean isCdr_v2();

public boolean isCdr_both();

public void isSetCdrv1Templates();

public void isUnsetCdrv1Templates();

public boolean isCdrv1TemplatesEnabled();

/*** End ***/
}
10 changes: 0 additions & 10 deletions src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@ import "FastCdrCommon.stg"
main(ctx, definitions) ::= <<
$fileHeader(ctx=ctx, file=[ctx.filename, ".h"], description=["This header file contains the declaration of the described types in the IDL file."])$

$if(ctx.cdr_both)$
#include <fastcdr/config.h>
#include "$ctx.filename$v1.h"

#if FASTCDR_VERSION_MAJOR > 1
$endif$

#ifndef _FAST_DDS_GENERATED_$ctx.headerGuardName$_H_
#define _FAST_DDS_GENERATED_$ctx.headerGuardName$_H_

Expand Down Expand Up @@ -105,9 +98,6 @@ $definitions; separator="\n"$
#endif // _FAST_DDS_GENERATED_$ctx.headerGuardName$_H_
$"\n"$

$if(ctx.cdr_both)$
#endif // FASTCDR_VERSION_MAJOR > 1
$endif$
>>

module(ctx, parent, module, definition_list) ::= <<
Expand Down
Loading

0 comments on commit 6381c84

Please sign in to comment.