From 46e15db4b2c3987d884c670f7ba2e160273d63ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Sat, 21 Dec 2024 21:22:38 +0300 Subject: [PATCH] ci(sync-files): utilize the sync-file-templates repo and fix ci (#14) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- .github/PULL_REQUEST_TEMPLATE.md | 8 --- .github/PULL_REQUEST_TEMPLATE/small-change.md | 40 -------------- .../PULL_REQUEST_TEMPLATE/standard-change.md | 50 ----------------- .github/sync-files-reverse-reference.yaml | 39 ------------- .github/sync-files.yaml | 14 +++-- ...ild-and-test-differential-self-hosted.yaml | 55 ------------------- .../workflows/build-and-test-self-hosted.yaml | 43 --------------- .../build-and-test-with-reverse-depends.yaml | 52 ------------------ .github/workflows/pre-commit.yaml | 27 --------- .../sync-files-reverse-reference.yaml | 24 -------- 10 files changed, 9 insertions(+), 343 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/small-change.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/standard-change.md delete mode 100644 .github/sync-files-reverse-reference.yaml delete mode 100644 .github/workflows/build-and-test-differential-self-hosted.yaml delete mode 100644 .github/workflows/build-and-test-self-hosted.yaml delete mode 100644 .github/workflows/build-and-test-with-reverse-depends.yaml delete mode 100644 .github/workflows/pre-commit.yaml delete mode 100644 .github/workflows/sync-files-reverse-reference.yaml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 97b0e95..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,8 +0,0 @@ -**Note**: Confirm the [contribution guidelines](https://autowarefoundation.github.io/autoware-documentation/main/contributing/) before submitting a pull request. - -Click the `Preview` tab and select a PR template: - -- [Standard change](?expand=1&template=standard-change.md) -- [Small change](?expand=1&template=small-change.md) - -**Do NOT send a PR with this description.** diff --git a/.github/PULL_REQUEST_TEMPLATE/small-change.md b/.github/PULL_REQUEST_TEMPLATE/small-change.md deleted file mode 100644 index 2ff933c..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/small-change.md +++ /dev/null @@ -1,40 +0,0 @@ -## Description - - - -## Tests performed - - - - -Not applicable. - -## Effects on system behavior - - - -Not applicable. - -## Pre-review checklist for the PR author - -The PR author **must** check the checkboxes below when creating the PR. - -- [ ] I've confirmed the [contribution guidelines]. -- [ ] The PR follows the [pull request guidelines]. - -## In-review checklist for the PR reviewers - -The PR reviewers **must** check the checkboxes below before approval. - -- [ ] The PR follows the [pull request guidelines]. - -## Post-review checklist for the PR author - -The PR author **must** check the checkboxes below before merging. - -- [ ] There are no open discussions or they are tracked via tickets. - -After all checkboxes are checked, anyone who has write access can merge the PR. - -[contribution guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/ -[pull request guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/ diff --git a/.github/PULL_REQUEST_TEMPLATE/standard-change.md b/.github/PULL_REQUEST_TEMPLATE/standard-change.md deleted file mode 100644 index 7aedefd..0000000 --- a/.github/PULL_REQUEST_TEMPLATE/standard-change.md +++ /dev/null @@ -1,50 +0,0 @@ -## Description - - - -## Related links - - - -## Tests performed - - - -## Notes for reviewers - - - -## Interface changes - - - -## Effects on system behavior - - - -## Pre-review checklist for the PR author - -The PR author **must** check the checkboxes below when creating the PR. - -- [ ] I've confirmed the [contribution guidelines]. -- [ ] The PR follows the [pull request guidelines]. - -## In-review checklist for the PR reviewers - -The PR reviewers **must** check the checkboxes below before approval. - -- [ ] The PR follows the [pull request guidelines]. -- [ ] The PR has been properly tested. -- [ ] The PR has been reviewed by the code owners. - -## Post-review checklist for the PR author - -The PR author **must** check the checkboxes below before merging. - -- [ ] There are no open discussions or they are tracked via tickets. -- [ ] The PR is ready for merge. - -After all checkboxes are checked, anyone who has write access can merge the PR. - -[contribution guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/ -[pull request guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/ diff --git a/.github/sync-files-reverse-reference.yaml b/.github/sync-files-reverse-reference.yaml deleted file mode 100644 index f5d016c..0000000 --- a/.github/sync-files-reverse-reference.yaml +++ /dev/null @@ -1,39 +0,0 @@ -- repository: autowarefoundation/autoware.universe - files: - - source: .github/workflows/build-and-test.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/build-and-test-differential.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/build-and-test-differential-self-hosted.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/build-and-test-self-hosted.yaml - pre-commands: | - sd -s '${{ matrix.container-suffix }}' '' {source} - sd -f ms 'container-suffix:.*include:' 'include:' {source} - - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/check-build-depends.yaml - pre-commands: | - sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} - sd "build_depends.humble.repos" "build_depends.repos" {source} - - source: .github/workflows/clang-tidy-pr-comments.yaml - - source: .github/workflows/clang-tidy-pr-comments-manually.yaml - - source: .github/workflows/update-codeowners-from-packages.yaml - - source: .pre-commit-config.yaml - - source: codecov.yaml diff --git a/.github/sync-files.yaml b/.github/sync-files.yaml index 39bcd3f..fbf63b1 100644 --- a/.github/sync-files.yaml +++ b/.github/sync-files.yaml @@ -1,4 +1,5 @@ -- repository: autowarefoundation/autoware +- repository: autowarefoundation/sync-file-templates + source-dir: sources files: - source: CODE_OF_CONDUCT.md - source: CONTRIBUTING.md @@ -7,14 +8,10 @@ - source: .github/ISSUE_TEMPLATE/bug.yaml - source: .github/ISSUE_TEMPLATE/config.yml - source: .github/ISSUE_TEMPLATE/task.yaml - - source: .github/PULL_REQUEST_TEMPLATE.md - - source: .github/PULL_REQUEST_TEMPLATE/small-change.md - - source: .github/PULL_REQUEST_TEMPLATE/standard-change.md - source: .github/dependabot.yaml - source: .github/stale.yml - source: .github/workflows/cancel-previous-workflows.yaml - source: .github/workflows/github-release.yaml - - source: .github/workflows/pre-commit.yaml - source: .github/workflows/pre-commit-autoupdate.yaml - source: .github/workflows/pre-commit-optional.yaml - source: .github/workflows/semantic-pull-request.yaml @@ -24,9 +21,16 @@ - source: .clang-tidy - source: .markdown-link-check.json - source: .markdownlint.yaml + - source: .pre-commit-config.yaml - source: .pre-commit-config-optional.yaml - source: .prettierignore - source: .prettierrc.yaml - source: .yamllint.yaml - source: CPPLINT.cfg - source: setup.cfg + - source: .github/workflows/build-and-test.yaml + pre-commands: | + sed -i '/build-depends-repos/d' {source} + - source: .github/workflows/build-and-test-differential.yaml + pre-commands: | + sed -i '/build-depends-repos/d' {source} diff --git a/.github/workflows/build-and-test-differential-self-hosted.yaml b/.github/workflows/build-and-test-differential-self-hosted.yaml deleted file mode 100644 index 232378a..0000000 --- a/.github/workflows/build-and-test-differential-self-hosted.yaml +++ /dev/null @@ -1,55 +0,0 @@ -name: build-and-test-differential-self-hosted - -on: - pull_request: - types: - - opened - - synchronize - - labeled - workflow_dispatch: - -jobs: - prevent-no-label-execution: - uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1 - with: - label: ARM64 - - build-and-test-differential-self-hosted: - needs: prevent-no-label-execution - if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }} - runs-on: [self-hosted, linux, ARM64] - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - rosdistro: - - humble - include: - - rosdistro: humble - container: ros:humble - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get modified packages - id: get-modified-packages - uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 - - - name: Build - if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} - - - name: Test - if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-test@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} diff --git a/.github/workflows/build-and-test-self-hosted.yaml b/.github/workflows/build-and-test-self-hosted.yaml deleted file mode 100644 index b17fc04..0000000 --- a/.github/workflows/build-and-test-self-hosted.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: build-and-test-self-hosted - -on: - schedule: - - cron: 0 0 * * * - workflow_dispatch: - -jobs: - build-and-test-self-hosted: - runs-on: [self-hosted, linux, ARM64] - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - rosdistro: - - humble - include: - - rosdistro: humble - container: ros:humble - 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 - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - - - name: Test - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-test@v1 - with: - rosdistro: ${{ matrix.rosdistro }} - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} diff --git a/.github/workflows/build-and-test-with-reverse-depends.yaml b/.github/workflows/build-and-test-with-reverse-depends.yaml deleted file mode 100644 index 07d7a02..0000000 --- a/.github/workflows/build-and-test-with-reverse-depends.yaml +++ /dev/null @@ -1,52 +0,0 @@ -name: build-and-test-with-reverse-depends - -on: - workflow_dispatch: - -jobs: - build-and-test-with-reverse-depends: - runs-on: ubuntu-latest - container: ros:humble - steps: - - name: Check out repository - uses: actions/checkout@v4 - - - name: Set up yq - uses: chrisdickinson/setup-yq@v1.0.1 - with: - yq-version: v4.25.1 - - - name: Clone reverse depends - run: | - git clone https://github.com/autowarefoundation/autoware.universe.git reverse_depends - - - 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: Import depends of reverse depends - run: | - yq -i 'del(.repositories.* | select(.url == "https://github.com/autowarefoundation/autoware_common.git"))' reverse_depends/build_depends.repos - yq -i 'del(.repositories.* | select(.url == "https://github.com/tier4/autoware_auto_msgs.git"))' reverse_depends/build_depends.repos - vcs import reverse_depends < reverse_depends/build_depends.repos - rm -rf reverse_depends/map/lanelet2_extension - - - name: Build - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - uses: autowarefoundation/autoware-github-actions/colcon-build@v1 - with: - rosdistro: humble - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: build_depends.repos - - - name: Test - if: ${{ steps.get-self-packages.outputs.self-packages != '' }} - id: test - uses: autowarefoundation/autoware-github-actions/colcon-test@v1 - with: - rosdistro: humble - target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: build_depends.repos diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml deleted file mode 100644 index c724885..0000000 --- a/.github/workflows/pre-commit.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: pre-commit - -on: - pull_request: - -jobs: - pre-commit: - if: ${{ github.event.repository.private }} # Use pre-commit.ci for public repositories - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Check out repository - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.ref }} - - - name: Run pre-commit - uses: autowarefoundation/autoware-github-actions/pre-commit@v1 - with: - pre-commit-config: .pre-commit-config.yaml - token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/sync-files-reverse-reference.yaml b/.github/workflows/sync-files-reverse-reference.yaml deleted file mode 100644 index 8219686..0000000 --- a/.github/workflows/sync-files-reverse-reference.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: sync-files-reverse-reference - -on: - workflow_dispatch: - -jobs: - sync-files-reverse-reference: - runs-on: ubuntu-latest - steps: - - name: Generate token - id: generate-token - uses: tibdex/github-app-token@v2 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.PRIVATE_KEY }} - - - name: Run sync-files - uses: autowarefoundation/autoware-github-actions/sync-files@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - config: .github/sync-files-reverse-reference.yaml - pr-branch: sync-files-reverse-reference - pr-title: "chore: sync files of reverse references" - pr-commit-message: "chore: sync files of reverse references"