From e78517ff1ac3da433dd14472f56f3213bdb5b18f Mon Sep 17 00:00:00 2001 From: wam-v-tan Date: Thu, 23 Mar 2023 01:16:52 +0000 Subject: [PATCH 01/11] Setup workflow --- .github/workflows/Review.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/Review.yaml diff --git a/.github/workflows/Review.yaml b/.github/workflows/Review.yaml new file mode 100644 index 0000000..60a5584 --- /dev/null +++ b/.github/workflows/Review.yaml @@ -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 From 552d3ca7a1cb904b4cb2dcc41867516a142a487b Mon Sep 17 00:00:00 2001 From: wam-v-tan Date: Thu, 23 Mar 2023 14:13:31 +0000 Subject: [PATCH 02/11] Setup workflow --- .github/workflows/BuildTest.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index 429aa29..f94af63 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -122,4 +122,16 @@ jobs: status: ${{ job.status }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + merge: + name: merge + runs-on: ubuntu-20.04 + timeout-minutes: 180 + needs: build + steps: + - name: Merge PR + uses: nbrugger-tgm/merge-pr-action@v0.2.3 + if: contains( github.event.pull_request.labels.*.name, 'bot') && github.event_name == 'pull_request' + with : + token: ${{ secrets.GITHUB_TOKEN }} + method: squash From 04f30f52f1134f0939ea2670138847b379716b8b Mon Sep 17 00:00:00 2001 From: wam-v-tan Date: Thu, 23 Mar 2023 16:22:44 +0000 Subject: [PATCH 03/11] Setup workflow --- .github/workflows/Release.yaml | 2 +- .github/workflows/UpdateWorkflowStatus.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Release.yaml b/.github/workflows/Release.yaml index 39b4218..fb06232 100644 --- a/.github/workflows/Release.yaml +++ b/.github/workflows/Release.yaml @@ -65,4 +65,4 @@ jobs: status: ${{ job.status }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/UpdateWorkflowStatus.yaml b/.github/workflows/UpdateWorkflowStatus.yaml index 68115b2..ea7d29c 100644 --- a/.github/workflows/UpdateWorkflowStatus.yaml +++ b/.github/workflows/UpdateWorkflowStatus.yaml @@ -16,4 +16,4 @@ jobs: token: ${{ secrets.WAMV_TAN_BOT_SECRET }} repo: OUXT-Polaris/ouxt_automation workflow: document - ref: master \ No newline at end of file + ref: master From 4189471b002eea1a5e3d54d552a559d5fc237e57 Mon Sep 17 00:00:00 2001 From: wam-v-tan <77885262+wam-v-tan@users.noreply.github.com> Date: Fri, 24 Mar 2023 10:25:06 +0900 Subject: [PATCH 04/11] Setup workflow (#72) --- .github/workflows/BuildTest.yaml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index f94af63..b478ff7 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -59,6 +59,7 @@ jobs: with: files: dependency.repos allow_failure: false + - uses: hendrikmuhs/ccache-action@v1.2 - name: Run build test with dependency-${{ matrix.rosdistro }}.repos uses: ros-tooling/action-ros-ci@v0.2 if: steps.check_rosdistro_repos_files.outputs.files_exists == 'true' @@ -69,7 +70,11 @@ jobs: colcon-defaults: | { "build": { - "mixin": ["coverage-gcc", "coverage-pytest"] + "mixin": ["coverage-gcc", "coverage-pytest"], + "cmake-args": [ + "-DCMAKE_C_COMPILER_LAUNCHER=ccache", + "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" + ] }, "test": { "mixin": ["coverage-pytest"] @@ -88,7 +93,11 @@ jobs: colcon-defaults: | { "build": { - "mixin": ["coverage-gcc", "coverage-pytest"] + "mixin": ["coverage-gcc", "coverage-pytest"], + "cmake-args": [ + "-DCMAKE_C_COMPILER_LAUNCHER=ccache", + "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" + ] }, "test": { "mixin": ["coverage-pytest"] @@ -106,7 +115,11 @@ jobs: colcon-defaults: | { "build": { - "mixin": ["coverage-gcc", "coverage-pytest"] + "mixin": ["coverage-gcc", "coverage-pytest"], + "cmake-args": [ + "-DCMAKE_C_COMPILER_LAUNCHER=ccache", + "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" + ] }, "test": { "mixin": ["coverage-pytest"] From 516a9e3922abe6ca9a85a74ca2f3ea37149f3bf2 Mon Sep 17 00:00:00 2001 From: wam-v-tan <77885262+wam-v-tan@users.noreply.github.com> Date: Fri, 14 Apr 2023 10:36:27 +0900 Subject: [PATCH 05/11] Setup workflow (#73) --- .github/workflows/BuildTest.yaml | 74 ++++++++++---------------------- 1 file changed, 22 insertions(+), 52 deletions(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index b478ff7..2de4cd8 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -40,6 +40,16 @@ jobs: 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: | @@ -59,75 +69,35 @@ jobs: with: files: dependency.repos allow_failure: false - - uses: hendrikmuhs/ccache-action@v1.2 - name: Run build test with dependency-${{ matrix.rosdistro }}.repos - uses: ros-tooling/action-ros-ci@v0.2 + uses: ros-tooling/action-ros-ci@v0.3 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 - colcon-defaults: | - { - "build": { - "mixin": ["coverage-gcc", "coverage-pytest"], - "cmake-args": [ - "-DCMAKE_C_COMPILER_LAUNCHER=ccache", - "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" - ] - }, - "test": { - "mixin": ["coverage-pytest"] - } - } - # If possible, pin the repository in the workflow to a specific commit to avoid - # changes in colcon-mixin-repository from breaking your tests. - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml + extra-cmake-args: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + env: + CCACHE_DIR: /tmp/ccache - name: Run build test with dependency.repos - uses: ros-tooling/action-ros-ci@v0.2 + uses: ros-tooling/action-ros-ci@v0.3 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 - colcon-defaults: | - { - "build": { - "mixin": ["coverage-gcc", "coverage-pytest"], - "cmake-args": [ - "-DCMAKE_C_COMPILER_LAUNCHER=ccache", - "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" - ] - }, - "test": { - "mixin": ["coverage-pytest"] - } - } - # If possible, pin the repository in the workflow to a specific commit to avoid - # changes in colcon-mixin-repository from breaking your tests. - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml + extra-cmake-args: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + env: + CCACHE_DIR: /tmp/ccache - name: Run build test without .repos file - uses: ros-tooling/action-ros-ci@v0.2 + uses: ros-tooling/action-ros-ci@v0.3 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 }} - colcon-defaults: | - { - "build": { - "mixin": ["coverage-gcc", "coverage-pytest"], - "cmake-args": [ - "-DCMAKE_C_COMPILER_LAUNCHER=ccache", - "-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" - ] - }, - "test": { - "mixin": ["coverage-pytest"] - } - } - # If possible, pin the repository in the workflow to a specific commit to avoid - # changes in colcon-mixin-repository from breaking your tests. - colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/1ddb69bedfd1f04c2f000e95452f7c24a4d6176b/index.yaml + extra-cmake-args: -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + env: + CCACHE_DIR: /tmp/ccache - name: Notify Slack uses: 8398a7/action-slack@v2 if: failure() From cd461ff4fab5a45b57115e42ae3846b097e2a2d9 Mon Sep 17 00:00:00 2001 From: wam-v-tan <77885262+wam-v-tan@users.noreply.github.com> Date: Sun, 16 Apr 2023 10:26:10 +0900 Subject: [PATCH 06/11] Setup workflow (#74) --- .github/workflows/UpdateWorkflowStatus.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/UpdateWorkflowStatus.yaml b/.github/workflows/UpdateWorkflowStatus.yaml index ea7d29c..b8d821b 100644 --- a/.github/workflows/UpdateWorkflowStatus.yaml +++ b/.github/workflows/UpdateWorkflowStatus.yaml @@ -3,6 +3,9 @@ on: pull_request: paths-ignore: - ".github/workflows/UpdateWorkflowStatus.yaml" + - ".github/workflows/BuildTest.yaml" + - ".github/workflows/Release.yaml" + - ".github/workflows/Review.yaml" workflow_dispatch: jobs: From 8360fbd4f1a573bc9d761b29c83b66a38df177d8 Mon Sep 17 00:00:00 2001 From: wam-v-tan <77885262+wam-v-tan@users.noreply.github.com> Date: Tue, 18 Apr 2023 23:09:08 +0900 Subject: [PATCH 07/11] Setup workflow (#75) --- .github/workflows/BuildTest.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index 2de4cd8..185d17a 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -112,9 +112,8 @@ jobs: timeout-minutes: 180 needs: build steps: - - name: Merge PR - uses: nbrugger-tgm/merge-pr-action@v0.2.3 - if: contains( github.event.pull_request.labels.*.name, 'bot') && github.event_name == 'pull_request' - with : - token: ${{ secrets.GITHUB_TOKEN }} - method: squash + - 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 From 71c215c412f299f9f6af6692d1dbac7de64d6e89 Mon Sep 17 00:00:00 2001 From: wam-v-tan <77885262+wam-v-tan@users.noreply.github.com> Date: Tue, 18 Apr 2023 23:20:38 +0900 Subject: [PATCH 08/11] Setup workflow (#76) --- .github/workflows/BuildTest.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index 185d17a..2de4cd8 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -112,8 +112,9 @@ jobs: 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 + - name: Merge PR + uses: nbrugger-tgm/merge-pr-action@v0.2.3 + if: contains( github.event.pull_request.labels.*.name, 'bot') && github.event_name == 'pull_request' + with : + token: ${{ secrets.GITHUB_TOKEN }} + method: squash From 53d6fc885662d2bb7fa8b3702355f6003948e8db Mon Sep 17 00:00:00 2001 From: wam-v-tan <77885262+wam-v-tan@users.noreply.github.com> Date: Wed, 19 Apr 2023 00:17:37 +0900 Subject: [PATCH 09/11] Setup workflow (#77) --- .github/workflows/BuildTest.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index 2de4cd8..185d17a 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -112,9 +112,8 @@ jobs: timeout-minutes: 180 needs: build steps: - - name: Merge PR - uses: nbrugger-tgm/merge-pr-action@v0.2.3 - if: contains( github.event.pull_request.labels.*.name, 'bot') && github.event_name == 'pull_request' - with : - token: ${{ secrets.GITHUB_TOKEN }} - method: squash + - 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 From 87c6c9adc408fc5832896e72ea0236c7a8eed427 Mon Sep 17 00:00:00 2001 From: wam-v-tan Date: Wed, 14 Jun 2023 12:17:32 +0000 Subject: [PATCH 10/11] Setup workflow --- .github/workflows/BuildTest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index 185d17a..bacafe0 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -113,7 +113,7 @@ jobs: needs: build steps: - name: merge PR - if : ${{ github.event_name == 'pull_request' }} && ${{ github.actor != 'wam-v-tan' }} + 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 From 2be8628f20448c63f31c0705dfbf60da89f699da Mon Sep 17 00:00:00 2001 From: wam-v-tan Date: Sun, 25 Jun 2023 01:54:35 +0000 Subject: [PATCH 11/11] Setup workflow --- .github/workflows/BuildTest.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BuildTest.yaml b/.github/workflows/BuildTest.yaml index bacafe0..527114a 100644 --- a/.github/workflows/BuildTest.yaml +++ b/.github/workflows/BuildTest.yaml @@ -9,7 +9,7 @@ on: jobs: build: name: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 180 strategy: fail-fast: false @@ -108,7 +108,7 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} merge: name: merge - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 180 needs: build steps: