From a937ae19d71d14a89012930912fe446ec1896d79 Mon Sep 17 00:00:00 2001 From: borednuna Date: Mon, 5 Feb 2024 17:59:06 +0700 Subject: [PATCH] feat: update workflow --- .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/ros-2-ci.yaml | 43 ++++++++++++++++++ 5 files changed, 43 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/ros-2-ci.yaml diff --git a/.github/workflows/build-and-test-nightly.yml b/.github/workflows/build-and-test-nightly.yml deleted file mode 100644 index 5ea2fe6..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: ninshiki_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 eeaa1ba..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: ninshiki_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 b92e203..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: ninshiki_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/ninshiki_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/ninshiki_cpp/package/*.deb - rm -rf ~/temp/nightly/ninshiki_cpp/ diff --git a/.github/workflows/build-debian-stable.yml b/.github/workflows/build-debian-stable.yml deleted file mode 100644 index 52bda0f..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: ninshiki_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/ninshiki_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/ninshiki_cpp/package/*.deb - rm -rf ~/temp/stable/ninshiki_cpp/ diff --git a/.github/workflows/ros-2-ci.yaml b/.github/workflows/ros-2-ci.yaml new file mode 100644 index 0000000..efb85cb --- /dev/null +++ b/.github/workflows/ros-2-ci.yaml @@ -0,0 +1,43 @@ +name: ROS 2 CI +on: + push: +jobs: + build-and-test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.0.0 + with: + path: workspace + + - name: Clone Keisan + uses: actions/checkout@v4.0.0 + with: + repository: ichiro-its/keisan + ref: master + path: workspace/src/keisan + + - name: Clone Ninshiki Interfaces + uses: actions/checkout@v4.0.0 + with: + repository: ichiro-its/ninshiki_interfaces + ref: master + path: workspace/src/ninshiki_interfaces + + - name: Clone Shisen Cpp + uses: actions/checkout@v4.0.0 + with: + repository: ichiro-its/shisen_cpp + ref: master + path: workspace/src/shisen_cpp + + - name: Clone Shisen Interfaces + uses: actions/checkout@v4.0.0 + with: + repository: ichiro-its/shisen_interfaces + ref: master + path: workspace/src/shisen_interfaces + + - name: Build and test workspace + uses: ichiro-its/ros2-ws-action@v1.0.0 \ No newline at end of file