Test Isolation using linux namespaces #434
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Bazel Drake-ROS Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
jobs: | |
bazel_build_and_test: | |
if: "! contains(github.event.pull_request.labels.*.name, 'status: defer ci')" | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: "/home/runner/.cache/ci" | |
key: bazel | |
- name: Check cache | |
run: du -hs $(readlink -f /home/runner/.cache/ci) | |
- name: Simplify apt upgrades | |
run: .github/simplify_apt_and_upgrades.sh | |
- name: Configure drake_ros Bazel for CI | |
run: ln -s ../.github/ci.bazelrc ./user.bazelrc | |
working-directory: drake_ros | |
- name: Install ROS tools (like rosdep) | |
uses: ros-tooling/[email protected] | |
- name: Update rosdep data | |
run: rosdep update | |
- name: Install bazel_ros2_rules dependencies | |
# TODO(sloretz) make bazel_ros2_rules/setup/install_prereqs.sh | |
run: sudo apt --no-install-recommends install python3 python3-toposort | |
- name: Download Drake | |
run: bazel build @drake//:module_py | |
working-directory: drake_ros | |
- name: Install Drake's dependencies | |
run: yes | sudo ./bazel-drake_ros/external/drake/setup/ubuntu/install_prereqs.sh | |
working-directory: drake_ros | |
- name: Install ROS tarball's dependencies | |
# TODO(sloretz) can't use rosdep here because we need the archive downloaded, | |
# but can't download the archive with bazel until we have the dependencies installed | |
# so bazel_ros2_rules can inspect it. | |
run: sudo apt --no-install-recommends install -y libconsole-bridge-dev | |
# CI for drake_ros. | |
- name: Build drake_ros | |
run: bazel build //... | |
working-directory: drake_ros | |
- name: Test drake_ros | |
run: bazel test //... | |
working-directory: drake_ros | |
- name: Clean up drake_ros | |
run: bazel clean | |
working-directory: drake_ros | |
# CI for drake_ros_examples. | |
- name: Install additional ROS dependencies for drake_ros_examples | |
run: yes | sudo ./setup/install_prereqs.sh | |
working-directory: drake_ros_examples | |
- name: Configure drake_ros_examples Bazel for CI | |
run: ln -s ../.github/ci.bazelrc ./user.bazelrc | |
working-directory: drake_ros_examples | |
- name: Build drake_ros_examples | |
run: bazel build //... | |
working-directory: drake_ros_examples | |
- name: Test drake_ros_examples | |
run: bazel test //... | |
working-directory: drake_ros_examples |