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

feat: component-wise launches #158

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
12 changes: 0 additions & 12 deletions .github/workflows/docker-build-and-push-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

docker-build-and-push:
needs: load-env
runs-on: buildjet-16vcpu-ubuntu-2204-arm

Check warning on line 17 in .github/workflows/docker-build-and-push-arm64.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (buildjet)

Check warning on line 17 in .github/workflows/docker-build-and-push-arm64.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (vcpu)
steps:
- name: Check if PR author is the specific user
id: author-check
Expand Down Expand Up @@ -50,12 +50,6 @@
ansible/**
docker/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/free-disk-space

- name: Build 'Autoware' without CUDA
if: ${{ steps.author-check.outputs.author-found == 'true' ||
steps.changed-files.outputs.any_changed == 'true' ||
Expand Down Expand Up @@ -84,7 +78,7 @@

docker-build-and-push-cuda:
needs: [load-env, docker-build-and-push]
runs-on: buildjet-16vcpu-ubuntu-2204-arm

Check warning on line 81 in .github/workflows/docker-build-and-push-arm64.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (buildjet)

Check warning on line 81 in .github/workflows/docker-build-and-push-arm64.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (vcpu)
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -107,12 +101,6 @@
ansible/**
docker/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/free-disk-space

- name: Build 'Autoware' with CUDA
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

docker-build-and-push:
needs: load-env
runs-on: buildjet-16vcpu-ubuntu-2204

Check warning on line 17 in .github/workflows/docker-build-and-push.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (buildjet)

Check warning on line 17 in .github/workflows/docker-build-and-push.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (vcpu)
steps:
- name: Check if PR author is the specific user
id: author-check
Expand Down Expand Up @@ -50,12 +50,6 @@
ansible/**
docker/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/free-disk-space

- name: Build 'Autoware' without CUDA
if: ${{ steps.author-check.outputs.author-found == 'true' ||
steps.changed-files.outputs.any_changed == 'true' ||
Expand Down Expand Up @@ -84,7 +78,7 @@

docker-build-and-push-cuda:
needs: [load-env, docker-build-and-push]
runs-on: buildjet-16vcpu-ubuntu-2204

Check warning on line 81 in .github/workflows/docker-build-and-push.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (buildjet)

Check warning on line 81 in .github/workflows/docker-build-and-push.yaml

View workflow job for this annotation

GitHub Actions / spell-check-differential

Unknown word (vcpu)
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -107,12 +101,6 @@
ansible/**
docker/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/free-disk-space

- name: Build 'Autoware' with CUDA
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
Expand Down
16 changes: 16 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ FROM rosdep-depend AS rosdep-universe-sensing-perception-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

COPY src/universe/autoware.universe/launch/tier4_perception_launch /autoware/src/universe/autoware.universe/launch/tier4_perception_launch
COPY src/universe/autoware.universe/launch/tier4_sensing_launch /autoware/src/universe/autoware.universe/launch/tier4_sensing_launch
COPY src/universe/autoware.universe/perception /autoware/src/universe/autoware.universe/perception
COPY src/universe/autoware.universe/sensing /autoware/src/universe/autoware.universe/sensing
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
Expand All @@ -64,6 +66,8 @@ FROM rosdep-depend AS rosdep-universe-localization-mapping-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

COPY src/universe/autoware.universe/launch/tier4_localization_launch /autoware/src/universe/autoware.universe/launch/tier4_localization_launch
COPY src/universe/autoware.universe/launch/tier4_map_launch /autoware/src/universe/autoware.universe/launch/tier4_map_launch
COPY src/universe/autoware.universe/localization /autoware/src/universe/autoware.universe/localization
COPY src/universe/autoware.universe/map /autoware/src/universe/autoware.universe/map
RUN /autoware/resolve_rosdep_keys.sh /autoware/src ${ROS_DISTRO} \
Expand All @@ -77,6 +81,8 @@ FROM rosdep-depend AS rosdep-universe-planning-control-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

COPY src/universe/autoware.universe/launch/tier4_control_launch /autoware/src/universe/autoware.universe/launch/tier4_control_launch
COPY src/universe/autoware.universe/launch/tier4_planning_launch /autoware/src/universe/autoware.universe/launch/tier4_planning_launch
COPY src/universe/autoware.universe/control /autoware/src/universe/autoware.universe/control
COPY src/universe/autoware.universe/planning /autoware/src/universe/autoware.universe/planning
# TODO(youtalk): Remove COPYs when https://github.com/autowarefoundation/autoware.universe/issues/8805 is resolved
Expand All @@ -95,6 +101,8 @@ FROM rosdep-depend AS rosdep-universe-vehicle-system-depend
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO

COPY src/universe/autoware.universe/launch/tier4_vehicle_launch /autoware/src/universe/autoware.universe/launch/tier4_vehicle_launch
COPY src/universe/autoware.universe/launch/tier4_system_launch /autoware/src/universe/autoware.universe/launch/tier4_system_launch
COPY src/universe/autoware.universe/vehicle /autoware/src/universe/autoware.universe/vehicle
COPY src/universe/autoware.universe/system /autoware/src/universe/autoware.universe/system
COPY src/universe/autoware.universe/map/autoware_map_height_fitter /autoware/src/universe/autoware.universe/map/autoware_map_height_fitter
Expand Down Expand Up @@ -211,6 +219,8 @@ RUN --mount=type=ssh \

# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_perception_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_perception_launch \
--mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_sensing_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_sensing_launch \
--mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/perception,target=/autoware/src/universe/autoware.universe/perception \
--mount=type=bind,from=rosdep-universe-sensing-perception-depend,source=/autoware/src/universe/autoware.universe/sensing,target=/autoware/src/universe/autoware.universe/sensing \
source /opt/ros/"$ROS_DISTRO"/setup.bash \
Expand Down Expand Up @@ -263,6 +273,8 @@ RUN --mount=type=ssh \

# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_localization_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_localization_launch \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_map_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_map_launch \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/localization,target=/autoware/src/universe/autoware.universe/localization \
--mount=type=bind,from=rosdep-universe-localization-mapping-depend,source=/autoware/src/universe/autoware.universe/map,target=/autoware/src/universe/autoware.universe/map \
source /opt/ros/"$ROS_DISTRO"/setup.bash \
Expand All @@ -285,6 +297,8 @@ RUN --mount=type=ssh \

# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_control_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_control_launch \
--mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_planning_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_planning_launch \
--mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/control,target=/autoware/src/universe/autoware.universe/control \
--mount=type=bind,from=rosdep-universe-planning-control-depend,source=/autoware/src/universe/autoware.universe/planning,target=/autoware/src/universe/autoware.universe/planning \
# TODO(youtalk): Remove --mount options when https://github.com/autowarefoundation/autoware.universe/issues/8805 is resolved
Expand Down Expand Up @@ -315,6 +329,8 @@ RUN --mount=type=ssh \

# hadolint ignore=SC1091
RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_vehicle_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_vehicle_launch \
--mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/launch/tier4_system_launch,target=/autoware/src/universe/autoware.universe/launch/tier4_system_launch \
--mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/vehicle,target=/autoware/src/universe/autoware.universe/vehicle \
--mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/system,target=/autoware/src/universe/autoware.universe/system \
--mount=type=bind,from=rosdep-universe-vehicle-system-depend,source=/autoware/src/universe/autoware.universe/map/autoware_map_height_fitter,target=/autoware/src/universe/autoware.universe/map/autoware_map_height_fitter \
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/build_and_clean.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function build_and_clean() {
local ccache_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/cleanup_apt.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function cleanup_apt() {
local apt_clean=$1
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/cleanup_system.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function cleanup_system() {
local lib_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion docker/scripts/resolve_rosdep_keys.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -eo pipefail

function resolve_rosdep_keys() {
local src_path=$1
Expand Down
Loading