diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 919f47ad..620b53ee 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -4,7 +4,28 @@ on: [push] jobs: build_and_test: - runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + rosdistro: [rolling] + os: [ubuntu-20.04] + java_version: [6, default] + include: + - java_version: 6 + colcon_defaults: | + { + "build": { + "cmake-args": [ + "-DCMAKE_JAVA_COMPILE_FLAGS=-source;1.6;-target;1.6;-Xlint:-options", + "--no-warn-unused-cli" + ] + } + } + - java_version: default + colcon_defaults: | + { + } + runs-on: ${{matrix.os}} steps: - name: Install Java run: | @@ -13,13 +34,13 @@ jobs: - uses: actions/checkout@v2 - uses: ros-tooling/setup-ros@v0.2 with: - required-ros-distributions: rolling + required-ros-distributions: ${{matrix.rosdistro}} - uses: ros-tooling/action-ros-ci@master with: package-name: rosidl_generator_java rcljava_common rcljava - target-ros2-distro: rolling + target-ros2-distro: ${{matrix.rosdistro}} vcs-repo-file-url: ${{ github.workspace }}/ros2_java_desktop.repos - + colcon-defaults: ${{matrix.colcon_defaults}} # build_android: # runs-on: ubuntu-18.04 # steps: diff --git a/rcljava/CMakeLists.txt b/rcljava/CMakeLists.txt index 85cba623..7c1115bc 100644 --- a/rcljava/CMakeLists.txt +++ b/rcljava/CMakeLists.txt @@ -38,8 +38,6 @@ if(NOT WIN32) add_compile_options(-Wall -Wextra -Wpedantic) endif() -set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6") - include_directories(include) function(set_properties _target_name _build_type) diff --git a/rcljava_common/CMakeLists.txt b/rcljava_common/CMakeLists.txt index 228f24ea..a85f0df3 100644 --- a/rcljava_common/CMakeLists.txt +++ b/rcljava_common/CMakeLists.txt @@ -31,8 +31,6 @@ if(NOT WIN32) add_compile_options(-Wall -Wextra -Wpedantic) endif() -set(CMAKE_JAVA_COMPILE_FLAGS "-source" "1.6" "-target" "1.6") - set(${PROJECT_NAME}_java_sources "src/main/java/org/ros2/rcljava/common/JNIUtils.java" "src/main/java/org/ros2/rcljava/exceptions/RCLException.java"