Skip to content
Draft
Show file tree
Hide file tree
Changes from 12 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
9 changes: 4 additions & 5 deletions .github/actions/docker-build-and-push-cuda/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs:
runs:
using: composite
steps:
- name: Install jq and vcs2l
- name: Install jq
run: |
sudo apt-get -y update
sudo apt-get -y install curl gnupg lsb-release
Expand All @@ -30,13 +30,12 @@ runs:
sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

sudo apt-get update
sudo apt-get install -y jq python3-pip python3-vcs2l
sudo apt-get install -y jq
shell: bash

- name: Run vcs import
- name: Initialize submodules
run: |
mkdir -p src
vcs import --shallow src < repositories/autoware.repos
git submodule update --init --checkout src/autoware
shell: bash

- name: Setup Docker Buildx
Expand Down
10 changes: 4 additions & 6 deletions .github/actions/docker-build-and-push-tools/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ inputs:
runs:
using: composite
steps:
- name: Install jq and vcs2l
- name: Install jq
run: |
sudo apt-get -y update
sudo apt-get -y install jq python3-pip
pip install --no-cache-dir vcs2l
sudo apt-get -y install jq
shell: bash

- name: Run vcs import
- name: Initialize submodules
run: |
mkdir -p src
vcs import --shallow src < repositories/simulator.repos
git submodule update --init --checkout src/simulator
shell: bash

- name: Setup Docker Buildx
Expand Down
10 changes: 4 additions & 6 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ inputs:
runs:
using: composite
steps:
- name: Install jq and vcs2l
- name: Install jq
run: |
sudo apt-get -y update
sudo apt-get -y install jq python3-pip
pip install --no-cache-dir vcs2l
sudo apt-get -y install jq
shell: bash

- name: Run vcs import
- name: Initialize submodules
run: |
mkdir -p src
vcs import --shallow src < repositories/autoware.repos
git submodule update --init --checkout src/autoware
shell: bash

- name: Setup Docker Buildx
Expand Down
24 changes: 8 additions & 16 deletions .github/actions/docker-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ inputs:
cache-tag-suffix:
description: Suffix of the target cache tag.
required: true
additional-repos:
description: Additional target .repos file.
default: ""
use-nightly:
description: Whether to use nightly submodules.
default: false
required: false
build-args:
description: Additional build args.
Expand All @@ -22,23 +22,15 @@ runs:
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install vcs2l
- name: Initialize submodules
run: |
sudo apt-get -y update
sudo apt-get -y install python3-pip
pipx install vcs2l
git submodule update --init --checkout src/autoware
shell: bash

- name: Run vcs import
- name: Initialize submodules to nightly
if: ${{ inputs.use-nightly }}
run: |
mkdir -p src
vcs import --shallow src < repositories/autoware.repos
shell: bash

- name: Import additional repositories
if: ${{ inputs.additional-repos != '' }}
run: |
vcs import --shallow --force src < ${{ inputs.additional-repos }}
git submodule update --remote src/autoware
shell: bash

