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

Optimize for ForteFibre #1

Merged
merged 5 commits into from
Oct 30, 2024
Merged
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
1 change: 1 addition & 0 deletions .github/workflows/ansible-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: setup-universe

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
setup-universe:
Expand Down
48 changes: 0 additions & 48 deletions ansible/playbooks/openadkit.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions ansible/playbooks/rosdep.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion ansible/roles/cuda/vars/main.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
cuda__dash_case_cuda_version: '{{ cuda_version | regex_replace("\\.", "-", count=1) }}'
cuda__dash_case_cuda_version: '{{ cuda_version | regex_replace("\.", "-") }}'
17 changes: 1 addition & 16 deletions ansible/roles/docker_engine/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,11 @@
url: https://download.docker.com/linux/ubuntu/gpg
keyring: /etc/apt/keyrings/docker.gpg

- name: Save result of 'dpkg --print-architecture'
ansible.builtin.command: dpkg --print-architecture
register: docker_engine__deb_architecture
changed_when: false

- name: Save result of 'lsb_release -cs'
ansible.builtin.command: lsb_release -cs
register: docker_engine__lsb_release_cs
changed_when: false

- name: Save result of 'lsb_release -is'
ansible.builtin.command: lsb_release -is
register: docker_engine__lsb_release_is
changed_when: false

# echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- name: Add Docker apt repository to source list
become: true
ansible.builtin.apt_repository:
repo: deb [arch={{ docker_engine__deb_architecture.stdout }} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/{{ docker_engine__lsb_release_is.stdout | lower }} {{ docker_engine__lsb_release_cs.stdout }} stable
repo: deb [arch={{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }} signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} stable
filename: docker
state: present
update_cache: true
Expand Down
14 changes: 0 additions & 14 deletions ansible/roles/geographiclib/README.md

This file was deleted.

Empty file.
Empty file.
12 changes: 0 additions & 12 deletions ansible/roles/geographiclib/tasks/main.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions ansible/roles/rmw_implementation/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
rmw_implementation: rmw_cyclonedds_cpp
15 changes: 5 additions & 10 deletions ansible/roles/rmw_implementation/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
- name: Get dash-case name of rmw_implementation
ansible.builtin.shell: bash -c 'sed -e "s/_/-/g" <<< $(echo {{ rmw_implementation }})'
register: rmw_implementation__dash_case_rmw_implementation
changed_when: false

- name: Hold check of ros-{{ rosdistro + '-' + rmw_implementation__dash_case_rmw_implementation.stdout }}
- name: Hold check of {{ rmw_implementation__package_name }}
ansible.builtin.command: apt-mark showhold
register: held_ros_packages
changed_when: false

- name: Install ros-{{ rosdistro + '-' + rmw_implementation__dash_case_rmw_implementation.stdout }}
- name: Install {{ rmw_implementation__package_name }}
become: true
ansible.builtin.apt:
name: ros-{{ rosdistro }}-{{ rmw_implementation__dash_case_rmw_implementation.stdout }}
name: "{{ rmw_implementation__package_name }}"
state: latest
update_cache: true
when: "'ros-' + rosdistro + '-' + rmw_implementation__dash_case_rmw_implementation.stdout not in held_ros_packages.stdout"
when: "rmw_implementation__package_name not in held_ros_packages.stdout"
register: install_result
failed_when: false

- name: Display warning if ROS 2 RMW package is held
ansible.builtin.debug:
msg: ROS 2 RMW package 'ros-{{ rosdistro + '-' + rmw_implementation__dash_case_rmw_implementation.stdout }}' is apt-mark hold. Skipping installation.
msg: ROS 2 RMW package '{{ rmw_implementation__package_name }}' is apt-mark hold. Skipping installation.
when: not install_result.changed

- name: Add RMW_IMPLEMENTATION to .bashrc
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/rmw_implementation/vars/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
rmw_implementation__package_name: 'ros-{{ rosdistro }}-{{ rmw_implementation | regex_replace("_", "-") }}'
12 changes: 1 addition & 11 deletions ansible/roles/ros2/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,11 @@
dest: /usr/share/keyrings/ros-archive-keyring.gpg
mode: 644

- name: Save result of 'dpkg --print-architecture'
ansible.builtin.command: dpkg --print-architecture
register: ros2__deb_architecture
changed_when: false

- name: Save result of 'source /etc/os-release && echo $UBUNTU_CODENAME'
ansible.builtin.shell: bash -c 'source /etc/os-release && echo $UBUNTU_CODENAME'
register: ros2__ubuntu_codename
changed_when: false

# echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
- name: Add ROS 2 apt repository to source list
become: true
ansible.builtin.apt_repository:
repo: deb [arch={{ ros2__deb_architecture.stdout }} signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu {{ ros2__ubuntu_codename.stdout }} main
repo: deb [arch={{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }} signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu {{ ansible_distribution_release }} main
filename: ros2
state: present
update_cache: true
Expand Down