Skip to content

Commit

Permalink
revert .github
Browse files Browse the repository at this point in the history
Signed-off-by: Yutaka Kondo <[email protected]>
  • Loading branch information
youtalk committed Nov 14, 2024
1 parent 622dfe3 commit d9592e3
Show file tree
Hide file tree
Showing 13 changed files with 121 additions and 384 deletions.
1 change: 0 additions & 1 deletion .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- source: .github/PULL_REQUEST_TEMPLATE/small-change.md
- source: .github/PULL_REQUEST_TEMPLATE/standard-change.md
- source: .github/dependabot.yaml
- source: .github/workflows/backport.yaml
- source: .github/stale.yml
- source: .github/workflows/github-release.yaml
- source: .github/workflows/pre-commit.yaml
Expand Down
80 changes: 80 additions & 0 deletions .github/update-sync-param-files.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import argparse
import dataclasses
from pathlib import Path
from typing import List
from typing import Optional

import git

"""
This module updates `sync-param-files.yaml` based on the launch parameter files in `autoware.universe`.
"""

REPO_NAME = "autowarefoundation/autoware.universe"
REPO_URL = f"https://github.com/{REPO_NAME}.git"
CLONE_PATH = Path("/tmp/autoware.universe")


@dataclasses.dataclass
class FileSyncConfig:
source: str
dest: str
replace: Optional[bool] = None
delete_orphaned: Optional[bool] = None
pre_commands: Optional[str] = None
post_commands: Optional[str] = None


def create_tier4_launch_sync_configs(tier4_launch_package_path: Path) -> List[FileSyncConfig]:
launch_package_name = tier4_launch_package_path.name
launch_config_path = tier4_launch_package_path / "config"

sync_configs = []
for param_file_path in tier4_launch_package_path.glob("config/**/*.param.yaml"):
relative_param_file_path = param_file_path.relative_to(launch_config_path)

source = param_file_path.relative_to(CLONE_PATH)
dest = Path("autoware_launch/config") / launch_package_name / relative_param_file_path

sync_configs.append(FileSyncConfig(str(source), str(dest)))

return sync_configs


def dump_sync_config(section_name: str, sync_configs: List[FileSyncConfig]) -> List[str]:
indent = 4 * " "
lines = [f"{indent}# {section_name}\n"]
for sync_config in sync_configs:
lines.append(f"{indent}- source: {sync_config.source}\n")
lines.append(f"{indent} dest: {sync_config.dest}\n")
lines.append("\n")
return lines


def main():
parser = argparse.ArgumentParser()
parser.add_argument("sync_param_files_path", type=Path, help="path to sync-param-files.yaml")
args = parser.parse_args()

# Clone Autoware
if not CLONE_PATH.exists():
git.Repo.clone_from(REPO_URL, CLONE_PATH)

# Create sync config for tier4_*_launch
tier4_launch_package_paths = sorted(
CLONE_PATH.glob("launch/tier4_*_launch"), key=lambda p: p.name
)
tier4_launch_sync_configs_map = {
p.name: create_tier4_launch_sync_configs(p) for p in tier4_launch_package_paths
}

# Create sync-param-files.yaml
with open(args.sync_param_files_path, "w") as f:
f.write(f"- repository: {REPO_NAME}\n")
f.write(" files:\n")
for section_name, sync_config in tier4_launch_sync_configs_map.items():
f.writelines(dump_sync_config(section_name, sync_config))


if __name__ == "__main__":
main()
33 changes: 0 additions & 33 deletions .github/workflows/backport.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/beta-to-tier4-main-sync.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ jobs:
- name: Show disk space before the tasks
run: df -h

- name: Free disk space (Ubuntu)
uses: jlumbroso/[email protected]
with:
tool-cache: false
dotnet: false
swap-storage: false
large-packages: false

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1

Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/check-build-depends.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: check-build-depends

on:
pull_request:
paths:
- build_depends*.repos

jobs:
check-build-depends:
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
rosdistro:
- galactic
- humble
include:
- rosdistro: galactic
container: ros:galactic
build-depends-repos: build_depends.repos
- rosdistro: humble
container: ros:humble
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1

- name: Get self packages
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1

- name: Build
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
25 changes: 0 additions & 25 deletions .github/workflows/comment-on-pr.yaml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/dispatch-release-note.yaml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/sync-awf-latest.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/sync-awf-upstream.yaml

This file was deleted.

Loading

0 comments on commit d9592e3

Please sign in to comment.