- name: Cache ccache
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docker-build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ jobs:
with:
files: |
*.env
*.repos
.github/actions/combine-multi-arch-images/action.yaml
.github/actions/docker-build-and-push*/action.yaml
.github/workflows/docker-build-and-push.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**
src/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
Expand Down Expand Up @@ -120,13 +120,13 @@ jobs:
with:
files: |
*.env
*.repos
.github/actions/combine-multi-arch-images/action.yaml
.github/actions/docker-build-and-push*/action.yaml
.github/workflows/docker-build-and-push.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**
src/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
Expand Down Expand Up @@ -190,13 +190,13 @@ jobs:
with:
files: |
*.env
*.repos
.github/actions/combine-multi-arch-images/action.yaml
.github/actions/docker-build-and-push*/action.yaml
.github/workflows/docker-build-and-push.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**
src/**

- name: Free disk space
if: ${{ runner.environment == 'github-hosted' &&
Expand Down Expand Up @@ -301,13 +301,13 @@ jobs:
with:
files: |
*.env
*.repos
.github/actions/combine-multi-arch-images/action.yaml
.github/actions/docker-build-and-push*/action.yaml
.github/workflows/docker-build-and-push.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**
src/**

- name: Free disk space
if: ${{ steps.changed-files.outputs.any_changed == 'true' ||
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/health-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ jobs:
with:
files: |
*.env
*.repos
.github/actions/docker-build/action.yaml
.github/workflows/health-check.yaml
ansible-galaxy-requirements.yaml
ansible/**
docker/**
src/**
setup-dev-env.sh

- name: Show disk space
Expand All @@ -90,7 +90,7 @@ jobs:
with:
platform: ${{ matrix.platform }}
cache-tag-suffix: ${{ matrix.build-type }}
additional-repos: ${{ matrix.build-type == 'nightly' && 'repositories/autoware-nightly.repos' || '' }}
use-nightly: ${{ matrix.build-type == 'nightly' }}
build-args: |
ROS_DISTRO=${{ needs.load-env.outputs.rosdistro }}
AUTOWARE_BASE_IMAGE=${{ needs.load-env.outputs.autoware_base_image }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pre-commit-optional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
with:
fetch-depth: 0

- name: Initialize submodules
run: |
git submodule update --init --checkout
shell: bash

- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}

- name: Initialize submodules
run: |
git submodule update --init --checkout
shell: bash

- name: Run pre-commit
uses: autowarefoundation/autoware-github-actions/pre-commit@v1
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/scenario-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,16 @@ jobs:
lsb-release \
python3-pip \
git
pip install --upgrade gdown vcs2l
pip install --upgrade gdown
- name: Show memory info
shell: bash
run: free -h
- name: Clone Autoware and Import simulator.repos
- name: Clone Autoware and Initialize Simulator
shell: bash
run: |
git clone https://github.com/autowarefoundation/autoware.git ~/autoware_ws
cd ~/autoware_ws
mkdir -p src
vcs import src < repositories/simulator.repos
git submodule update --init --checkout src/simulator
- name: Install ROS dependencies
shell: bash
run: |
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/update-nightly-submodules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Update submodules to nightly.
# .repos sync is not handled here (maybe run pre-commit once?)
name: Update Nightly Submodules
Copy link
Copy Markdown
Collaborator Author

@paulsohn paulsohn Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is nightly?

git submodule update --remote src/xxx is equivalent to importing xxx-nightly.repos.

In this proposal, xxx-nightly.repos files are not materialized. Instead, one can always

  • have nightly configuration by git submodule update --remote src/xxx (equivalent to importing xxx-nightly.repos)
  • switch to "nightly" branch (which this workflow is assumed to be update daily), and the content of xxx.repos there is xxx.repos in main plus xxx-nightly.repos.

The nightly branch here must be branch-protected.

We can further create a PR to 'stable-nightly' branch (branch name is just an example) and manually updated so that the 'stable-nightly' branch always passes build and necessary tests.


on:
schedule:
- cron: 0 0 * * * # Every day at 00:00 UTC
workflow_dispatch:

jobs:
update-nightly-submodules:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}

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

- name: Update nightly submodules
id: update-nightly-submodules
env:
MAIN_BRANCH_NAME: main
NIGHTLY_BRANCH_NAME: nightly
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
git checkout "${MAIN_BRANCH_NAME}"
git checkout -B "${NIGHTLY_BRANCH_NAME}"

# Check if repository has submodules
if [ ! -f .gitmodules ]; then
echo "Error: The repository is not using git submodules"
exit 1
fi

git submodule update --init --checkout
git submodule update --remote
git add .
git commit -m "chore: update nightly submodules from ${MAIN_BRANCH_NAME}" || echo "No submodule updates to commit"
git push origin "${NIGHTLY_BRANCH_NAME}" --force-with-lease
Loading
Loading