Skip to content

Commit

Permalink
Add seperate workflow for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Oguz Ozturk <[email protected]>
  • Loading branch information
oguzkaganozt committed Jan 30, 2025
1 parent 9544556 commit 3ced52a
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 16 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/docker-build-and-push-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,22 @@ jobs:
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max
- name: Build 'Tools'
uses: ./.github/actions/docker-build-and-push-tools
with:
platform: arm64
target-image: autoware-tools
build-args: |
*.platform=linux/arm64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }}
*.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }}
*.args.LIB_DIR=aarch64
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max
# TODO: Uncomment once arm64 builds are FIXED
# - name: Build 'Tools'
# uses: ./.github/actions/docker-build-and-push-tools
# with:
# platform: arm64
# target-image: autoware-tools
# build-args: |
# *.platform=linux/arm64
# *.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
# *.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
# *.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }}
# *.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }}
# *.args.LIB_DIR=aarch64
# *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }}
# *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-main
# *.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:arm64-${{ github.ref_name }},mode=max

- name: Show disk space
if: always()
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/docker-build-and-push-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: docker-build-and-push-tools

on:
# TODO: Remove after tests are completed
pull_request:
branches:
- main
push:
branches:
- main
tags:
- "*.*.*"
workflow_dispatch:

jobs:
load-env:
uses: ./.github/workflows/load-env.yaml

docker-build-and-push-tools:
needs: load-env
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
*.env
*.repos
.github/actions/docker-build-and-push*/action.yaml
.github/workflows/docker-build-and-push*.yaml
ansible-galaxy-requirements.yaml
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 'Tools'
uses: ./.github/actions/docker-build-and-push-tools
with:
platform: amd64
target-image: autoware-tools
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }}
*.args.AUTOWARE_BASE_CUDA_IMAGE=${{ needs.load-env.outputs.autoware_base_cuda_image }}
*.args.LIB_DIR=x86_64
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-main
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:amd64-${{ github.ref_name }},mode=max
- name: Show disk space
if: always()
run: |
df -h
4 changes: 3 additions & 1 deletion docker/tools/Dockerfile.simulator
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### Builder
FROM ghcr.io/autowarefoundation/autoware:universe-devel AS builder
# TODO: Remove architecture specific image after arm64 builds are FIXED
FROM ghcr.io/autowarefoundation/autoware:universe-devel-amd64 AS builder
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
ARG LIB_DIR
Expand Down Expand Up @@ -35,6 +36,7 @@ RUN /autoware/resolve_rosdep_keys.sh /autoware/src/simulator ${ROS_DISTRO} \
&& cat /rosdep-simulator-depend-packages.txt

### Simulator
# TODO: Remove architecture specific image after arm64 builds are FIXED
FROM ghcr.io/autowarefoundation/autoware:universe-visualization-amd64 AS simulator
ARG ROS_DISTRO
ARG LIB_DIR
Expand Down
2 changes: 2 additions & 0 deletions docker/tools/Dockerfile.visualizer
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### Builder
# TODO: Remove architecture specific image after arm64 builds are working
FROM ghcr.io/autowarefoundation/autoware:universe-visualization-devel-amd64 AS builder
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV CCACHE_DIR="/root/.ccache"
Expand Down Expand Up @@ -35,6 +36,7 @@ RUN source /opt/ros/"$ROS_DISTRO"/setup.bash && source /opt/autoware/setup.bash
&& cat /rosdep-visualizer-depend-packages.txt

### Visualizer
# TODO: Remove architecture specific image after arm64 builds are working
FROM ghcr.io/autowarefoundation/autoware:universe-visualization-amd64 AS visualizer
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ARG ROS_DISTRO
Expand Down

0 comments on commit 3ced52a

Please sign in to comment.