Skip to content

Commit

Permalink
Update CI configration to supprot galactic and rolling (UniversalRobo…
Browse files Browse the repository at this point in the history
…ts#142)

* Make binary build really a build based on released binaries only.

* Add binary builds for galactic and rolling.

* Base coverage build on rolling.

* Add source builds for all distros and correct the branch names there.

* Unify files for better maintability.

* Correct names and add semi-binary build.

* Add CI description into README.md

* Delete ci-ursim.yml

* Update CI with non-released packages setup for each distro.

* Correct spelling.

* Update Universal_Robots_ROS2_Driver-not-released.rolling.repos

* Add ccache to binary build.

* Add ccache into semi-binary build.

* Separate CI configuraitons.

* Update ci-build-binary-foxy.yml

* Update ci-build-binary-galactic.yml

* Update ci-build-binary-rolling.yml

* Update ci-build-binary-foxy.yml

* Update ci-build-binary-galactic.yml

* Remove foxy builds from main CI workflows.

* Remove deprecated code.

* Correct compilation on rolling.
  • Loading branch information
destogl authored Sep 9, 2021
1 parent 4cde711 commit 5dd56d9
Show file tree
Hide file tree
Showing 16 changed files with 295 additions and 84 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci-build-binary-galactic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Binary Build - Galactic
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '43 8 * * *'

jobs:
galactic_binary:
name: galactic binary build
runs-on: ubuntu-latest
strategy:
matrix:
env:
- {ROS_DISTRO: galactic, ROS_REPO: main}
- {ROS_DISTRO: galactic, ROS_REPO: testing}
env:
UPSTREAM_WORKSPACE: Universal_Robots_ROS2_Driver-not-released.${{ matrix.env.ROS_DISTRO }}.repos
DOCKER_RUN_OPTS: --network static_test_net
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
IMMEDIATE_TEST_OUTPUT: true
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
steps:
- uses: actions/checkout@v1
- name: start ursim
run: |
.github/dockerursim/build_and_run_docker_ursim.sh
# 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/[email protected]
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/[email protected]
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
61 changes: 61 additions & 0 deletions .github/workflows/ci-build-binary-rolling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Binary Build - Rolling
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '43 8 * * *'

jobs:
rolling_binary:
name: rolling binary build
runs-on: ubuntu-latest
strategy:
matrix:
env:
- {ROS_DISTRO: rolling, ROS_REPO: main}
- {ROS_DISTRO: rolling, ROS_REPO: testing}
env:
UPSTREAM_WORKSPACE: Universal_Robots_ROS2_Driver-not-released.${{ matrix.env.ROS_DISTRO }}.repos
DOCKER_RUN_OPTS: --network static_test_net
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
IMMEDIATE_TEST_OUTPUT: true
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
steps:
- uses: actions/checkout@v1
- name: start ursim
run: |
.github/dockerursim/build_and_run_docker_ursim.sh
# 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/[email protected]
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/[email protected]
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
32 changes: 0 additions & 32 deletions .github/workflows/ci-build-binary.yml

This file was deleted.

11 changes: 3 additions & 8 deletions .github/workflows/ci-build-coverage.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Coverage Build
on:
pull_request:
push:
branches:
- master
- develop
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '58 8 * * *'
- main

jobs:
coverage:
Expand All @@ -18,14 +13,14 @@ jobs:
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: foxy
required-ros-distributions: rolling
- uses: actions/checkout@v1
- name: start ursim
run: |
.github/dockerursim/build_and_run_docker_ursim.sh
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: foxy
target-ros2-distro: rolling
# build all packages listed in the meta package
package-name:
ur_bringup
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/ci-build-semi-binary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Semi-Binary Build
on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '43 8 * * *'

jobs:
binary:
name: binary build
runs-on: ubuntu-latest
strategy:
matrix:
env:
- {ROS_DISTRO: galactic, ROS_REPO: main}
- {ROS_DISTRO: galactic, ROS_REPO: testing}
- {ROS_DISTRO: rolling, ROS_REPO: main}
- {ROS_DISTRO: rolling, ROS_REPO: testing}
env:
UPSTREAM_WORKSPACE: Universal_Robots_ROS2_Driver.repos
DOCKER_RUN_OPTS: --network static_test_net
BEFORE_INIT: 'apt-get update -qq && apt-get install -y iproute2 iputils-ping && ip addr && ping -c5 192.168.56.101'
IMMEDIATE_TEST_OUTPUT: true
CCACHE_DIR: ${{ github.workspace }}/.ccache
BASEDIR: ${{ github.workspace }}/.work
CACHE_PREFIX: ${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
steps:
- uses: actions/checkout@v1
- name: start ursim
run: |
.github/dockerursim/build_and_run_docker_ursim.sh
# 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/[email protected]
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/[email protected]
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
50 changes: 44 additions & 6 deletions .github/workflows/ci-build-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,61 @@ name: Source Build
on:
push:
branches:
- master
- develop
- main
schedule:
# Run every morning to detect flakiness and broken dependencies
- cron: '43 1 * * *'

jobs:
source:
name: source build
galactic_source:
name: galactic source build
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: galactic
- uses: actions/checkout@v1
- name: start ursim
run: |
.github/dockerursim/build_and_run_docker_ursim.sh
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: galactic
# build all packages listed in the meta package
package-name:
ur_bringup
ur_controllers
ur_dashboard_msgs
ur_description
ur_moveit_config
ur_robot_driver
vcs-repo-file-url: |
https://raw.githubusercontent.com/ros2/ros2/galactic/ros2.repos
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/Universal_Robots_ROS2_Driver.repos
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- uses: actions/upload-artifact@v1
with:
name: colcon-logs-${{ matrix.os }}
path: ros_ws/log

rolling_source:
name: rolling source build
runs-on: ubuntu-20.04
strategy:
fail-fast: false
steps:
- uses: ros-tooling/[email protected]
with:
required-ros-distributions: rolling
- uses: actions/checkout@v1
- name: start ursim
run: |
.github/dockerursim/build_and_run_docker_ursim.sh
- uses: ros-tooling/[email protected]
with:
target-ros2-distro: foxy
target-ros2-distro: rolling
# build all packages listed in the meta package
package-name:
ur_bringup
Expand All @@ -28,7 +66,7 @@ jobs:
ur_moveit_config
ur_robot_driver
vcs-repo-file-url: |
https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos
https://raw.githubusercontent.com/ros2/ros2/rolling/ros2.repos
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/Universal_Robots_ROS2_Driver.repos
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- uses: actions/upload-artifact@v1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/ci-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
pull_request:
push:
branches:
- master
- develop
- main

jobs:
pre-commit:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-ros-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
with:
distribution: foxy
distribution: rolling
linter: ${{ matrix.linter }}
package-name:
ur_bringup
Expand All @@ -37,7 +37,7 @@ jobs:
- uses: ros-tooling/[email protected]
- uses: ros-tooling/[email protected]
with:
distribution: foxy
distribution: rolling
linter: cpplint
arguments: "--linelength=120"
package-name:
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/ci-ursim.yml

This file was deleted.

Loading

0 comments on commit 5dd56d9

Please sign in to comment.