Skip to content

Commit

Permalink
Feature/split repos (#348)
Browse files Browse the repository at this point in the history
* update repos filename

Signed-off-by: Masaya Kataoka <[email protected]>

* add upload artifact step

Signed-off-by: Masaya Kataoka <[email protected]>

* enable build docker image for wamv

Signed-off-by: Masaya Kataoka <[email protected]>

* add ansible step

Signed-off-by: Masaya Kataoka <[email protected]>

* update Dockerfile

Signed-off-by: Masaya Kataoka <[email protected]>

* specify platform

Signed-off-by: Masaya Kataoka <[email protected]>

* add move repos file step

Signed-off-by: Masaya Kataoka <[email protected]>

* modify tag

Signed-off-by: Masaya Kataoka <[email protected]>

* update Dockerfile

Signed-off-by: Masaya Kataoka <[email protected]>

* update description

Signed-off-by: Masaya Kataoka <[email protected]>

* update needs tag

Signed-off-by: Masaya Kataoka <[email protected]>

* use v3

Signed-off-by: Masaya Kataoka <[email protected]>

* modify step order

Signed-off-by: Masaya Kataoka <[email protected]>

* add debug step

Signed-off-by: Masaya Kataoka <[email protected]>

* rename tag

Signed-off-by: Masaya Kataoka <[email protected]>

* udpate Dockerfile

Signed-off-by: Masaya Kataoka <[email protected]>

* update Dockerfile

Signed-off-by: Masaya Kataoka <[email protected]>

* update pcl_type_adapter directory

Signed-off-by: Masaya Kataoka <[email protected]>

* update Dockerfile

Signed-off-by: Masaya Kataoka <[email protected]>

* move tcp_sender to the utility package

Signed-off-by: Masaya Kataoka <[email protected]>

* remove - uses: actions/checkout@v2

Signed-off-by: Masaya Kataoka <[email protected]>

* use checkout v4

Signed-off-by: Masaya Kataoka <[email protected]>

* remove unused files

Signed-off-by: Masaya Kataoka <[email protected]>

* empty commit

Signed-off-by: Masaya Kataoka <[email protected]>

* add python3-pip install line

Signed-off-by: Masaya Kataoka <[email protected]>

* add -DBUILD_TESTING=OFF option

Signed-off-by: Masaya Kataoka <[email protected]>

* change entrypoint path

Signed-off-by: Masaya Kataoka <[email protected]>

* remove vision_opencv package

Signed-off-by: Masaya Kataoka <[email protected]>

---------

Signed-off-by: Masaya Kataoka <[email protected]>
  • Loading branch information
hakuturu583 authored Aug 17, 2024
1 parent 26390f8 commit 55e0d12
Show file tree
Hide file tree
Showing 21 changed files with 203 additions and 60 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: ansible version
run: |
ansible-playbook --version
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: make robotx_ws
run: |
mkdir robotx_ws
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
name: setup_firmware
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: basic install
run: |
sudo apt install ansible
Expand All @@ -74,7 +74,7 @@ jobs:
name: setup_dataset
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: basic install
run: |
sudo apt install ansible
Expand All @@ -88,4 +88,4 @@ jobs:
status: ${{ job.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
2 changes: 1 addition & 1 deletion .github/workflows/check_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- BuildTest
- Release
steps:
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
get_template:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- uses: actions/upload-artifact@v2
with:
name: templates
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
with:
name: templates
path: ~/templates
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: OUXT-Polaris/${{ matrix.package_name }}
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker/auto_logger/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: basic install
run: |
sudo apt install make ansible
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: run ansible
run: |
ansible-playbook -i ansible/hosts/localhost.ini ansible/export_repos_full.yml --connection local --become -e ansible_user=ubuntu
ansible-playbook -i ansible/hosts/localhost.ini ansible/export_repos.yml --connection local --become -e ansible_user=ubuntu
- name: copy repos file
run: |
cp ansible/mv ansible/packages_exact.repos .github/workflows/docker/auto_logger/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker/dev_container/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
path: ./.github/workflows/docker/dev_container/tmp/ouxt_automation
clean: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker/l4t_opencv/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup QEMU user-mode emulation
Expand Down Expand Up @@ -59,4 +59,4 @@ runs:
platforms: linux/arm64/v8
no-cache: false
cache-from: type=registry,ref=wamvtan/l4t_opencv:${{ inputs.opencv_version }}-buildcache
push: false
push: false
2 changes: 1 addition & 1 deletion .github/workflows/docker/vrx/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docker/wamv/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repos
34 changes: 34 additions & 0 deletions .github/workflows/docker/wamv/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM docker.io/hakuturu583/cuda_ros:lt4-humble-cuda-12.2.2-devel
SHELL ["/bin/bash", "-c"]

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python3-vcstool git python3-colcon-common-extensions python3-rosdep python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN mkdir -p /wamv_ws/src
WORKDIR /wamv_ws/src
COPY ./repos/packages_exact.repos packages_exact.repos
RUN vcs import . < packages_exact.repos
WORKDIR ../
ENV USE_NCCL 0
ENV USE_DISTRIBUTED 1
ENV TORCH_CUDA_ARCH_LIST 8.7
RUN rosdep init && rosdep update

RUN --mount=type=cache,target=/wamv_ws/build source /opt/ros/$ROS_DISTRO/setup.bash && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
rosdep install -iry --from-paths src && \
apt-get clean &&\
rm -rf /var/lib/apt/lists/*

RUN source /opt/ros/$ROS_DISTRO/setup.bash && \
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF

ADD entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
55 changes: 55 additions & 0 deletions .github/workflows/docker/wamv/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Build WAM-V image action"
description: "Build WAM-V docker images"

inputs:
docker_username:
description: "Username for Dockerhub"
required: true
docker_password:
description: "Password for Dockerhub"
required: true
module:
description: "Software module"
required: true

runs:
using: "composite"
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
- name: Build and Push Docker Image
if: ${{ github.event_name != 'pull_request'}}
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
context: ./.github/workflows/docker/wamv
file: ./.github/workflows/docker/wamv/Dockerfile
tags: wamvtan/wamv_${{ inputs.module }}:latest
no-cache: false
cache-from: type=registry,ref=wamvtan/wamv_${{ inputs.module }}:buildcache
cache-to: type=registry,ref=wamvtan/wamv_${{ inputs.module }}:buildcache,mode=max
push: true
platforms: linux/arm64/v8
- name: Build Docker Image
if: ${{ github.event_name == 'pull_request'}}
uses: docker/build-push-action@v2
env:
DOCKER_BUILDKIT: 1
with:
username: ${{ inputs.docker_username }}
password: ${{ inputs.docker_password }}
context: ./.github/workflows/docker/wamv
file: ./.github/workflows/docker/wamv/Dockerfile
tags: wamvtan/wamv_${{ inputs.module }}:latest
no-cache: false
cache-from: type=registry,ref=wamvtan/wamv_${{ inputs.module }}:buildcache
push: false
platforms: linux/arm64/v8
7 changes: 7 additions & 0 deletions .github/workflows/docker/wamv/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

source "/opt/ros/humble/setup.bash"
source /wamv_ws/install/setup.sh

exec "$@"
2 changes: 1 addition & 1 deletion .github/workflows/docker/yolox/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker/yolox_trainer/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
Expand Down
54 changes: 48 additions & 6 deletions .github/workflows/docker_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
matrix:
opencv_version: ["4.4.0", "4.5.0"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/cleanup_runner
- uses: ./.github/workflows/docker/l4t_opencv
with:
Expand All @@ -46,7 +46,7 @@ jobs:
# gui: vnc
# entrypoint: entrypoint_vnc.sh
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# - uses: ./.github/workflows/actions/cleanup_runner
# - uses: ./.github/workflows/docker/dev_container
# with:
Expand All @@ -60,7 +60,7 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/cleanup_runner
- uses: ./.github/workflows/docker/yolox
with:
Expand All @@ -76,7 +76,7 @@ jobs:
os: [linux-x64]
runner_version: [2.295.0]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/cleanup_runner
- uses: ./.github/workflows/docker/yolox_trainer
with:
Expand All @@ -89,7 +89,7 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/cleanup_runner
- uses: ./.github/workflows/docker/vrx
with:
Expand All @@ -100,9 +100,51 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/cleanup_runner
- uses: ./.github/workflows/docker/vrx
with:
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
export_wamv_repos:
name: export_wamv_repos
runs-on: ubuntu-22.04
timeout-minutes: 360
strategy:
matrix:
module: ["perception", "control", "drivers", "localization", "planning"]
steps:
- uses: actions/checkout@v4
- name: basic install
run: |
sudo apt install ansible
- name: Export repos file
run: ansible-playbook -i ansible/hosts/localhost.ini ansible/export_repos.yml --connection local -t ${{ matrix.module }} -t utility --become -e ansible_user=ubuntu
- uses: actions/upload-artifact@v3
with:
name: repos_file_${{ matrix.module }}
path: |
ansible/packages.repos
ansible/packages_exact.repos
wamv:
needs: export_wamv_repos
name: build and push wamvtan/wamv
runs-on: ubuntu-22.04
timeout-minutes: 360
strategy:
matrix:
module: ["perception", "control", "drivers", "localization", "planning"]
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/cleanup_runner
- uses: actions/download-artifact@v3
with:
name: repos_file_${{ matrix.module }}
path: ./.github/workflows/docker/wamv/repos
- run: ls ./.github/workflows/docker/wamv/repos
- run: cat ./.github/workflows/docker/wamv/repos/packages_exact.repos
- uses: ./.github/workflows/docker/wamv
with:
docker_username: ${{ secrets.DOCKER_USERNAME }}
docker_password: ${{ secrets.DOCKER_PASSWORD }}
module: ${{ matrix.module }}
4 changes: 2 additions & 2 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: build document
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v1
with:
Expand All @@ -35,4 +35,4 @@ jobs:
if: ${{ github.event_name != 'pull_request'}}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/site
publish_dir: docs/site
8 changes: 4 additions & 4 deletions .github/workflows/generate_rosdep_yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
- name: ansible version
run: |
ansible-playbook --version
- uses: actions/checkout@v2-beta
- uses: actions/checkout@v4
- name: run ansible
run: |
ansible-playbook -i ansible/hosts/localhost.ini ansible/export_repos_full.yml --connection local --become -e ansible_user=ubuntu
ansible-playbook -i ansible/hosts/localhost.ini ansible/export_repos.yml --connection local --become -e ansible_user=ubuntu
- name: run script
run: |
python3 generate_rosdep_yaml.py ../robotx_ws/src/
Expand All @@ -41,7 +41,7 @@ jobs:
runs-on: ubuntu-22.04
needs: generate_rosdep_yaml
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
repository: OUXT-Polaris/ouxt_distro
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
Expand Down Expand Up @@ -97,4 +97,4 @@ jobs:
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
pull-request-number: ${{ steps.create_pull_request.outputs.pull-request-number }}
merge-method: squash
repository: OUXT-Polaris/ouxt_distro
repository: OUXT-Polaris/ouxt_distro
11 changes: 11 additions & 0 deletions ansible/export_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: Export repos file of development workspace
hosts: all
roles:
- role: ros2
tags: always
- role: create_workspace
tags: always
- role: clone_packages
- role: export_repos
tags: always
8 changes: 0 additions & 8 deletions ansible/export_repos_full.yml

This file was deleted.

Loading

0 comments on commit 55e0d12

Please sign in to comment.