Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
65 changes: 58 additions & 7 deletions .github/workflows/build-all-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
set -euo pipefail
autoware_ref=$(git ls-remote https://github.com/autowarefoundation/autoware refs/heads/main | cut -f1)
build_tag="$(date -u +'%Y%m%d')-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
build_tag="${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
echo "autoware_ref=${autoware_ref}" >> "$GITHUB_OUTPUT"
echo "build_tag=${build_tag}" >> "$GITHUB_OUTPUT"
shell: bash
Expand All @@ -62,16 +62,19 @@ jobs:
platform: [linux/amd64, linux/arm64]
ros-distro: [humble, jazzy]
steps:
- name: Checkout OpenADKit repository
uses: actions/checkout@v6

- name: Free Disk Space (Ubuntu)
uses: ./.github/actions/free-disk-space

- name: Install jq and vcs2l
run: |
sudo apt-get update
sudo apt-get install -y jq pipx
pipx install vcs2l
shell: bash

- name: Checkout OpenADKit repository
uses: actions/checkout@v6

- name: Checkout Autoware repository
uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -159,6 +162,8 @@ jobs:
*.platform=${{ matrix.platform }}
*.args.ROS_DISTRO=${{ matrix.ros-distro }}
*.args.BASE_IMAGE=ros:${{ matrix.ros-distro }}-ros-base-${{ matrix.ros-distro == 'jazzy' && 'noble' || 'jammy' }}
*.labels."org.opencontainers.image.build-tag"=${{ needs.prepare.outputs.build_tag }}
*.labels."org.opencontainers.image.run-id"=${{ github.run_id }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/openadkit-buildcache:common-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-main
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository_owner }}/openadkit-buildcache:common-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-main,mode=max

Expand Down Expand Up @@ -213,16 +218,19 @@ jobs:
ros-distro: jazzy
target: sensing-perception-cuda
steps:
- name: Checkout OpenADKit repository
uses: actions/checkout@v6

- name: Free Disk Space (Ubuntu)
uses: ./.github/actions/free-disk-space

- name: Install jq and vcs2l
run: |
sudo apt-get update
sudo apt-get install -y jq pipx
pipx install vcs2l
shell: bash

- name: Checkout OpenADKit repository
uses: actions/checkout@v6

- name: Checkout Autoware repository
uses: actions/checkout@v6
with:
Expand Down Expand Up @@ -374,6 +382,8 @@ jobs:
*.args.API_IMAGE=${{ env.IMAGE_PREFIX_COMPONENT }}:api-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-${{ needs.prepare.outputs.build_tag }}
*.args.VISUALIZER_IMAGE=${{ env.IMAGE_PREFIX_COMPONENT }}:visualizer-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-${{ needs.prepare.outputs.build_tag }}
*.args.SIMULATOR_IMAGE=${{ env.IMAGE_PREFIX_COMPONENT }}:simulator-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-${{ needs.prepare.outputs.build_tag }}
*.labels."org.opencontainers.image.build-tag"=${{ needs.prepare.outputs.build_tag }}
*.labels."org.opencontainers.image.run-id"=${{ github.run_id }}
*.cache-from=type=registry,ref=ghcr.io/${{ github.repository_owner }}/openadkit-buildcache:${{ matrix.target }}-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-main
*.cache-to=type=registry,ref=ghcr.io/${{ github.repository_owner }}/openadkit-buildcache:${{ matrix.target }}-${{ matrix.platform == 'linux/amd64' && 'amd64' || 'arm64' }}-${{ matrix.ros-distro }}-main,mode=max

Expand Down Expand Up @@ -417,3 +427,44 @@ jobs:
universe
universe-cuda
token: ${{ secrets.GITHUB_TOKEN }}

summarize:
runs-on: ubuntu-latest
needs: [prepare, create-manifests]
if: success()
steps:
- name: Write job summary
run: |
{
echo "## Build Complete"
echo "| Key | Value |"
echo "|-----|-------|"
echo "| **build_tag** | \`${{ needs.prepare.outputs.build_tag }}\` |"
echo "| **autoware_ref** | \`${{ needs.prepare.outputs.autoware_ref }}\` |"
echo ""
echo "To release this build:"
echo "1. Go to **Actions → release → Run workflow**"
echo "2. Set \`build_tag\` to \`${{ needs.prepare.outputs.build_tag }}\`"
} >> $GITHUB_STEP_SUMMARY

notify-failure:
runs-on: ubuntu-latest
needs: [prepare, build-common, build-components, build-universe, create-manifests]
if: failure() && github.event_name == 'schedule'
permissions:
issues: write
steps:
- name: Create failure issue
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: `Scheduled build failed (${new Date().toISOString().split('T')[0]})`,
body: [
'**Scheduled build-all-images workflow failed.**',
'',
`Run: ${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
].join('\n'),
})
Loading
Loading