From d6793c44f77d2593525526a23b421216d56faa44 Mon Sep 17 00:00:00 2001 From: marfanr Date: Tue, 27 Feb 2024 20:34:04 +0700 Subject: [PATCH 1/6] feat: add new workflows with ros2-ws-action --- .github/workflows/build-ros2-ws-action.yml | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/build-ros2-ws-action.yml diff --git a/.github/workflows/build-ros2-ws-action.yml b/.github/workflows/build-ros2-ws-action.yml new file mode 100644 index 0000000..b170269 --- /dev/null +++ b/.github/workflows/build-ros2-ws-action.yml @@ -0,0 +1,49 @@ +name: ros2-ws-action +on: + workflow_dispatch: + pull_request: + push: + branches: [master, feature/fix-github-workflows] + workflow_run: + workflows: [Build and Test Nightly] + types: [requested, completed, in_progress] + branches: [feature/fix-github-workflows] +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + path: shisen_cpp + + - name: Checkout Shisen Interface + uses: actions/checkout@v2.3.4 + with: + path: shisen_interfaces + + - name: Checkout Kansei Interfaces + uses: actions/checkout@v2.3.4 + with: + repository: ichiro-its/kansei_interfaces + path: kansei_interfaces + + - name: install opencv contrib + run: | + sudo apt install libopencv-contrib-dev -y + + - name: Checkout Keisan + uses: actions/checkout@v2.3.4 + with: + repository: ichiro-its/keisan + path: keisan + + - name: Setup workspace + uses: ichiro-its/ros2-ws-action/setup@v1.0.1 + + - name: Build workspace + uses: ichiro-its/ros2-ws-action/build@v1.0.1 + + - name: Test workspace + uses: ichiro-its/ros2-ws-action/test@v1.0.1 From 0180d97b3225a641b0a41282ca7a1adac853ae56 Mon Sep 17 00:00:00 2001 From: marfanr Date: Tue, 27 Feb 2024 21:18:31 +0700 Subject: [PATCH 2/6] feat: fix missing dependency on worklows --- .github/workflows/build-ros2-ws-action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-ros2-ws-action.yml b/.github/workflows/build-ros2-ws-action.yml index b170269..b587502 100644 --- a/.github/workflows/build-ros2-ws-action.yml +++ b/.github/workflows/build-ros2-ws-action.yml @@ -21,6 +21,7 @@ jobs: - name: Checkout Shisen Interface uses: actions/checkout@v2.3.4 with: + repository: ichiro-its/shisen_interfaces path: shisen_interfaces - name: Checkout Kansei Interfaces From 99dab8cb0f836775932bc7a80ec9feaab26b982d Mon Sep 17 00:00:00 2001 From: marfanr Date: Fri, 8 Mar 2024 18:10:51 +0700 Subject: [PATCH 3/6] feat: update checkout version, and remove workflow run --- .github/workflows/build-ros2-ws-action.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-ros2-ws-action.yml b/.github/workflows/build-ros2-ws-action.yml index b587502..0b4291c 100644 --- a/.github/workflows/build-ros2-ws-action.yml +++ b/.github/workflows/build-ros2-ws-action.yml @@ -3,29 +3,25 @@ on: workflow_dispatch: pull_request: push: - branches: [master, feature/fix-github-workflows] - workflow_run: - workflows: [Build and Test Nightly] - types: [requested, completed, in_progress] - branches: [feature/fix-github-workflows] + branches: [master] jobs: build-and-test: name: Build and Test runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4.1.1 with: path: shisen_cpp - name: Checkout Shisen Interface - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4.1.1 with: repository: ichiro-its/shisen_interfaces path: shisen_interfaces - name: Checkout Kansei Interfaces - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4.1.1 with: repository: ichiro-its/kansei_interfaces path: kansei_interfaces @@ -35,7 +31,7 @@ jobs: sudo apt install libopencv-contrib-dev -y - name: Checkout Keisan - uses: actions/checkout@v2.3.4 + uses: actions/checkout@v4.1.1 with: repository: ichiro-its/keisan path: keisan From 312e256063cb3ae69dbf2ed9a72ef5d328fe31d5 Mon Sep 17 00:00:00 2001 From: marfanr Date: Tue, 3 Sep 2024 18:35:21 +0700 Subject: [PATCH 4/6] feat: add jitsuyo dependency --- .github/workflows/build-ros2-ws-action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-ros2-ws-action.yml b/.github/workflows/build-ros2-ws-action.yml index 0b4291c..8fa7616 100644 --- a/.github/workflows/build-ros2-ws-action.yml +++ b/.github/workflows/build-ros2-ws-action.yml @@ -36,6 +36,13 @@ jobs: repository: ichiro-its/keisan path: keisan + - name: Checkout Jitsuyo + uses: actions/checkout@v4.1.1 + with: + repository: ichiro-its/jitsuyo + path: jitsuyo + token: ${{ secrets.GH_TOKEN }} + - name: Setup workspace uses: ichiro-its/ros2-ws-action/setup@v1.0.1 From ba5270f03a4a38fe5107285275c06fb4ce7ba787 Mon Sep 17 00:00:00 2001 From: marfanr Date: Tue, 3 Sep 2024 18:35:50 +0700 Subject: [PATCH 5/6] feat: remove unused workflows and add discord pr bot workflows --- .github/workflows/build-and-test-nightly.yml | 23 ---------- .github/workflows/build-and-test-stable.yml | 21 --------- .github/workflows/build-debian-nightly.yml | 46 ------------------- .github/workflows/build-debian-stable.yml | 44 ------------------ .github/workflows/dispatch-discord-pr-bot.yml | 20 ++++++++ 5 files changed, 20 insertions(+), 134 deletions(-) delete mode 100644 .github/workflows/build-and-test-nightly.yml delete mode 100644 .github/workflows/build-and-test-stable.yml delete mode 100644 .github/workflows/build-debian-nightly.yml delete mode 100644 .github/workflows/build-debian-stable.yml create mode 100644 .github/workflows/dispatch-discord-pr-bot.yml diff --git a/.github/workflows/build-and-test-nightly.yml b/.github/workflows/build-and-test-nightly.yml deleted file mode 100644 index 4f34a31..0000000 --- a/.github/workflows/build-and-test-nightly.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Build and Test Nightly -on: - workflow_dispatch: - pull_request: - branches: [master] - push: - branches: [master] -jobs: - build-and-test-nightly: - runs-on: ubuntu-20.04 - steps: - - name: Checkout this repository - uses: actions/checkout@v2.3.4 - with: - path: shisen_cpp - - - name: Add nightly Debian repository and rosdep sources list - run: | - sudo apt update && sudo apt install curl - curl -s ${{ secrets.SERVER_BASE_URL }}/debian/setup-nightly.bash | bash -s - curl -s ${{ secrets.SERVER_BASE_URL }}/rosdep/setup.bash | bash -s - - name: Build and test workspace - uses: ichiro-its/ros2-build-and-test-action@main diff --git a/.github/workflows/build-and-test-stable.yml b/.github/workflows/build-and-test-stable.yml deleted file mode 100644 index 4c64ceb..0000000 --- a/.github/workflows/build-and-test-stable.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Build and Test Stable -on: - workflow_dispatch: - push: - branches: [master] -jobs: - build-and-test-stable: - runs-on: ubuntu-20.04 - steps: - - name: Checkout this repository - uses: actions/checkout@v2.3.4 - with: - path: shisen_cpp - - - name: Add stable Debian repository and rosdep sources list - run: | - sudo apt update && sudo apt install curl - curl -s ${{ secrets.SERVER_BASE_URL }}/debian/setup.bash | bash -s - curl -s ${{ secrets.SERVER_BASE_URL }}/rosdep/setup.bash | bash -s - - name: Build and test workspace - uses: ichiro-its/ros2-build-and-test-action@main diff --git a/.github/workflows/build-debian-nightly.yml b/.github/workflows/build-debian-nightly.yml deleted file mode 100644 index afbe418..0000000 --- a/.github/workflows/build-debian-nightly.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Deploy Debian Nightly -on: - workflow_dispatch: - push: - branches: [master] -jobs: - deploy-debian-nightly: - runs-on: ubuntu-20.04 - steps: - - name: Checkout this repository - uses: actions/checkout@v2.3.4 - with: - path: shisen_cpp - - - name: Add nightly Debian repository and rosdep sources list - run: | - sudo apt update && sudo apt install curl - curl -s ${{ secrets.SERVER_BASE_URL }}/debian/setup-nightly.bash | bash -s - curl -s ${{ secrets.SERVER_BASE_URL }}/rosdep/setup.bash | bash -s - - name: Build nightly Debian package - uses: ichiro-its/ros2-build-debian-action@main - with: - unique-version: true - - - name: Deploy nightly Debian package to server - uses: appleboy/scp-action@master - with: - host: ${{ secrets.SSH_HOST }} - port: ${{ secrets.SSH_PORT }} - username: ${{ secrets.SSH_USER }} - password: ${{ secrets.SSH_PASS }} - source: "package/*.deb" - target: "~/temp/nightly/shisen_cpp/" - rm: true - - - name: Prepare nightly Debian package in the server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SSH_HOST }} - port: ${{ secrets.SSH_PORT }} - username: ${{ secrets.SSH_USER }} - password: ${{ secrets.SSH_PASS }} - script: | - cd ${{ secrets.SERVER_REPO_DIR }}/debian - reprepro includedeb nightly ~/temp/nightly/shisen_cpp/package/*.deb - rm -rf ~/temp/nightly/shisen_cpp/ diff --git a/.github/workflows/build-debian-stable.yml b/.github/workflows/build-debian-stable.yml deleted file mode 100644 index 540f30d..0000000 --- a/.github/workflows/build-debian-stable.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: Deploy Debian Stable -on: - workflow_dispatch: - release: - types: [created] -jobs: - deploy-debian-stable: - runs-on: ubuntu-20.04 - steps: - - name: Checkout this repository - uses: actions/checkout@v2.3.4 - with: - path: shisen_cpp - - - name: Add stable Debian repository and rosdep sources list - run: | - sudo apt update && sudo apt install curl - curl -s ${{ secrets.SERVER_BASE_URL }}/debian/setup.bash | bash -s - curl -s ${{ secrets.SERVER_BASE_URL }}/rosdep/setup.bash | bash -s - - name: Build stable Debian package - uses: ichiro-its/ros2-build-debian-action@main - - - name: Deploy stable Debian package to server - uses: appleboy/scp-action@master - with: - host: ${{ secrets.SSH_HOST }} - port: ${{ secrets.SSH_PORT }} - username: ${{ secrets.SSH_USER }} - password: ${{ secrets.SSH_PASS }} - source: "package/*.deb" - target: "~/temp/stable/shisen_cpp/" - rm: true - - - name: Prepare stable Debian package in the server - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SSH_HOST }} - port: ${{ secrets.SSH_PORT }} - username: ${{ secrets.SSH_USER }} - password: ${{ secrets.SSH_PASS }} - script: | - cd ${{ secrets.SERVER_REPO_DIR }}/debian - reprepro includedeb stable ~/temp/stable/shisen_cpp/package/*.deb - rm -rf ~/temp/stable/shisen_cpp/ diff --git a/.github/workflows/dispatch-discord-pr-bot.yml b/.github/workflows/dispatch-discord-pr-bot.yml new file mode 100644 index 0000000..01201ce --- /dev/null +++ b/.github/workflows/dispatch-discord-pr-bot.yml @@ -0,0 +1,20 @@ +name: Dispatch Discord PR Bot + +on: + pull_request: + types: [opened, closed, reopened] + workflow_dispatch: + +jobs: + dispatch-discord-pr-bot: + runs-on: ubuntu-latest + steps: + - uses: peter-evans/repository-dispatch@v3 + with: + repository: ichiro-its/${{ vars.DISCORD_PR_BOT_REPO }} + event-type: pull_request + client-payload: | + { + "repository": "${{ github.event.repository.name }}", + "pr_type": "${{ github.event.action || 'opened' }}" + } From 8d88f0bda732139e6343b75b338365be85cc2ebf Mon Sep 17 00:00:00 2001 From: marfanr Date: Tue, 3 Sep 2024 18:42:43 +0700 Subject: [PATCH 6/6] feat: add grpc dependency --- .github/workflows/build-ros2-ws-action.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build-ros2-ws-action.yml b/.github/workflows/build-ros2-ws-action.yml index 8fa7616..84b5daf 100644 --- a/.github/workflows/build-ros2-ws-action.yml +++ b/.github/workflows/build-ros2-ws-action.yml @@ -43,6 +43,21 @@ jobs: path: jitsuyo token: ${{ secrets.GH_TOKEN }} + - name: Setup abseil for grpc + run: | + git clone https://github.com/abseil/abseil-cpp.git + cmake -S abseil-cpp -B abseil-cpp/build + cmake --build abseil-cpp/build + sudo cmake --install abseil-cpp/build + + - name: Setup grpc + run: | + git clone --recurse-submodules -b v1.61.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc + cmake -S grpc -B grpc/build + cmake --build grpc/build + sudo cmake --install grpc/build + rm -rf grpc + - name: Setup workspace uses: ichiro-its/ros2-ws-action/setup@v1.0.1