Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Reusable CI #89

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 13 additions & 47 deletions .github/workflows/asan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,18 @@ name: asan
on:
pull_request:
schedule:
- cron: '42 0 * * *'
- cron: '23 0 * * *'
workflow_dispatch:

jobs:
asan:
name: asan
runs-on: ubuntu-22.04
container:
image: osrf/ros:iron-desktop-jammy
steps:
- name: create_blacklist
run: |
mkdir -p ${{ github.workspace }}/
touch ${{ github.workspace }}/blacklist.txt
echo "fun:*Eigen*" > ${{ github.workspace }}/blacklist.txt
- name: install_clang_and_tools
run: sudo apt update && sudo apt install -y clang clang-tools lld wget python3-pip python3-colcon-coveragepy-result python3-colcon-lcov-result lcov
- name: build_and_test
uses: ros-tooling/[email protected]
env:
CC: clang -fsanitize-blacklist=${{ github.workspace }}/blacklist.txt
CXX: clang++ -fsanitize-blacklist=${{ github.workspace }}/blacklist.txt
with:
target-ros2-distro: iron
# build all packages listed in the meta package
package-name: |
rmf_traffic
vcs-repo-file-url: |
https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
colcon-defaults: |
{
"build": {
"mixin": ["asan-gcc"],
"cmake-args": [
"-DCMAKE_BUILD_TYPE=Debug"]
}
}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- name: Upload failed test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ros_ws/build/*/test_results/*/*.catch2.xml
- name: upload_test_stream
uses: actions/upload-artifact@v2
with:
name: colcon-test-logs
path: ${{ steps.build_and_test.outputs.ros-workspace-directory-name }}/log
if: always()
build_and_test:
name: rmf_traffic-asan
uses: open-rmf/rmf_ci_templates/.github/workflows/reusable_asan.yaml@main
with:
dist-matrix: |
[{"ros_distribution": "humble",
"ubuntu_distribution": "jammy"}]
# NOTE: Avoid adding comments in the package lines, this can break some of the called scripts in github actions
packages: |
rmf_traffic
rmf_traffic_examples
68 changes: 8 additions & 60 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,68 +1,16 @@
name: build
on:
push:
pull_request:
schedule:
- cron: '55 0 * * *'
workflow_dispatch:

jobs:
build_and_test:
name: Build and test
runs-on: ubuntu-latest
strategy:
matrix:
ros_distribution:
- humble
- iron
- rolling
include:
# Humble Hawksbill (May 2022 - May 2027)
- ubuntu_distribution: jammy
ros_distribution: humble
ros_version: 2
# Iron Irwini (May 2023 - November 2024)
- ubuntu_distribution: jammy
ros_distribution: iron
ros_version: 2
# Rolling Ridley (No End-Of-Life)
- ubuntu_distribution: jammy
ros_distribution: rolling
ros_version: 2
container:
image: osrf/ros:${{ matrix.ros_distribution }}-desktop-${{ matrix.ubuntu_distribution }}
steps:
- name: pwd
run: pwd
- name: setup ROS environment
uses: ros-tooling/[email protected]
with:
required-ros-distributions: ${{ matrix.ros_distribution }}
- name: build
uses: ros-tooling/[email protected]
with:
target-ros2-distro: ${{ matrix.ros_distribution }}
# build all packages listed in the meta package
package-name: |
rmf_traffic
vcs-repo-file-url: |
https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
colcon-defaults: |
{
"build": {
"mixin": ["coverage-gcc"]
}
}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- name: Upload failed test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ros_ws/build/*/test_results/*/*.catch2.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
files: ros_ws/lcov/total_coverage.info
flags: tests
name: lean_and_mean_codecov_bot

name: rmf_traffic-build
uses: open-rmf/rmf_ci_templates/.github/workflows/reusable_build.yaml@main
with:
# NOTE: Avoid adding comments in the packages lines, this can break some of the called scripts in github actions
packages: |
rmf_traffic
rmf_traffic_examples
58 changes: 14 additions & 44 deletions .github/workflows/tsan.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,19 @@
name: tsan

on:
pull_request:
schedule:
- cron: '36 0 * * *'
workflow_dispatch:

jobs:
tsan:
name: tsan
runs-on: ubuntu-22.04
container:
image: osrf/ros:iron-desktop-jammy
steps:
- name: install_clang_and_tools
run: sudo apt update && sudo apt install -y clang clang-tools lld wget python3-pip python3-colcon-coveragepy-result python3-colcon-lcov-result lcov
- name: tsan_build_test
env:
CC: clang
CXX: clang++
uses: ros-tooling/[email protected]
id: tsan_build_test
with:
target-ros2-distro: iron
# build all packages listed in the meta package
package-name: |
rmf_traffic
vcs-repo-file-url: |
https://raw.githubusercontent.com/open-rmf/rmf/main/rmf.repos
colcon-defaults: |
{
"build": {
"mixin": ["tsan"],
"cmake-args": ["-DCMAKE_BUILD_TYPE=Debug"]
}
}
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml
- name: Upload failed test results
uses: actions/upload-artifact@v2
if: failure()
with:
name: test-results
path: ros_ws/build/*/test_results/*/*.catch2.xml
- name: upload_test_stream
uses: actions/upload-artifact@v2
with:
name: colcon-test-logs
path: ${{ steps.tsan_build_test.outputs.ros-workspace-directory-name }}/log
if: always()

tsan_test:
name: rmf_traffic-tsan
uses: open-rmf/rmf_ci_templates/.github/workflows/reusable_build.yaml@main
with:
dist-matrix: |
[{"ros_distribution": "humble",
"ubuntu_distribution": "jammy"}]
# NOTE: Avoid adding comments in the package lines, this can break some of the called scripts in github actions
packages: |
rmf_traffic
rmf_traffic_examples
mixin: tsan
Loading
Loading