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(docker): integrate cuda/no-cuda jobs into single job #5363

Merged
merged 28 commits into from
Nov 7, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
divide jobs
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>
youtalk committed Oct 23, 2024
commit 48b0c5f53ccdd0877e74a949e7d9b314d5b6ad94
19 changes: 17 additions & 2 deletions .github/workflows/docker-build-and-push-arm64.yaml
Original file line number Diff line number Diff line change
@@ -61,9 +61,24 @@ 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: Show disk space
run: |
df -h

docker-build-and-push-cuda:
needs: docker-build-and-push
runs-on: buildjet-16vcpu-ubuntu-2204-arm
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: Build 'Autoware' with CUDA
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
github.event_name == 'workflow_dispatch' ||
if: ${{ github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/docker-build-and-push-cuda
with:
34 changes: 34 additions & 0 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
@@ -77,3 +77,37 @@ jobs:
if: always()
run: |
df -h

docker-build-and-push-cuda:
needs: docker-build-and-push
runs-on: buildjet-16vcpu-ubuntu-2204
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: Build 'Autoware' with CUDA
if: ${{ steps.author-check.outputs.author-found == 'true' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'push' && github.ref_type == 'tag') }}
uses: ./.github/actions/docker-build-and-push-cuda
with:
platform: amd64
bake-target: autoware
build-args: |
*.platform=linux/amd64
*.args.ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
*.args.BASE_IMAGE=${{ needs.load-env.outputs.base_image }}
*.args.LIB_DIR=x86_64
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-cuda-${{ github.head_ref }}
*.cache-from=type=registry,ref=${{ github.repository }}-buildcache:amd64-cuda-main
*.cache-to=type=registry,ref=${{ github.repository }}-buildcache:amd64-cuda-${{ github.head_ref }},mode=max
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Show disk space
run: |
df -h