diff --git a/.github/reviewer-lottery.yml b/.github/reviewer-lottery.yml new file mode 100644 index 00000000..c6580eac --- /dev/null +++ b/.github/reviewer-lottery.yml @@ -0,0 +1,33 @@ +groups: + # Default reviewers for all pull requests. + # Usually, at least on of the maintainers should approve PR before merging. + # The best is if two maintainers do that. + - name: maintainers # name of the group + reviewers: 2 # how many reviewers do you want to assign? + internal_reviewers: 1 # how many reviewers do you want to assign when the PR author belongs to this group? + usernames: # github usernames of the reviewers + - bmagyar + - destogl + + # Reviewers group to get broader feedback. + - name: reviewers + reviewers: 5 + usernames: + - aprotyas + - arne48 + - bijoua29 + - christophfroehlich + - DasRoteSkelett + - duringhof + - erickisos + - fmauch + - jaron-l + - livanov93 + - mcbed + - moriarty + - olivier-stasse + - peterdavidfagan + - progtologist + - saikishor + - VanshGehlot + - VX792 diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml new file mode 100644 index 00000000..1c54e87e --- /dev/null +++ b/.github/workflows/build-binary.yml @@ -0,0 +1,26 @@ +# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). +# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) + +name: Binary Build +on: + pull_request: + push: + branches: + - ros2-master + schedule: + # Run every day to detect flakiness and broken dependencies + - cron: '28 6 * * *' + + +jobs: + binary: + uses: ros-controls/ros2_control/.github/workflows/reusable-industrial-ci-with-cache.yml@master + strategy: + matrix: + ROS_DISTRO: [rolling, iron, humble] + ROS_REPO: [main, testing] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + ros_repo: ${{ matrix.ROS_REPO }} + upstream_workspace: control_toolbox-not-released.${{ matrix.ROS_DISTRO }}.repos + ref_for_scheduled_build: ros2-master diff --git a/.github/workflows/build-coverage_humble.yml b/.github/workflows/build-coverage_humble.yml deleted file mode 100644 index b05a90c5..00000000 --- a/.github/workflows/build-coverage_humble.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Coverage Build - Humble -on: - workflow_dispatch: - push: - branches: - - ros2-master - pull_request: - branches: - - ros2-master - -jobs: - coverage: - name: coverage build - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - env: - ROS_DISTRO: humble - steps: - - uses: ros-tooling/setup-ros@0.7.1 - with: - required-ros-distributions: ${{ env.ROS_DISTRO }} - - uses: actions/checkout@v4 - - uses: ros-tooling/action-ros-ci@0.3.6 - with: - target-ros2-distro: ${{ env.ROS_DISTRO }} - import-token: ${{ secrets.GITHUB_TOKEN }} - # build all packages listed here - package-name: - control_toolbox - - vcs-repo-file-url: | - https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/control_toolbox.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }} - colcon-defaults: | - { - "build": { - "mixin": ["coverage-gcc"] - } - } - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - uses: codecov/codecov-action@v4.0.1 - with: - file: ros_ws/lcov/total_coverage.info - flags: unittests - name: codecov-umbrella - token: ${{ secrets.CODECOV_TOKEN }} - - uses: actions/upload-artifact@v4.3.0 - with: - name: colcon-logs-coverage-humble - path: ros_ws/log diff --git a/.github/workflows/build-coverage_iron.yml b/.github/workflows/build-coverage_iron.yml deleted file mode 100644 index 8feda144..00000000 --- a/.github/workflows/build-coverage_iron.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Coverage Build - Iron -on: - workflow_dispatch: - push: - branches: - - ros2-master - pull_request: - branches: - - ros2-master - -jobs: - coverage: - name: coverage build - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - env: - ROS_DISTRO: iron - steps: - - uses: ros-tooling/setup-ros@0.7.1 - with: - required-ros-distributions: ${{ env.ROS_DISTRO }} - - uses: actions/checkout@v4 - - uses: ros-tooling/action-ros-ci@0.3.6 - with: - target-ros2-distro: ${{ env.ROS_DISTRO }} - import-token: ${{ secrets.GITHUB_TOKEN }} - # build all packages listed here - package-name: - control_toolbox - - vcs-repo-file-url: | - https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/control_toolbox.${{ env.ROS_DISTRO }}.repos?token=${{ secrets.GITHUB_TOKEN }} - colcon-defaults: | - { - "build": { - "mixin": ["coverage-gcc"] - } - } - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml - - uses: codecov/codecov-action@v4.0.1 - with: - file: ros_ws/lcov/total_coverage.info - flags: unittests - name: codecov-umbrella - token: ${{ secrets.CODECOV_TOKEN }} - - uses: actions/upload-artifact@v4.3.0 - with: - name: colcon-logs-coverage-iron - path: ros_ws/log diff --git a/.github/workflows/build-humble.yml b/.github/workflows/build-humble.yml deleted file mode 100644 index 3ad3578e..00000000 --- a/.github/workflows/build-humble.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build humble -on: - pull_request: - push: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: humble, ROS_REPO: main} - - {ROS_DISTRO: humble, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/build-iron.yml b/.github/workflows/build-iron.yml deleted file mode 100644 index 55c7933d..00000000 --- a/.github/workflows/build-iron.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build iron -on: - pull_request: - push: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: iron, ROS_REPO: main} - - {ROS_DISTRO: iron, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/build-rolling.yml b/.github/workflows/build-rolling.yml deleted file mode 100644 index 8119ddd3..00000000 --- a/.github/workflows/build-rolling.yml +++ /dev/null @@ -1,55 +0,0 @@ -# This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). -# For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) - -name: Build rolling -on: - pull_request: - push: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '28 6 * * *' - -jobs: - binary: - name: binary build - runs-on: ubuntu-latest - strategy: - matrix: - env: - - {ROS_DISTRO: rolling, ROS_REPO: main} - - {ROS_DISTRO: rolling, ROS_REPO: testing} - env: - CCACHE_DIR: ${{ github.workspace }}/.ccache - BASEDIR: ${{ github.workspace }}/.work - CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }} - steps: - - uses: actions/checkout@v4 - # The target directory cache doesn't include the source directory because - # that comes from the checkout. See "prepare target_ws for cache" task below - - name: cache target_ws - if: ${{ ! matrix.env.CCOV }} - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.BASEDIR }}/target_ws - key: target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }}-${{ github.run_id }} - restore-keys: | - target_ws-${{ env.CACHE_PREFIX }}-${{ hashFiles('**/CMakeLists.txt', '**/package.xml') }} - - name: cache ccache - uses: pat-s/always-upload-cache@v3.0.11 - with: - path: ${{ env.CCACHE_DIR }} - key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} - restore-keys: | - ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} - ccache-${{ env.CACHE_PREFIX }} - - uses: 'ros-industrial/industrial_ci@master' - env: ${{matrix.env}} - - name: prepare target_ws for cache - if: ${{ always() && ! matrix.env.CCOV }} - run: | - du -sh ${{ env.BASEDIR }}/target_ws - sudo find ${{ env.BASEDIR }}/target_ws -wholename '*/test_results/*' -delete - sudo rm -rf ${{ env.BASEDIR }}/target_ws/src - du -sh ${{ env.BASEDIR }}/target_ws diff --git a/.github/workflows/build-source_humble.yml b/.github/workflows/build-source.yml similarity index 58% rename from .github/workflows/build-source_humble.yml rename to .github/workflows/build-source.yml index 4cf8d966..3a31aa8c 100644 --- a/.github/workflows/build-source_humble.yml +++ b/.github/workflows/build-source.yml @@ -1,4 +1,4 @@ -name: Source Build - Humble +name: Source Build on: workflow_dispatch: push: @@ -9,9 +9,12 @@ on: - cron: '03 3 * * *' jobs: - source: + source_build: uses: ./.github/workflows/reusable-ros-tooling-source-build.yml + strategy: + matrix: + ROS_DISTRO: [rolling, iron, humble] with: - ros_distro: humble + ros_distro: ${{ matrix.ROS_DISTRO }} ref: ros2-master - ros2_repo_branch: humble + ros2_repo_branch: ${{ matrix.ROS_DISTRO }} diff --git a/.github/workflows/build-source_iron.yml b/.github/workflows/build-source_iron.yml deleted file mode 100644 index 3ec6feb6..00000000 --- a/.github/workflows/build-source_iron.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Source Build - Iron -on: - workflow_dispatch: - push: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 3 * * *' - -jobs: - source: - uses: ./.github/workflows/reusable-ros-tooling-source-build.yml - with: - ros_distro: iron - ref: ros2-master - ros2_repo_branch: iron diff --git a/.github/workflows/build-source_rollling.yml b/.github/workflows/build-source_rollling.yml deleted file mode 100644 index 14dacac0..00000000 --- a/.github/workflows/build-source_rollling.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Source Build - Rolling -on: - workflow_dispatch: - push: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 3 * * *' - -jobs: - source: - uses: ./.github/workflows/reusable-ros-tooling-source-build.yml - with: - ros_distro: rolling - ref: ros2-master - ros2_repo_branch: rolling diff --git a/.github/workflows/debian-build.yml b/.github/workflows/debian-build.yml new file mode 100644 index 00000000..bd54edfd --- /dev/null +++ b/.github/workflows/debian-build.yml @@ -0,0 +1,21 @@ +name: Debian Source Build +on: + workflow_dispatch: + pull_request: + branches: + - ros2-master + schedule: + # Run every day to detect flakiness and broken dependencies + - cron: '03 5 * * *' + + +jobs: + debian_source_build: + uses: ./.github/workflows/reusable-debian-build.yml + strategy: + matrix: + ROS_DISTRO: [rolling, iron, humble] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + upstream_workspace: control_toolbox.${{ matrix.ROS_DISTRO }}.repos + ref_for_scheduled_build: ros2-master diff --git a/.github/workflows/humble-debian-build.yml b/.github/workflows/humble-debian-build.yml deleted file mode 100644 index 993fc603..00000000 --- a/.github/workflows/humble-debian-build.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Debian Humble Build -on: - workflow_dispatch: - pull_request: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 5 * * *' - - -jobs: - humble_debian: - name: Humble debian build - runs-on: ubuntu-latest - env: - ROS_DISTRO: humble - container: ghcr.io/ros-controls/ros:humble-debian - steps: - - uses: actions/checkout@v4 - with: - path: src/control_toolbox - - name: Build and test - shell: bash - run: | - source /opt/ros2_ws/install/setup.bash - vcs import src < src/control_toolbox/control_toolbox.${{ env.ROS_DISTRO }}.repos - colcon build - colcon test --packages-skip control_msgs - colcon test-result --verbose diff --git a/.github/workflows/humble-rhel-binary-build.yml b/.github/workflows/humble-rhel-binary-build.yml deleted file mode 100644 index 4851a834..00000000 --- a/.github/workflows/humble-rhel-binary-build.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: RHEL Humble Binary Build -on: - workflow_dispatch: - pull_request: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 3 * * *' - -jobs: - humble_rhel_binary: - name: Humble RHEL binary build - runs-on: ubuntu-latest - env: - ROS_DISTRO: humble - container: ghcr.io/ros-controls/ros:humble-rhel - steps: - - uses: actions/checkout@v4 - with: - path: src/control_toolbox - - name: Install dependencies - run: | - rosdep update --rosdistro $ROS_DISTRO - rosdep install -iyr --from-path src/control_toolbox || true - - name: Build and test - run: | - source /opt/ros/${{ env.ROS_DISTRO }}/setup.bash - source /opt/ros2_ws/install/setup.bash - colcon build - colcon test - colcon test-result --verbose diff --git a/.github/workflows/iron-debian-build.yml b/.github/workflows/iron-debian-build.yml deleted file mode 100644 index 73487d82..00000000 --- a/.github/workflows/iron-debian-build.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Debian Iron Build -on: - workflow_dispatch: - pull_request: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 5 * * *' - - -jobs: - iron_debian: - name: Iron debian build - runs-on: ubuntu-latest - env: - ROS_DISTRO: iron - container: ghcr.io/ros-controls/ros:iron-debian - steps: - - uses: actions/checkout@v4 - with: - path: src/control_toolbox - - name: Build and test - shell: bash - run: | - source /opt/ros2_ws/install/setup.bash - vcs import src < src/control_toolbox/control_toolbox.${{ env.ROS_DISTRO }}.repos - colcon build - colcon test --packages-skip control_msgs - colcon test-result --verbose diff --git a/.github/workflows/iron-rhel-binary-build.yml b/.github/workflows/iron-rhel-binary-build.yml deleted file mode 100644 index be517fb6..00000000 --- a/.github/workflows/iron-rhel-binary-build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: RHEL Iron Binary Build -on: - workflow_dispatch: - pull_request: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 3 * * *' - - -jobs: - iron_rhel_binary: - name: Iron RHEL binary build - runs-on: ubuntu-latest - env: - ROS_DISTRO: iron - container: ghcr.io/ros-controls/ros:iron-rhel - steps: - - uses: actions/checkout@v4 - with: - path: src/control_toolbox - - name: Install dependencies - run: | - rosdep update --rosdistro $ROS_DISTRO - rosdep install -iyr --from-path src/control_toolbox || true - - name: Build and test - # source also underlay workspace with generate_parameter_library on rhel9 - run: | - source /opt/ros/${{ env.ROS_DISTRO }}/setup.bash - source /opt/ros2_ws/install/setup.bash - colcon build - colcon test - colcon test-result --verbose diff --git a/.github/workflows/reusable-debian-build.yml b/.github/workflows/reusable-debian-build.yml new file mode 100644 index 00000000..7bf53f57 --- /dev/null +++ b/.github/workflows/reusable-debian-build.yml @@ -0,0 +1,78 @@ +name: Reusable Debian Source Build +# Reusable action to simplify dealing with debian source builds +# author: Christoph Froehlich + +on: + workflow_call: + inputs: + ros_distro: + description: 'ROS2 distribution name' + required: true + type: string + ref_for_scheduled_build: + description: 'Reference on which the repo should be checkout for scheduled build. Usually is this name of a branch or a tag.' + default: '' + required: false + type: string + upstream_workspace: + description: 'Path to local .repos file.' + default: '' + required: false + type: string + skip_packages: + description: 'Packages to skip from build and test' + default: '' + required: false + type: string + skip_packages_test: + description: 'Packages to skip from test additionally to skip_packages' + default: '' + required: false + type: string + + +jobs: + debian_source: + name: ${{ inputs.ros_distro }} debian build + runs-on: ubuntu-latest + env: + ROS_DISTRO: ${{ inputs.ros_distro }} + container: ghcr.io/ros-controls/ros:${{ inputs.ros_distro }}-debian + steps: + - name: Get repository name + # Extract the repository name from the GITHUB_REPOSITORY environment variable + # ${{ github.event.repository.name }} seems to be not working with act + run: echo "path=src/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV + - name: Checkout default ref when build is not scheduled + if: ${{ github.event_name != 'schedule' }} + uses: actions/checkout@v4 + with: + path: ${{ env.path }} + - name: Checkout ${{ inputs.ref_for_scheduled_build }} on scheduled build + if: ${{ github.event_name == 'schedule' }} + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref_for_scheduled_build }} + path: ${{ env.path }} + - name: Import upstream workspace + shell: bash + run: | + if [[ -n "${{ inputs.upstream_workspace }}" ]]; then + vcs import src < ${{ env.path }}/${{ inputs.upstream_workspace }} + fi + - name: Get list of packages + # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time + run: | + echo "package_list=$(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only)" >> $GITHUB_ENV + - name: Build workspace + shell: bash + run: | + source /opt/ros2_ws/install/setup.bash + colcon build --packages-up-to ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} + - name: Test workspace + shell: bash + continue-on-error: true + run: | + source /opt/ros2_ws/install/setup.bash + colcon test --packages-select ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} ${{ inputs.skip_packages_test }} + colcon test-result --verbose diff --git a/.github/workflows/reusable-rhel-binary-build.yml b/.github/workflows/reusable-rhel-binary-build.yml new file mode 100644 index 00000000..4dcdad00 --- /dev/null +++ b/.github/workflows/reusable-rhel-binary-build.yml @@ -0,0 +1,82 @@ +name: Reusable RHEL Binary Build +# Reusable action to simplify dealing with RHEL binary builds +# author: Christoph Froehlich + +on: + workflow_call: + inputs: + ros_distro: + description: 'ROS2 distribution name' + required: true + type: string + ref_for_scheduled_build: + description: 'Reference on which the repo should be checkout for scheduled build. Usually is this name of a branch or a tag.' + default: '' + required: false + type: string + upstream_workspace: + description: 'Path to local .repos file.' + default: '' + required: false + type: string + skip_packages: + description: 'Packages to skip from build and test' + default: '' + required: false + type: string + skip_packages_test: + description: 'Packages to skip from test additionally to skip_packages' + default: '' + required: false + type: string + +jobs: + rhel_binary: + name: ${{ inputs.ros_distro }} RHEL binary build + runs-on: ubuntu-latest + container: ghcr.io/ros-controls/ros:${{ inputs.ros_distro }}-rhel + steps: + - name: Get repository name + # Extract the repository name from the GITHUB_REPOSITORY environment variable + # ${{ github.event.repository.name }} seems to be not working with act + run: echo "path=src/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV + - name: Checkout default ref when build is not scheduled + if: ${{ github.event_name != 'schedule' }} + uses: actions/checkout@v4 + with: + path: ${{ env.path }} + - name: Checkout ${{ inputs.ref_for_scheduled_build }} on scheduled build + if: ${{ github.event_name == 'schedule' }} + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref_for_scheduled_build }} + path: ${{ env.path }} + - name: Install dependencies + shell: bash + run: | + source /opt/ros/${{ inputs.ros_distro }}/setup.bash + source /opt/ros2_ws/install/local_setup.bash + if [[ -n "${{ inputs.upstream_workspace }}" ]]; then + vcs import src < ${{ env.path }}/${{ inputs.upstream_workspace }} + fi + rosdep update + rosdep install -iyr --from-path src || true + - name: Get list of packages + # we need both paths, there is no wildcard/glob for packages defined in the root folder and subfolders at the same time + run: | + echo "package_list=$(colcon list --paths ${{ env.path }} --names-only) $(colcon list --paths ${{ env.path }}/* --names-only)" >> $GITHUB_ENV + - name: Build workspace + shell: bash + # source also underlay workspace with generate_parameter_library on rhel9 + run: | + source /opt/ros/${{ inputs.ros_distro }}/setup.bash + source /opt/ros2_ws/install/local_setup.bash + colcon build --packages-up-to ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} + - name: Test workspace + shell: bash + continue-on-error: true + run: | + source /opt/ros/${{ inputs.ros_distro }}/setup.bash + source /opt/ros2_ws/install/local_setup.bash + colcon test --packages-select ${{ env.package_list }} --packages-skip ${{ inputs.skip_packages }} ${{ inputs.skip_packages_test }} + colcon test-result --verbose diff --git a/.github/workflows/reviewer_lottery.yml b/.github/workflows/reviewer_lottery.yml new file mode 100644 index 00000000..ed28964e --- /dev/null +++ b/.github/workflows/reviewer_lottery.yml @@ -0,0 +1,14 @@ +name: Reviewer lottery +on: + pull_request_target: + types: [opened, ready_for_review, reopened] + +jobs: + test: + runs-on: ubuntu-latest + if: github.actor != 'dependabot[bot]' && github.actor != 'mergify[bot]' + steps: + - uses: actions/checkout@v4 + - uses: uesteibar/reviewer-lottery@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/rhel-semi-binary-build.yml b/.github/workflows/rhel-semi-binary-build.yml new file mode 100644 index 00000000..b80f2f6b --- /dev/null +++ b/.github/workflows/rhel-semi-binary-build.yml @@ -0,0 +1,21 @@ +name: RHEL Semi-Binary Build +on: + workflow_dispatch: + pull_request: + branches: + - ros2-master + schedule: + # Run every day to detect flakiness and broken dependencies + - cron: '03 3 * * *' + + +jobs: + rhel_semi_binary_build: + uses: ./.github/workflows/reusable-rhel-binary-build.yml + strategy: + matrix: + ROS_DISTRO: [rolling, iron, humble] + with: + ros_distro: ${{ matrix.ROS_DISTRO }} + upstream_workspace: control_toolbox.${{ matrix.ROS_DISTRO }}.repos + ref_for_scheduled_build: ros2-master diff --git a/.github/workflows/rolling-debian-build.yml b/.github/workflows/rolling-debian-build.yml deleted file mode 100644 index efcf3551..00000000 --- a/.github/workflows/rolling-debian-build.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Debian Rolling Build -on: - workflow_dispatch: - pull_request: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 5 * * *' - - -jobs: - rolling_debian: - name: Rolling debian build - runs-on: ubuntu-latest - env: - ROS_DISTRO: rolling - container: ghcr.io/ros-controls/ros:rolling-debian - steps: - - uses: actions/checkout@v4 - with: - path: src/control_toolbox - - name: Build and test - shell: bash - run: | - source /opt/ros2_ws/install/setup.bash - vcs import src < src/control_toolbox/control_toolbox.${{ env.ROS_DISTRO }}.repos - colcon build - colcon test - colcon test-result --verbose diff --git a/.github/workflows/rolling-rhel-binary-build.yml b/.github/workflows/rolling-rhel-binary-build.yml deleted file mode 100644 index c4ec45d4..00000000 --- a/.github/workflows/rolling-rhel-binary-build.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: RHEL Rolling Binary Build -on: - workflow_dispatch: - pull_request: - branches: - - ros2-master - schedule: - # Run every day to detect flakiness and broken dependencies - - cron: '03 3 * * *' - - -jobs: - rolling_rhel_binary: - name: Rolling RHEL binary build - runs-on: ubuntu-latest - env: - ROS_DISTRO: rolling - container: ghcr.io/ros-controls/ros:rolling-rhel - steps: - - uses: actions/checkout@v4 - with: - path: src/control_toolbox - - name: Install dependencies - run: | - rosdep update --rosdistro $ROS_DISTRO - rosdep install -iyr --from-path src/control_toolbox || true - - name: Build and test - # source also underlay workspace with generate_parameter_library on rhel9 - run: | - source /opt/ros/${{ env.ROS_DISTRO }}/setup.bash - source /opt/ros2_ws/install/setup.bash - colcon build - colcon test - colcon test-result --verbose diff --git a/control_toolbox-not-released.humble.repos b/control_toolbox-not-released.humble.repos new file mode 100644 index 00000000..1b3910e7 --- /dev/null +++ b/control_toolbox-not-released.humble.repos @@ -0,0 +1,6 @@ +repositories: + ## EXAMPLE DEPENDENCY +# : +# type: git +# url: git@github.com:/.git +# version: master diff --git a/control_toolbox-not-released.iron.repos b/control_toolbox-not-released.iron.repos new file mode 100644 index 00000000..1b3910e7 --- /dev/null +++ b/control_toolbox-not-released.iron.repos @@ -0,0 +1,6 @@ +repositories: + ## EXAMPLE DEPENDENCY +# : +# type: git +# url: git@github.com:/.git +# version: master diff --git a/control_toolbox-not-released.rolling.repos b/control_toolbox-not-released.rolling.repos new file mode 100644 index 00000000..1b3910e7 --- /dev/null +++ b/control_toolbox-not-released.rolling.repos @@ -0,0 +1,6 @@ +repositories: + ## EXAMPLE DEPENDENCY +# : +# type: git +# url: git@github.com:/.git +# version: master