Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .github/workflows/health-check-ansible.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,17 @@ jobs:
export PATH="$HOME/.local/bin:$PATH"
ansible-galaxy collection install -f -r ansible-galaxy-requirements.yaml
ansible-playbook autoware.dev_env.install_dev_env -v

install-dev-env-required:
needs: install-dev-env
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Verify install-dev-env outcome
run: |
result="${{ needs.install-dev-env.result }}"
echo "install-dev-env: $result"
case "$result" in
success|skipped) exit 0 ;;
*) exit 1 ;;
esac
22 changes: 21 additions & 1 deletion .github/workflows/health-check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,26 @@ jobs:
label: run:health-check

health-check:
needs: require-label
if: ${{ always() }}
needs: [changed-files, require-label]
strategy:
fail-fast: false
matrix:
build-type: [main, nightly, main-arm64]
include:
- build-type: main
platform: amd64
runner: "['ubuntu-24.04']"
- build-type: nightly
platform: amd64
runner: "['ubuntu-24.04']"
- build-type: main-arm64
platform: arm64
runner: "['ubuntu-24.04-arm']"
uses: ./.github/workflows/health-check-reusable.yaml
with:
build-type: ${{ matrix.build-type }}
platform: ${{ matrix.platform }}
runner: ${{ matrix.runner }}
run-condition: ${{ needs.changed-files.outputs.should-run == 'true' && needs.require-label.outputs.result == 'true' }}
secrets: inherit
43 changes: 23 additions & 20 deletions .github/workflows/health-check-reusable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ name: health-check-reusable
on:
workflow_call:
inputs:
build-type:
description: Build-type label (e.g. main, nightly, main-arm64); drives caching lineage and conditional steps
type: string
required: true
platform:
description: Target platform (amd64 or arm64)
type: string
required: true
runner:
description: JSON array string for runs-on, e.g. "['ubuntu-24.04']"
type: string
required: true
ros-distro:
description: ROS distribution
type: string
Expand All @@ -32,31 +44,22 @@ on:
description: Max allowed size (GB) for restored BuildKit cache mounts; cache is dropped and purged if exceeded
type: number
default: 6
run-condition:
description: When false the job is skipped; callers always fire the matrix so required status checks report
type: boolean
default: true

jobs:
docker-build:
strategy:
fail-fast: false
matrix:
build-type: [main, nightly, main-arm64]
include:
- build-type: main
platform: amd64
runner: "['ubuntu-24.04']"
- build-type: nightly
platform: amd64
runner: "['ubuntu-24.04']"
- build-type: main-arm64
platform: arm64
runner: "['ubuntu-24.04-arm']"
runs-on: ${{ fromJson(matrix.runner) }}
if: ${{ inputs.run-condition }}
runs-on: ${{ fromJson(inputs.runner) }}
permissions:
contents: read
packages: write
actions: write
env:
CACHE_KEY_PREFIX: buildkit-mounts-health-check-${{ matrix.build-type }}-${{ inputs.ros-distro }}-${{ matrix.platform }}-
CACHE_REF_PREFIX: ghcr.io/${{ github.repository }}-buildcache:health-check-${{ matrix.build-type }}-${{ inputs.ros-distro }}-${{ matrix.platform }}
CACHE_KEY_PREFIX: buildkit-mounts-health-check-${{ inputs.build-type }}-${{ inputs.ros-distro }}-${{ inputs.platform }}-
CACHE_REF_PREFIX: ghcr.io/${{ github.repository }}-buildcache:health-check-${{ inputs.build-type }}-${{ inputs.ros-distro }}-${{ inputs.platform }}
IS_MAIN_PUSH: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
steps:
- name: 🔧 Change permission of workspace
Expand Down Expand Up @@ -84,11 +87,11 @@ jobs:
echo "::endgroup::"

- name: 🧹 Free disk space
if: matrix.build-type != 'main'
if: inputs.build-type != 'main'
uses: ./.github/actions/free-disk-space

- name: 💾 Create additional swap
if: matrix.platform == 'arm64'
if: inputs.platform == 'arm64'
run: |
sudo fallocate -l 8G /mnt/swapfile
sudo chmod 600 /mnt/swapfile
Expand All @@ -103,7 +106,7 @@ jobs:
vcs import --shallow src < repositories/autoware.repos

- name: 📦 Overlay nightly repos
if: matrix.build-type == 'nightly'
if: inputs.build-type == 'nightly'
run: |
vcs import --shallow --force src < repositories/autoware-nightly.repos

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/health-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,23 @@ concurrency:

jobs:
health-check:
strategy:
fail-fast: false
matrix:
build-type: [main, nightly, main-arm64]
include:
- build-type: main
platform: amd64
runner: "['ubuntu-24.04']"
- build-type: nightly
platform: amd64
runner: "['ubuntu-24.04']"
- build-type: main-arm64
platform: arm64
runner: "['ubuntu-24.04-arm']"
uses: ./.github/workflows/health-check-reusable.yaml
with:
build-type: ${{ matrix.build-type }}
platform: ${{ matrix.platform }}
runner: ${{ matrix.runner }}
secrets: inherit
Loading