From a7ec23d9b56effce18d119c49bd08dca0f6af388 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Mon, 11 Nov 2024 19:56:58 +0900 Subject: [PATCH] separate jobs Signed-off-by: Yutaka Kondo --- .../docker-build-and-push-cuda/action.yaml | 13 ++++++++ .../docker-build-and-push-arm64.yaml | 30 +++++++++++++++++++ .github/workflows/docker-build-and-push.yaml | 30 +++++++++++++++++++ 3 files changed, 73 insertions(+) diff --git a/.github/actions/docker-build-and-push-cuda/action.yaml b/.github/actions/docker-build-and-push-cuda/action.yaml index 3c6e111ab8b..cd992b5d6c2 100644 --- a/.github/actions/docker-build-and-push-cuda/action.yaml +++ b/.github/actions/docker-build-and-push-cuda/action.yaml @@ -15,6 +15,19 @@ inputs: runs: using: composite steps: + - name: Install jq and vcstool + run: | + sudo apt-get -y update + sudo apt-get -y install jq python3-pip + pip install --no-cache-dir vcstool + shell: bash + + - name: Run vcs import + run: | + mkdir src + vcs import src < autoware.repos + shell: bash + - name: Setup Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/docker-build-and-push-arm64.yaml b/.github/workflows/docker-build-and-push-arm64.yaml index 9e5895238a0..88b6dfea6e4 100644 --- a/.github/workflows/docker-build-and-push-arm64.yaml +++ b/.github/workflows/docker-build-and-push-arm64.yaml @@ -61,9 +61,39 @@ 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 + if: always() + run: | + df -h + + docker-build-and-push-cuda: + needs: [load-env, docker-build-and-push] + runs-on: [self-hosted, linux, ARM64] + 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: Free disk space uses: ./.github/actions/free-disk-space + - 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: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' || diff --git a/.github/workflows/docker-build-and-push.yaml b/.github/workflows/docker-build-and-push.yaml index b4ebed24f05..e5afd8e3b03 100644 --- a/.github/workflows/docker-build-and-push.yaml +++ b/.github/workflows/docker-build-and-push.yaml @@ -56,9 +56,39 @@ jobs: *.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 + + docker-build-and-push-cuda: + needs: [load-env, docker-build-and-push] + 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: Free disk space uses: ./.github/actions/free-disk-space + - 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: Build 'Autoware' with CUDA if: ${{ steps.changed-files.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' ||