Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: sync upstream #16

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7834acc
ci: remove automatic-rebase.yaml (#50)
kenji-miyake Feb 4, 2022
17150b9
fix(sync-files): fix bugs (#51)
kenji-miyake Feb 6, 2022
d026768
feat(sync-files): add body (#52)
kenji-miyake Feb 6, 2022
fdb124a
ci: add actions-tagger.yaml (#53)
kenji-miyake Feb 6, 2022
e953f04
style: fix styles of descriptions
Feb 6, 2022
fde4d05
feat: add generate-changelog action (#54)
kenji-miyake Feb 6, 2022
ecdf42d
feat(sync-branches): add changelog to body (#55)
kenji-miyake Feb 6, 2022
845e700
fix(generate-changelog): remove CHANGELOG.md (#56)
kenji-miyake Feb 6, 2022
349f213
ci: add GitHub release workflow (#38)
kenji-miyake Feb 7, 2022
e7a38ea
fix(get-modified-packages): fix a bug with top-level project reposito…
h-ohta Feb 7, 2022
c79457b
ci(semantic-pull-request): add validateSingleCommitMatchesPrTitle (#63)
kenji-miyake Feb 8, 2022
e7d489a
chore: sync files (#40)
awf-autoware-bot[bot] Feb 9, 2022
d293fe6
docs: add article to ros distro (#66)
KeisukeShima Feb 10, 2022
660577f
feat: add colcon-build and colcon-test actions (#49)
KeisukeShima Feb 10, 2022
42ecc8a
chore: sync files (#65)
awf-autoware-bot[bot] Feb 10, 2022
aa88de4
feat: skip the rosdep install of unnecessary packages (#68)
isamu-takagi Feb 10, 2022
efb3db4
fix(spell-check): ignore dist/ (#70)
kenji-miyake Feb 11, 2022
712df5f
revert(spell-check): ignore dist/ (#71)
kenji-miyake Feb 11, 2022
2b5a49f
docs(spell-check): change cspell-json-url
Feb 11, 2022
262f2f2
style: fix English
Feb 11, 2022
2cce297
perf(generate-changelog): use setup-git-cliff to speed up (#64)
kenji-miyake Feb 11, 2022
8628aaa
[create-pull-request] automated change
kenji-miyake Feb 11, 2022
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
2 changes: 1 addition & 1 deletion .github/sync-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- source: LICENSE
- source: .github/dependabot.yaml
- source: .github/workflows/pre-commit-optional.yaml
- source: .github/workflows/spell-check.yaml
- source: .github/workflows/spell-check-differential.yaml
- source: .markdown-link-check.json
- source: .markdownlint.yaml
- source: .pre-commit-config-optional.yaml
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/actions-tagger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: actions-tagger

on:
release:
types:
- published
- edited

jobs:
actions-tagger:
runs-on: ubuntu-latest
steps:
- uses: Actions-R-Us/actions-tagger@v2
29 changes: 0 additions & 29 deletions .github/workflows/automatic-rebase.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/github-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: github-release

on:
push:
tags:
- v*

jobs:
github-release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Run generate-changelog
id: generate-changelog
uses: autowarefoundation/autoware-github-actions/generate-changelog@tier4/proposal

- name: Release to GitHub
run: |
echo "Release ${{ github.ref_name }}"
gh release create "${{ github.ref_name }}" \
--draft \
--notes "${{ steps.generate-changelog.outputs.changelog }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/semantic-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ jobs:
revert
subjectPattern: ^(?![A-Z]).+$
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: spell-check
name: spell-check-differential

on:
pull_request:

jobs:
spell-check:
spell-check-differential:
runs-on: ubuntu-latest
steps:
- name: Check out repository
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test-composite-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,33 @@ jobs:
- name: Check result
run: |
[[ "${{ steps.check-file-existence4.outputs.exists }}" == "true" ]]

test-colcon-build-and-colcon-test:
runs-on: ubuntu-latest
container: ros:${{ matrix.rosdistro }}
strategy:
fail-fast: false
matrix:
rosdistro:
- galactic
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Create a package with no source files
run: |
. /opt/ros/${{ matrix.rosdistro }}/setup.sh
ros2 pkg create --build-type ament_cmake empty_target_cmake
ros2 pkg create --build-type ament_python empty_target_python

- name: Run colcon-build
uses: ./colcon-build
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: empty_target_cmake empty_target_python

- name: Run colcon-test
uses: ./colcon-test
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: empty_target_cmake empty_target_python
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.param.yaml
*.rviz
3 changes: 3 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ignore: |
*.param.yaml

rules:
braces:
level: error
max-spaces-inside: 1 # To format with Prettier
comments:
level: error
min-spaces-from-content: 1 # To be compatible with C++ and Python
Expand Down
4 changes: 2 additions & 2 deletions clang-tidy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:

| Name | Required | Description |
| --------------------- | -------- | --------------------------------------------------- |
| rosdistro | true | ROS distro. |
| rosdistro | true | The ROS distro. |
| target-packages | true | The target packages to analyse by Clang-Tidy. |
| clang-tidy-config-url | true | The URL to `.clang-tidy`. |
| build-depends-repos | false | `.repos` file that includes build dependencies. |
| build-depends-repos | false | The `.repos` file that includes build dependencies. |
| token | false | The token for build dependencies and `.clang-tidy`. |

## Outputs
Expand Down
3 changes: 2 additions & 1 deletion clang-tidy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ runs:

- name: Run rosdep install
run: |
package_paths=$(colcon list -p --packages-above-and-dependencies ${{ inputs.target-packages }})
sudo apt-get -yqq update
rosdep update
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths . --ignore-src --rosdistro ${{ inputs.rosdistro }}
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths ${package_paths} --ignore-src --rosdistro ${{ inputs.rosdistro }}
shell: bash

- name: Restore build files from cache
Expand Down
33 changes: 20 additions & 13 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body = """
{% endfor %}
{% endfor %}\n
"""
# remove the leading and trailing whitespaces from the template
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
Expand All @@ -41,21 +41,28 @@ commit_parsers = [
# Skip
{ message = "^chore\\(release\\)", skip = true},
# Comply with https://github.com/commitizen/conventional-commit-types/blob/c3a9be4c73e47f2e8197de775f41d981701407fb/index.json
{ message = "^feat", group = "Features"},
{ message = "^fix", group = "Bug Fixes"},
{ message = "^doc", group = "Documentation"},
{ message = "^style", group = "Styles"},
{ message = "^refactor", group = "Code Refactoring"},
{ message = "^perf", group = "Performance Improvements"},
{ message = "^test", group = "Tests"},
{ message = "^build", group = "Builds"},
{ message = "^ci", group = "Continuous Integrations"},
{ message = "^chore", group = "Chores"},
{ message = "^revert", group = "Reverts"},
# Why adding numbers to groups is in https://github.com/orhun/git-cliff/issues/9#issuecomment-914521594
{ message = "^feat", group = "<!-- 00 -->Features"},
{ message = "^fix", group = "<!-- 01 -->Bug Fixes"},
{ message = "^doc", group = "<!-- 02 -->Documentation"},
{ message = "^style", group = "<!-- 03 -->Styles"},
{ message = "^refactor", group = "<!-- 04 -->Code Refactoring"},
{ message = "^perf", group = "<!-- 05 -->Performance Improvements"},
{ message = "^test", group = "<!-- 06 -->Tests"},
{ message = "^build", group = "<!-- 07 -->Builds"},
{ message = "^ci", group = "<!-- 08 -->Continuous Integrations"},
{ message = "^chore", group = "<!-- 09 -->Chores"},
{ message = "^revert", group = "<!-- 10 -->Reverts"},
]
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
# regex for skipping tags
skip_tags = "v.*-beta.*"
skip_tags = "v0.0.0"
# regex for ignoring tags
ignore_tags = "v.*-beta.*"
# sort the tags chronologically
date_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
14 changes: 7 additions & 7 deletions colcon-build-and-test/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# colcon-build-and-test
# DEPRECATED: colcon-build-and-test

This action runs `colcon build` and `colcon test`.

Expand Down Expand Up @@ -30,12 +30,12 @@ jobs:

## Inputs

| Name | Required | Description |
| ------------------- | -------- | ----------------------------------------------- |
| rosdistro | true | ROS distro. |
| target-packages | true | The target packages to build and test. |
| build-depends-repos | false | `.repos` file that includes build dependencies. |
| token | false | The token for build dependencies. |
| Name | Required | Description |
| ------------------- | -------- | --------------------------------------------------- |
| rosdistro | true | The ROS distro. |
| target-packages | true | The target packages to build and test. |
| build-depends-repos | false | The `.repos` file that includes build dependencies. |
| token | false | The token for build dependencies. |

## Outputs

Expand Down
7 changes: 6 additions & 1 deletion colcon-build-and-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
runs:
using: composite
steps:
- name: Show deprecated warning
run: echo "::warning title=DEPRECATED::colcon-build-and-test action will no longer be available in future releases. Please consider using colcon-build and colcon-test workflows instead."
shell: bash

- name: Show target packages
run: |
echo "target packages: ${{ inputs.target-packages }}"
Expand All @@ -45,9 +49,10 @@ runs:

- name: Run rosdep install
run: |
package_paths=$(colcon list -p --packages-above-and-dependencies ${{ inputs.target-packages }})
sudo apt-get -yqq update
rosdep update
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths . --ignore-src --rosdistro ${{ inputs.rosdistro }}
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths ${package_paths} --ignore-src --rosdistro ${{ inputs.rosdistro }}
shell: bash

- name: Set up colcon-mixin
Expand Down
42 changes: 42 additions & 0 deletions colcon-build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# colcon-build

This action runs `colcon build`.

## Usage

```yaml
jobs:
build:
runs-on: ubuntu-latest
container: ros:galactic
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get modified packages
id: get-modified-packages
uses: autowarefoundation/autoware-github-actions/get-modified-packages@tier4/proposal

- name: Build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@tier4/proposal
with:
rosdistro: galactic
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: build_depends.repos
```

## Inputs

| Name | Required | Description |
| ------------------- | -------- | --------------------------------------------------- |
| rosdistro | true | ROS distro. |
| target-packages | true | The target packages to build. |
| build-depends-repos | false | The `.repos` file that includes build dependencies. |
| token | false | The token for build dependencies. |

## Outputs

None.
75 changes: 75 additions & 0 deletions colcon-build/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: colcon-build
description: ""

inputs:
rosdistro:
description: ""
required: true
target-packages:
description: ""
required: true
build-depends-repos:
description: ""
required: false
token:
description: ""
required: false
default: ${{ github.token }}

runs:
using: composite
steps:
- name: Show target packages
run: |
echo "target packages: ${{ inputs.target-packages }}"
shell: bash

- name: Install pip for rosdep
run: |
sudo apt-get -yqq update
sudo apt-get -yqq install python3-pip
shell: bash

- name: Set git config
if: ${{ inputs.build-depends-repos != '' }}
uses: autowarefoundation/autoware-github-actions/set-git-config@tier4/proposal
with:
token: ${{ inputs.token }}

- name: Clone dependency packages
if: ${{ inputs.build-depends-repos != '' }}
run: |
mkdir dependency_ws
vcs import dependency_ws < ${{ inputs.build-depends-repos }}
shell: bash

- name: Run rosdep install
run: |
package_paths=$(colcon list -p --packages-above-and-dependencies ${{ inputs.target-packages }})
sudo apt-get -yqq update
rosdep update
DEBIAN_FRONTEND=noninteractive rosdep install -yqq --from-paths ${package_paths} --ignore-src --rosdistro ${{ inputs.rosdistro }}
shell: bash

- name: Set up colcon-mixin
run: |
colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml || true
colcon mixin update default
shell: bash

- name: Build
run: |
. /opt/ros/${{ inputs.rosdistro }}/setup.sh
colcon build --event-handlers console_cohesion+ \
--packages-above-and-dependencies ${{ inputs.target-packages }} \
--cmake-args -DCMAKE_BUILD_TYPE=Release \
--mixin coverage-gcc coverage-pytest compile-commands
shell: bash

- name: Cache build artifacts
uses: actions/cache@v2
with:
path: |
./build
./install
key: build-${{ github.sha }}
Loading