Skip to content

Commit

Permalink
Merge branch 'main' into refactor-docker-build-and-push
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzkaganozt authored Jun 10, 2024
2 parents 7c209e6 + 226be42 commit c4d0771
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ jobs:
- cuda
include:
- name: no-cuda
platform: arm64
base_image_env: base_image
lib_dir: aarch64
setup-args: --no-nvidia
additional-tag-suffix: ""
- name: cuda
platform: arm64
base_image_env: base_image
lib_dir: aarch64
additional-tag-suffix: -cuda
Expand All @@ -57,13 +59,13 @@ jobs:
with:
bake-target: autoware
build-args: |
*.platform=linux/arm64
*.platform=linux/${{ matrix.platform }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64,mode=max
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: false
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/build-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ jobs:
- cuda
include:
- name: no-cuda
platform: amd64
base_image_env: base_image
lib_dir: x86_64
setup-args: --no-nvidia
additional-tag-suffix: ""
- name: cuda
platform: amd64
base_image_env: base_image
lib_dir: x86_64
additional-tag-suffix: -cuda
Expand All @@ -52,13 +54,13 @@ jobs:
with:
bake-target: autoware
build-args: |
*.platform=linux/amd64
*.platform=linux/${{ matrix.platform }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64,mode=max
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: false
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/docker-build-and-push-main-self-hosted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ jobs:
- cuda
include:
- name: no-cuda
platform: arm64
base_image_env: base_image
lib_dir: aarch64
setup-args: --no-nvidia
additional-tag-suffix: ""
- name: cuda
platform: arm64
base_image_env: base_image
lib_dir: aarch64
additional-tag-suffix: -cuda
Expand All @@ -69,13 +71,13 @@ jobs:
with:
bake-target: autoware
build-args: |
*.platform=linux/arm64
*.platform=linux/${{ matrix.platform }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-arm64,mode=max
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-arm64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/docker-build-and-push-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ jobs:
include:
- name: no-cuda
base_image_env: base_image
platform: amd64
lib_dir: x86_64
setup-args: --no-nvidia
additional-tag-suffix: ""
- name: cuda
base_image_env: base_image
platform: amd64
lib_dir: x86_64
additional-tag-suffix: -cuda
steps:
Expand All @@ -64,13 +66,13 @@ jobs:
with:
bake-target: autoware
build-args: |
*.platform=linux/amd64
*.platform=linux/${{ matrix.platform }}
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs[format('{0}', matrix.base_image_env)] }}
*.args.SETUP_ARGS=${{ matrix.setup-args }}
*.args.LIB_DIR=${{ matrix.lib_dir }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-amd64,mode=max
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }}
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}:buildcache-${{ matrix.name }}-${{ matrix.platform }},mode=max
tag-suffix: ${{ matrix.additional-tag-suffix }}-amd64
tag-prefix: ${{ needs.load-env.outputs.rosdistro }}
allow-push: true
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ RUN --mount=type=ssh \
COPY --from=src-imported /autoware/src /autoware/src
RUN --mount=type=cache,target=${CCACHE_DIR} \
source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --cmake-args \
" -Wno-dev" \
" --no-warn-unused-cli" \
&& colcon build --cmake-args \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
" -Wno-dev" \
" --no-warn-unused-cli" \
&& find /autoware/install -type d -exec chmod 777 {} \; \
&& chmod -R 777 /var/tmp/ccache \
&& rm -rf /autoware/build /autoware/src
Expand Down

0 comments on commit c4d0771

Please sign in to comment.