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

[Bot] Update workflow #2

Closed
wants to merge 1 commit into from
Closed
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
122 changes: 122 additions & 0 deletions .github/workflows/BuildTest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: BuildTest

on:
schedule:
- cron: 0 0 * * *
pull_request:
workflow_dispatch:

jobs:
build:
name: build
runs-on: ubuntu-22.04
timeout-minutes: 180
strategy:
fail-fast: false
max-parallel: 8
matrix:
rosdistro: [humble]
include:
# Galactic Geochelone (May 2021 - November 2022)
# - docker_image: rostooling/setup-ros-docker:ubuntu-focal-ros-galactic-ros-base-latest
# rosdistro: galactic
# Humble Hawksbill (May 2022 - May 2027)
- docker_image: rostooling/setup-ros-docker:ubuntu-jammy-ros-humble-ros-base-latest
rosdistro: humble
# Rolling Ridley
# - docker_image: rostooling/setup-ros-docker:ubuntu-jammy-ros-rolling-ros-base-latest
# rosdistro: rolling
env:
ROS_DISTRO: ${{ matrix.rosdistro }}
container:
image: ${{ matrix.docker_image }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: workaround for jammy
if: ${{ matrix.rosdistro == 'humble' }}
run: |
apt remove libunwind-14-dev -y
apt install python3-nose -y
pip uninstall nose -y
- name: install ccache
run: |
apt install -y ccache
- name: Make ccache dir
run: |
mkdir -p /tmp/ccache
- uses: actions/cache@v3
with:
path: /tmp/ccache
key: ccache-${{ matrix.rosdistro }}
- name: Search packages in this repository
id: list_packages
run: |
echo name=package_list::$(colcon list --names-only | sed -e ':loop; N; $!b loop; s/\n/ /g') >> "$GITHUB_OUTPUT"
- name: Show target packages
run: |
echo "Target packages: ${{ steps.list_packages.outputs.package_list }}"
- name: Check dependency-${{ matrix.rosdistro }}.repos existence
id: check_rosdistro_repos_files
uses: andstor/file-existence-action@v1
with:
files: dependency-${{ matrix.rosdistro }}.repos
allow_failure: false
- name: Check dependency.repos existence
id: check_repos_files
uses: andstor/file-existence-action@v1
with:
files: dependency.repos
allow_failure: false
- name: Run build test with dependency-${{ matrix.rosdistro }}.repos
uses: ros-tooling/[email protected]
if: steps.check_rosdistro_repos_files.outputs.files_exists == 'true'
with:
package-name: ${{ steps.list_packages.outputs.package_list }}
target-ros2-distro: ${{ matrix.rosdistro }}
vcs-repo-file-url: dependency-${{ matrix.rosdistro }}.repos
extra-cmake-args: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
env:
CCACHE_DIR: /tmp/ccache
DEVELOP: true
- name: Run build test with dependency.repos
uses: ros-tooling/[email protected]
if: steps.check_rosdistro_repos_files.outputs.files_exists == 'false' && steps.check_repos_files.outputs.files_exists == 'true'
with:
package-name: ${{ steps.list_packages.outputs.package_list }}
target-ros2-distro: ${{ matrix.rosdistro }}
vcs-repo-file-url: dependency.repos
extra-cmake-args: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
env:
CCACHE_DIR: /tmp/ccache
DEVELOP: true
- name: Run build test without .repos file
uses: ros-tooling/[email protected]
if: steps.check_rosdistro_repos_files.outputs.files_exists == 'false' && steps.check_repos_files.outputs.files_exists == 'false'
with:
package-name: ${{ steps.list_packages.outputs.package_list }}
target-ros2-distro: ${{ matrix.rosdistro }}
extra-cmake-args: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
env:
CCACHE_DIR: /tmp/ccache
DEVELOP: true
- name: Notify Slack
uses: 8398a7/action-slack@v2
if: failure()
with:
status: ${{ job.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
merge:
name: merge
runs-on: ubuntu-22.04
timeout-minutes: 180
needs: build
steps:
- name: merge PR
if : ${{ (github.event_name == 'pull_request') && (github.actor == 'wam-v-tan') }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh pr merge ${{ github.event.pull_request.html_url }} --merge
68 changes: 68 additions & 0 deletions .github/workflows/Release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# This file is automatically deployed from https://github.com/at-wat/.rospkg-assets.
# Please don't directly edit; update at-wat/.rospkg-assets instead.

name: Release
on:
issues:
types: [opened, edited]

jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.event.issue.title, 'Release ')
steps:
- name: checkout
uses: actions/checkout@v4
- name: create release
id: create_release
uses: at-wat/catkin-release-action@v1
with:
issue_title: ${{ github.event.issue.title }}
git_user: wam-v-tan
git_email: [email protected]
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: open pull-request
uses: repo-sync/pull-request@v2
id: create_pull_request
with:
source_branch: ${{ steps.create_release.outputs.created_branch }}
destination_branch: ${{ github.event.repository.default_branch }}
pr_title: Release ${{ steps.create_release.outputs.version}}
pr_body: close \#${{ github.event.issue.number }}
pr_assignee: wam-v-tan
github_token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
- name: Enable Pull Request Automerge
uses: peter-evans/enable-pull-request-automerge@v1
with:
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
pull-request-number: ${{ steps.create_pull_request.outputs.pr_number }}
merge-method: squash
- name: create GitHub release
uses: actions/create-release@v1
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_release.outputs.version}}
release_name: Release ${{ steps.create_release.outputs.version}}
- name: bloom release
if: github.event.label.name == 'bloom'
id: bloom
uses: at-wat/bloom-release-action@v0
with:
ros_distro: foxy galactic rolling
github_token_bloom: ${{ secrets.WAMV_TAN_BOT_SECRET }}
github_user: wam-v-tan
git_user: wam-v-tan
git_email: [email protected]
release_repository_push_url: https://github.com/${{ github.repository }}-release.git
tag_and_release: true
open_pr: true
- name: Notify Slack
uses: 8398a7/action-slack@v2
if: failure()
with:
status: ${{ job.status }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
24 changes: 24 additions & 0 deletions .github/workflows/Review.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CodeReview

permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [review_requested]

jobs:
review:
runs-on: ubuntu-latest
if: ${{ github.event.requested_reviewer.login == 'wam-v-tan' }}
steps:
- uses: OUXT-Polaris/chatgpt-github-actions@main
with:
openai_api_key: ${{ secrets.OPENAI_API_KEY }}
github_token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
github_pr_id: ${{ github.event.number }}
openai_engine: "gpt-3.5-turbo" #optional
openai_temperature: 0.5 #optional
openai_max_tokens: 2048 #optional
mode: review
22 changes: 22 additions & 0 deletions .github/workflows/UpdateWorkflowStatus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: UpdateDashboard
on:
pull_request:
paths-ignore:
- ".github/workflows/UpdateWorkflowStatus.yaml"
- ".github/workflows/BuildTest.yaml"
- ".github/workflows/Release.yaml"
- ".github/workflows/Review.yaml"
workflow_dispatch:

jobs:
build:
name: UpdateDashboard
runs-on: ubuntu-latest
steps:
- uses: benc-uk/workflow-dispatch@v1
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.WAMV_TAN_BOT_SECRET }}
repo: OUXT-Polaris/ouxt_automation
workflow: document
ref: master
Loading